Documentation ¶
Overview ¶
Code generated by "ωBNF gen" DO NOT EDIT. $ wbnf gen --grammar ebnf.wbnf --start grammar --pkg ebnfparser --output ebnf.go
Index ¶
- Constants
- func GenerateOutput(grammar *EbnfGrammar, value *sysl.Value, logger *logrus.Logger) (string, error)
- func Grammar() parser.Parsers
- type AtomNode
- type CommentNode
- type EbnfGrammar
- type GrammarNode
- type IdentNode
- type ProdNode
- type StmtNode
- type Stopper
- func WalkAtomNode(node AtomNode, ops WalkerOps) Stopper
- func WalkCommentNode(node CommentNode, ops WalkerOps) Stopper
- func WalkGrammarNode(node GrammarNode, ops WalkerOps) Stopper
- func WalkIdentNode(node IdentNode, ops WalkerOps) Stopper
- func WalkProdNode(node ProdNode, ops WalkerOps) Stopper
- func WalkStmtNode(node StmtNode, ops WalkerOps) Stopper
- func WalkStringNode(node StringNode, ops WalkerOps) Stopper
- func WalkTermNode(node TermNode, ops WalkerOps) Stopper
- func WalkWrapreNode(node WrapreNode, ops WalkerOps) Stopper
- type StringNode
- type TermNode
- func (c TermNode) AllAtom() []AtomNode
- func (c TermNode) AllOp() []string
- func (c TermNode) AllQuant() []string
- func (c TermNode) AllTerm() []TermNode
- func (c TermNode) Choice() int
- func (c TermNode) OneAtom() AtomNode
- func (c TermNode) OneOp() string
- func (c TermNode) OneQuant() string
- func (c TermNode) OneTerm() TermNode
- type WalkerOps
- type WrapreNode
Constants ¶
View Source
const ( IdentCOMMENT = "COMMENT" IdentIDENT = "IDENT" IdentSTRING = "STRING" IdentAtom = "atom" IdentOp = "op" IdentProd = "prod" IdentQuant = "quant" IdentRule = "rule" IdentStmt = "stmt" IdentTerm = "term" )
Variables ¶
This section is empty.
Functions ¶
func GenerateOutput ¶
Types ¶
type AtomNode ¶
func (AtomNode) AllString ¶
func (c AtomNode) AllString() []StringNode
func (AtomNode) OneString ¶
func (c AtomNode) OneString() StringNode
type CommentNode ¶
func (CommentNode) String ¶
func (c CommentNode) String() string
type EbnfGrammar ¶
func ReadGrammar ¶
type GrammarNode ¶
func NewGrammarNode ¶
func NewGrammarNode(from ast.Node) GrammarNode
func ParseString ¶
func ParseString(input string) (GrammarNode, error)
func (GrammarNode) AllStmt ¶
func (c GrammarNode) AllStmt() []StmtNode
func (GrammarNode) GetAstNode ¶
func (c GrammarNode) GetAstNode() ast.Node
func (GrammarNode) OneStmt ¶
func (c GrammarNode) OneStmt() StmtNode
type StmtNode ¶
func (StmtNode) AllComment ¶
func (c StmtNode) AllComment() []CommentNode
func (StmtNode) OneComment ¶
func (c StmtNode) OneComment() CommentNode
type Stopper ¶
func WalkAtomNode ¶
func WalkCommentNode ¶
func WalkCommentNode(node CommentNode, ops WalkerOps) Stopper
func WalkGrammarNode ¶
func WalkGrammarNode(node GrammarNode, ops WalkerOps) Stopper
func WalkIdentNode ¶
func WalkProdNode ¶
func WalkStmtNode ¶
func WalkStringNode ¶
func WalkStringNode(node StringNode, ops WalkerOps) Stopper
func WalkTermNode ¶
func WalkWrapreNode ¶
func WalkWrapreNode(node WrapreNode, ops WalkerOps) Stopper
type StringNode ¶
func (StringNode) String ¶
func (c StringNode) String() string
type WalkerOps ¶
type WalkerOps struct { EnterWrapreNode func(WrapreNode) Stopper ExitWrapreNode func(WrapreNode) Stopper EnterCommentNode func(CommentNode) Stopper ExitCommentNode func(CommentNode) Stopper EnterIdentNode func(IdentNode) Stopper ExitIdentNode func(IdentNode) Stopper EnterStringNode func(StringNode) Stopper ExitStringNode func(StringNode) Stopper EnterAtomNode func(AtomNode) Stopper ExitAtomNode func(AtomNode) Stopper EnterGrammarNode func(GrammarNode) Stopper ExitGrammarNode func(GrammarNode) Stopper EnterProdNode func(ProdNode) Stopper ExitProdNode func(ProdNode) Stopper EnterStmtNode func(StmtNode) Stopper ExitStmtNode func(StmtNode) Stopper EnterTermNode func(TermNode) Stopper ExitTermNode func(TermNode) Stopper }
func (WalkerOps) Walk ¶
func (w WalkerOps) Walk(tree GrammarNode)
type WrapreNode ¶
func (WrapreNode) String ¶
func (c WrapreNode) String() string
Click to show internal directories.
Click to hide internal directories.