prefix_gdl

package
v0.0.0-...-c3230fc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseAll

func ParseAll(parser PrefixGdlParser) error

Parse all sentences, sending their output to the parser's output channel. Unlike the parser's NextSentence(), an io.EOF encountered is not returned, instead a nil is returned for standard EOF errors. Any error other than io.EOF will be returned.

Types

type PrefixGdlParser

type PrefixGdlParser interface {
	// Reads one or more tokens from input until a full sentence can be produced
	// or until an error is encountered.  Returns nil only if there was no error.
	NextSentence() error

	// Read/Receive-only channel for Sentence terms sent when read from the input.
	// Calling NextSentence() or ParseAll() will produce sentences on this channel
	// and will close the channel when the token input channel is closed.
	SentenceReceiver() <-chan ast.Sentence
}

func NewPrefixGdlParser

func NewPrefixGdlParser(input io.RuneReader, output chan ast.Sentence) PrefixGdlParser

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL