Versions in this module Expand all Collapse all v0 v0.1.3 Jun 18, 2021 v0.1.2 Jun 17, 2021 v0.1.1 Jun 5, 2018 Changes in this version + const TOK_EOF + var Debug = false + var EOF = Tok(TOK_EOF) + var ErrParsed = ErrParsedType + var NilItem = Item + var NilParsed = NilParsedType + var VisitorTemplate = visitorTemplate + func Do(p interface{}, ps ParseState) (Parsed, ParseState) + type BaseParseState struct + func (b *BaseParseState) Errors() []ParseError + func (b *BaseParseState) Pos() int + func (b BaseParseState) CloneBase() BaseParseState + type ErrParsedType struct + func (ErrParsedType) String() string + type Item struct + Column int + Index int + Line int + Offset Pos + SourceFile string + Token TokenType + Value string + func (i Item) End() Pos + func (i Item) Start() Pos + func (i Item) String() string + type LexerIface interface + At func(state ParseState) Item + type NamedValue struct + Name string + Value Parsed + func (n NamedValue) String() string + type NilParsedType struct + func (NilParsedType) String() string + type ParseError struct + Error error + Token Item + type ParseState interface + Clone func() ParseState + Errors func() []ParseError + Lexer func() LexerIface + Pos func() int + type Parsed interface + String func() string + type Parser func(p ParseState) (Parsed, ParseState) + func Char(c rune) Parser + func Many(p interface{}) Parser + func Many1(p interface{}) Parser + func Maybe(p interface{}) Parser + func MaybePeek(p interface{}) Parser + func Named(ident string, p interface{}) Parser + func Or(p ...interface{}) Parser + func Peek(p interface{}) Parser + func Prod(ident string, p interface{}) Parser + func Recover(p interface{}, recoverfn RecoverFunc) Parser + func RecoverTo(token TokenType, p interface{}) Parser + func Root(p interface{}) Parser + func SepBy(p, delim interface{}) Parser + func SepBy1(p, delim interface{}) Parser + func SepBy1Term(p, delim, terminator interface{}) Parser + func SepByTerm(p, delim, terminator interface{}) Parser + func Seq(p ...interface{}) Parser + func Tok(token TokenType) Parser + func Try(p interface{}) Parser + func TryRecover(p interface{}, recoverfn RecoverFunc) Parser + func TypedProd(ident string, typ interface{}, p interface{}) Parser + func TypedProdIface(ident string, typ interface{}, p interface{}) Parser + type Pos token.Pos + type Production struct + Children Sequence + Ident string + func (t Production) String() string + type RecoverFunc func(start ParseState, end ParseState) (Parsed, ParseState) + type Sequence []Parsed + func (s Sequence) Filter(tokens ...TokenType) Sequence + func (s Sequence) Flatten() []Parsed + func (s Sequence) String() string + type TokenType string