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
Click to show internal directories.
Click to hide internal directories.