parser

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IOParser

type IOParser struct {
	// contains filtered or unexported fields
}

func NewIOParser

func NewIOParser(bufSize uint64, parserBufSize uint16) *IOParser

func (*IOParser) Close

func (p *IOParser) Close() error

func (*IOParser) Read

func (p *IOParser) Read(b []byte) (int, error)

func (*IOParser) Write

func (p *IOParser) Write(b []byte) (int, error)

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewBufferedParser

func NewBufferedParser(bufSize uint16) *Parser

func NewParser

func NewParser() *Parser

func (*Parser) Close

func (p *Parser) Close()

func (*Parser) Errors added in v0.2.2

func (p *Parser) Errors() <-chan grammar.ParseError

func (*Parser) Parse

func (p *Parser) Parse(line string)

TODO: we should work on implementing a custom `antrl.CharStream`, instead of re-creating ANTLR machinery for every line of text.

func (*Parser) Results

func (p *Parser) Results() <-chan grammar.Utterance

type StreamParser

type StreamParser struct {
	// contains filtered or unexported fields
}

func NewStreamParser

func NewStreamParser(bufSize uint64, debug bool, verbose bool) *StreamParser

func (*StreamParser) Results

func (s *StreamParser) Results() <-chan grammar.Utterance

func (*StreamParser) Start

func (s *StreamParser) Start(ctx context.Context) error

func (*StreamParser) Stop

func (s *StreamParser) Stop(ctx context.Context) error

func (*StreamParser) Write

func (s *StreamParser) Write(ctx context.Context, line string) error

Jump to

Keyboard shortcuts

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