Documentation ¶
Overview ¶
Package parser is mostly generated from the bnf using gocc. The only user created code is the ParseExpr and ParseGrammar methods as well as the ParseGrammar function.
Index ¶
- func ParseExpr(s string) (*ast.Expr, error)
- func ParseGrammar(s string) (*ast.Grammar, error)
- type Attrib
- type Parser
- func (p *Parser) Error(err error, scanner Scanner) (recovered bool, errorAttrib *parseError.Error)
- func (p *Parser) Parse(scanner Scanner) (res interface{}, err error)
- func (this *Parser) ParseExpr(s string) (res *ast.Expr, err error)
- func (this *Parser) ParseGrammar(s string) (*ast.Grammar, error)
- func (p *Parser) Reset()
- type ProdTab
- type ProdTabEntry
- type Scanner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) ParseGrammar ¶
ParseGrammar parses a relapse grammar and returns an abstract syntax tree.
type ProdTab ¶
type ProdTab [numProductions]ProdTabEntry
TODO: change type and variable names to be consistent with other tables
type ProdTabEntry ¶
Click to show internal directories.
Click to hide internal directories.