Documentation ¶
Index ¶
- type Language
- type Lexeme
- func NewAlternateLexer(name string, lhs, rhs *Lexeme) *Lexeme
- func NewConcatLexer(name string, deps []*Lexeme) *Lexeme
- func NewDiscardLexer(lex *Lexeme) *Lexeme
- func NewLiteralLexer(typ, valid string) *Lexeme
- func NewOptionClosure(lex *Lexeme) *Lexeme
- func NewPlusClosure(lex *Lexeme) *Lexeme
- func NewRegexpLexer(typ string, valid *regexp.Regexp) *Lexeme
- func NewRuleLexer(rule string) *Lexeme
- func NewStarClosure(lex *Lexeme) *Lexeme
- type ParseTree
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Language ¶
type Language struct {
// contains filtered or unexported fields
}
Language defines lexing and parsing capabilities for a peg defined language.
type Lexeme ¶
type Lexeme struct { Name string Dependencies []*Lexeme // Lexer returns the parse tree, an error and the number of input bytes consumed. Lexer func(*Source, int) (*ParseTree, error, int) // contains filtered or unexported fields }
func NewAlternateLexer ¶
func NewConcatLexer ¶
func NewDiscardLexer ¶
func NewLiteralLexer ¶
func NewOptionClosure ¶
func NewPlusClosure ¶
func NewRuleLexer ¶
func NewStarClosure ¶
Click to show internal directories.
Click to hide internal directories.