Documentation ¶
Overview ¶
Example ¶
package main import ( "bramp.net/antlr4/mu" "fmt" "github.com/antlr/antlr4/runtime/Go/antlr" ) type exampleListener struct { *mu.BaseMuParserListener } func (l *exampleListener) EnterEveryRule(ctx antlr.ParserRuleContext) { fmt.Println(ctx.GetText()) } func main() { // Setup the input is := antlr.NewInputStream("...some text to parse...") // Create the Lexer lexer := mu.NewMuParserLexer(is) stream := antlr.NewCommonTokenStream(lexer, antlr.TokenDefaultChannel) // Create the Parser p := mu.NewMuParserParser(stream) p.BuildParseTrees = true p.AddErrorListener(antlr.NewDiagnosticErrorListener(true)) // Finally walk the tree tree := p.Prog() antlr.ParseTreeWalkerDefault.Walk(&exampleListener{}, tree) }
Output:
Index ¶
- Constants
- type AddSubExprContext
- func (s *AddSubExprContext) ADD() antlr.TerminalNode
- func (s *AddSubExprContext) AllExpr() []IExprContext
- func (s *AddSubExprContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *AddSubExprContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *AddSubExprContext) Expr(i int) IExprContext
- func (s *AddSubExprContext) GetOp() antlr.Token
- func (s *AddSubExprContext) GetRuleContext() antlr.RuleContext
- func (s *AddSubExprContext) SUB() antlr.TerminalNode
- func (s *AddSubExprContext) SetOp(v antlr.Token)
- type AndExprContext
- func (s *AndExprContext) AND() antlr.TerminalNode
- func (s *AndExprContext) AllExpr() []IExprContext
- func (s *AndExprContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *AndExprContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *AndExprContext) Expr(i int) IExprContext
- func (s *AndExprContext) GetRuleContext() antlr.RuleContext
- type AssignExprContext
- func (s *AssignExprContext) ASSIGN() antlr.TerminalNode
- func (s *AssignExprContext) ASSIGNADD() antlr.TerminalNode
- func (s *AssignExprContext) ASSIGNDIV() antlr.TerminalNode
- func (s *AssignExprContext) ASSIGNMUL() antlr.TerminalNode
- func (s *AssignExprContext) ASSIGNSUB() antlr.TerminalNode
- func (s *AssignExprContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *AssignExprContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *AssignExprContext) Expr() IExprContext
- func (s *AssignExprContext) GetOp() antlr.Token
- func (s *AssignExprContext) GetRuleContext() antlr.RuleContext
- func (s *AssignExprContext) ID() antlr.TerminalNode
- func (s *AssignExprContext) SetOp(v antlr.Token)
- type AtomContext
- type AtomExprContext
- type BaseMuParserListener
- func (s *BaseMuParserListener) EnterAddSubExpr(ctx *AddSubExprContext)
- func (s *BaseMuParserListener) EnterAndExpr(ctx *AndExprContext)
- func (s *BaseMuParserListener) EnterAssignExpr(ctx *AssignExprContext)
- func (s *BaseMuParserListener) EnterAtomExpr(ctx *AtomExprContext)
- func (s *BaseMuParserListener) EnterBooleanAtom(ctx *BooleanAtomContext)
- func (s *BaseMuParserListener) EnterEqualityExpr(ctx *EqualityExprContext)
- func (s *BaseMuParserListener) EnterEveryRule(ctx antlr.ParserRuleContext)
- func (s *BaseMuParserListener) EnterFunctionExpr(ctx *FunctionExprContext)
- func (s *BaseMuParserListener) EnterFunctionMultiExpr(ctx *FunctionMultiExprContext)
- func (s *BaseMuParserListener) EnterIdAtom(ctx *IdAtomContext)
- func (s *BaseMuParserListener) EnterIteExpr(ctx *IteExprContext)
- func (s *BaseMuParserListener) EnterMulDivExpr(ctx *MulDivExprContext)
- func (s *BaseMuParserListener) EnterNumberAtom(ctx *NumberAtomContext)
- func (s *BaseMuParserListener) EnterOrExpr(ctx *OrExprContext)
- func (s *BaseMuParserListener) EnterParExpr(ctx *ParExprContext)
- func (s *BaseMuParserListener) EnterPowExpr(ctx *PowExprContext)
- func (s *BaseMuParserListener) EnterPredefinedConstantAtom(ctx *PredefinedConstantAtomContext)
- func (s *BaseMuParserListener) EnterProgExpr(ctx *ProgExprContext)
- func (s *BaseMuParserListener) EnterRelationalExpr(ctx *RelationalExprContext)
- func (s *BaseMuParserListener) EnterUnaryMinusExpr(ctx *UnaryMinusExprContext)
- func (s *BaseMuParserListener) ExitAddSubExpr(ctx *AddSubExprContext)
- func (s *BaseMuParserListener) ExitAndExpr(ctx *AndExprContext)
- func (s *BaseMuParserListener) ExitAssignExpr(ctx *AssignExprContext)
- func (s *BaseMuParserListener) ExitAtomExpr(ctx *AtomExprContext)
- func (s *BaseMuParserListener) ExitBooleanAtom(ctx *BooleanAtomContext)
- func (s *BaseMuParserListener) ExitEqualityExpr(ctx *EqualityExprContext)
- func (s *BaseMuParserListener) ExitEveryRule(ctx antlr.ParserRuleContext)
- func (s *BaseMuParserListener) ExitFunctionExpr(ctx *FunctionExprContext)
- func (s *BaseMuParserListener) ExitFunctionMultiExpr(ctx *FunctionMultiExprContext)
- func (s *BaseMuParserListener) ExitIdAtom(ctx *IdAtomContext)
- func (s *BaseMuParserListener) ExitIteExpr(ctx *IteExprContext)
- func (s *BaseMuParserListener) ExitMulDivExpr(ctx *MulDivExprContext)
- func (s *BaseMuParserListener) ExitNumberAtom(ctx *NumberAtomContext)
- func (s *BaseMuParserListener) ExitOrExpr(ctx *OrExprContext)
- func (s *BaseMuParserListener) ExitParExpr(ctx *ParExprContext)
- func (s *BaseMuParserListener) ExitPowExpr(ctx *PowExprContext)
- func (s *BaseMuParserListener) ExitPredefinedConstantAtom(ctx *PredefinedConstantAtomContext)
- func (s *BaseMuParserListener) ExitProgExpr(ctx *ProgExprContext)
- func (s *BaseMuParserListener) ExitRelationalExpr(ctx *RelationalExprContext)
- func (s *BaseMuParserListener) ExitUnaryMinusExpr(ctx *UnaryMinusExprContext)
- func (s *BaseMuParserListener) VisitErrorNode(node antlr.ErrorNode)
- func (s *BaseMuParserListener) VisitTerminal(node antlr.TerminalNode)
- type BooleanAtomContext
- func (s *BooleanAtomContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *BooleanAtomContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *BooleanAtomContext) FALSE() antlr.TerminalNode
- func (s *BooleanAtomContext) GetRuleContext() antlr.RuleContext
- func (s *BooleanAtomContext) TRUE() antlr.TerminalNode
- type EqualityExprContext
- func (s *EqualityExprContext) AllExpr() []IExprContext
- func (s *EqualityExprContext) EQ() antlr.TerminalNode
- func (s *EqualityExprContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *EqualityExprContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *EqualityExprContext) Expr(i int) IExprContext
- func (s *EqualityExprContext) GetOp() antlr.Token
- func (s *EqualityExprContext) GetRuleContext() antlr.RuleContext
- func (s *EqualityExprContext) NEQ() antlr.TerminalNode
- func (s *EqualityExprContext) SetOp(v antlr.Token)
- type ExprContext
- type FunctionExprContext
- func (s *FunctionExprContext) CPAR() antlr.TerminalNode
- func (s *FunctionExprContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *FunctionExprContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *FunctionExprContext) Expr() IExprContext
- func (s *FunctionExprContext) FUNCTION() antlr.TerminalNode
- func (s *FunctionExprContext) GetOp() antlr.Token
- func (s *FunctionExprContext) GetRuleContext() antlr.RuleContext
- func (s *FunctionExprContext) OPAR() antlr.TerminalNode
- func (s *FunctionExprContext) SetOp(v antlr.Token)
- type FunctionMultiExprContext
- func (s *FunctionMultiExprContext) AllExpr() []IExprContext
- func (s *FunctionMultiExprContext) CPAR() antlr.TerminalNode
- func (s *FunctionMultiExprContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *FunctionMultiExprContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *FunctionMultiExprContext) Expr(i int) IExprContext
- func (s *FunctionMultiExprContext) FUNCTIONMULTI() antlr.TerminalNode
- func (s *FunctionMultiExprContext) GetOp() antlr.Token
- func (s *FunctionMultiExprContext) GetRuleContext() antlr.RuleContext
- func (s *FunctionMultiExprContext) OPAR() antlr.TerminalNode
- func (s *FunctionMultiExprContext) SetOp(v antlr.Token)
- type IAtomContext
- type IExprContext
- type IProgContext
- type IdAtomContext
- type IteExprContext
- func (s *IteExprContext) AllExpr() []IExprContext
- func (s *IteExprContext) COLON() antlr.TerminalNode
- func (s *IteExprContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *IteExprContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *IteExprContext) Expr(i int) IExprContext
- func (s *IteExprContext) GetRuleContext() antlr.RuleContext
- func (s *IteExprContext) QUESTION() antlr.TerminalNode
- type MuParserLexer
- type MuParserListener
- type MuParserParser
- func (p *MuParserParser) Atom() (localctx IAtomContext)
- func (p *MuParserParser) Expr() (localctx IExprContext)
- func (p *MuParserParser) Expr_Sempred(localctx antlr.RuleContext, predIndex int) bool
- func (p *MuParserParser) Prog() (localctx IProgContext)
- func (p *MuParserParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool
- type MulDivExprContext
- func (s *MulDivExprContext) AllExpr() []IExprContext
- func (s *MulDivExprContext) DIV() antlr.TerminalNode
- func (s *MulDivExprContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *MulDivExprContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *MulDivExprContext) Expr(i int) IExprContext
- func (s *MulDivExprContext) GetOp() antlr.Token
- func (s *MulDivExprContext) GetRuleContext() antlr.RuleContext
- func (s *MulDivExprContext) MUL() antlr.TerminalNode
- func (s *MulDivExprContext) SetOp(v antlr.Token)
- type NumberAtomContext
- func (s *NumberAtomContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *NumberAtomContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *NumberAtomContext) FLOAT() antlr.TerminalNode
- func (s *NumberAtomContext) GetRuleContext() antlr.RuleContext
- func (s *NumberAtomContext) INT() antlr.TerminalNode
- type OrExprContext
- func (s *OrExprContext) AllExpr() []IExprContext
- func (s *OrExprContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *OrExprContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *OrExprContext) Expr(i int) IExprContext
- func (s *OrExprContext) GetRuleContext() antlr.RuleContext
- func (s *OrExprContext) OR() antlr.TerminalNode
- type ParExprContext
- func (s *ParExprContext) CPAR() antlr.TerminalNode
- func (s *ParExprContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *ParExprContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *ParExprContext) Expr() IExprContext
- func (s *ParExprContext) GetRuleContext() antlr.RuleContext
- func (s *ParExprContext) OPAR() antlr.TerminalNode
- type PowExprContext
- func (s *PowExprContext) AllExpr() []IExprContext
- func (s *PowExprContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *PowExprContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *PowExprContext) Expr(i int) IExprContext
- func (s *PowExprContext) GetRuleContext() antlr.RuleContext
- func (s *PowExprContext) POW() antlr.TerminalNode
- type PredefinedConstantAtomContext
- func (s *PredefinedConstantAtomContext) E() antlr.TerminalNode
- func (s *PredefinedConstantAtomContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *PredefinedConstantAtomContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *PredefinedConstantAtomContext) GetRuleContext() antlr.RuleContext
- func (s *PredefinedConstantAtomContext) PI() antlr.TerminalNode
- type ProgContext
- type ProgExprContext
- func (s *ProgExprContext) AllExpr() []IExprContext
- func (s *ProgExprContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *ProgExprContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *ProgExprContext) Expr(i int) IExprContext
- func (s *ProgExprContext) GetRuleContext() antlr.RuleContext
- type RelationalExprContext
- func (s *RelationalExprContext) AllExpr() []IExprContext
- func (s *RelationalExprContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *RelationalExprContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *RelationalExprContext) Expr(i int) IExprContext
- func (s *RelationalExprContext) GT() antlr.TerminalNode
- func (s *RelationalExprContext) GTEQ() antlr.TerminalNode
- func (s *RelationalExprContext) GetOp() antlr.Token
- func (s *RelationalExprContext) GetRuleContext() antlr.RuleContext
- func (s *RelationalExprContext) LT() antlr.TerminalNode
- func (s *RelationalExprContext) LTEQ() antlr.TerminalNode
- func (s *RelationalExprContext) SetOp(v antlr.Token)
- type UnaryMinusExprContext
- func (s *UnaryMinusExprContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *UnaryMinusExprContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *UnaryMinusExprContext) Expr() IExprContext
- func (s *UnaryMinusExprContext) GetRuleContext() antlr.RuleContext
- func (s *UnaryMinusExprContext) SUB() antlr.TerminalNode
Examples ¶
Constants ¶
const ( MuParserLexerT__0 = 1 MuParserLexerT__1 = 2 MuParserLexerFUNCTION = 3 MuParserLexerFUNCTIONMULTI = 4 MuParserLexerASSIGN = 5 MuParserLexerASSIGNADD = 6 MuParserLexerASSIGNSUB = 7 MuParserLexerASSIGNMUL = 8 MuParserLexerASSIGNDIV = 9 MuParserLexerAND = 10 MuParserLexerOR = 11 MuParserLexerLTEQ = 12 MuParserLexerGTEQ = 13 MuParserLexerNEQ = 14 MuParserLexerEQ = 15 MuParserLexerLT = 16 MuParserLexerGT = 17 MuParserLexerADD = 18 MuParserLexerSUB = 19 MuParserLexerMUL = 20 MuParserLexerDIV = 21 MuParserLexerPOW = 22 MuParserLexerNOT = 23 MuParserLexerQUESTION = 24 MuParserLexerCOLON = 25 MuParserLexerOPAR = 26 MuParserLexerCPAR = 27 MuParserLexerINT = 28 MuParserLexerFLOAT = 29 MuParserLexerTRUE = 30 MuParserLexerFALSE = 31 MuParserLexerE = 32 MuParserLexerPI = 33 MuParserLexerID = 34 MuParserLexerSPACE = 35 )
MuParserLexer tokens.
const ( MuParserParserEOF = antlr.TokenEOF MuParserParserT__0 = 1 MuParserParserT__1 = 2 MuParserParserFUNCTION = 3 MuParserParserFUNCTIONMULTI = 4 MuParserParserASSIGN = 5 MuParserParserASSIGNADD = 6 MuParserParserASSIGNSUB = 7 MuParserParserASSIGNMUL = 8 MuParserParserASSIGNDIV = 9 MuParserParserAND = 10 MuParserParserOR = 11 MuParserParserLTEQ = 12 MuParserParserGTEQ = 13 MuParserParserNEQ = 14 MuParserParserEQ = 15 MuParserParserLT = 16 MuParserParserGT = 17 MuParserParserADD = 18 MuParserParserSUB = 19 MuParserParserMUL = 20 MuParserParserDIV = 21 MuParserParserPOW = 22 MuParserParserNOT = 23 MuParserParserQUESTION = 24 MuParserParserCOLON = 25 MuParserParserOPAR = 26 MuParserParserCPAR = 27 MuParserParserINT = 28 MuParserParserFLOAT = 29 MuParserParserTRUE = 30 MuParserParserFALSE = 31 MuParserParserE = 32 MuParserParserPI = 33 MuParserParserID = 34 MuParserParserSPACE = 35 )
MuParserParser tokens.
const ( MuParserParserRULE_prog = 0 MuParserParserRULE_expr = 1 MuParserParserRULE_atom = 2 )
MuParserParser rules.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddSubExprContext ¶
type AddSubExprContext struct { *ExprContext // contains filtered or unexported fields }
func NewAddSubExprContext ¶
func NewAddSubExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *AddSubExprContext
func (*AddSubExprContext) ADD ¶
func (s *AddSubExprContext) ADD() antlr.TerminalNode
func (*AddSubExprContext) AllExpr ¶
func (s *AddSubExprContext) AllExpr() []IExprContext
func (*AddSubExprContext) EnterRule ¶
func (s *AddSubExprContext) EnterRule(listener antlr.ParseTreeListener)
func (*AddSubExprContext) ExitRule ¶
func (s *AddSubExprContext) ExitRule(listener antlr.ParseTreeListener)
func (*AddSubExprContext) Expr ¶
func (s *AddSubExprContext) Expr(i int) IExprContext
func (*AddSubExprContext) GetOp ¶
func (s *AddSubExprContext) GetOp() antlr.Token
func (*AddSubExprContext) GetRuleContext ¶
func (s *AddSubExprContext) GetRuleContext() antlr.RuleContext
func (*AddSubExprContext) SUB ¶
func (s *AddSubExprContext) SUB() antlr.TerminalNode
func (*AddSubExprContext) SetOp ¶
func (s *AddSubExprContext) SetOp(v antlr.Token)
type AndExprContext ¶
type AndExprContext struct {
*ExprContext
}
func NewAndExprContext ¶
func NewAndExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *AndExprContext
func (*AndExprContext) AND ¶
func (s *AndExprContext) AND() antlr.TerminalNode
func (*AndExprContext) AllExpr ¶
func (s *AndExprContext) AllExpr() []IExprContext
func (*AndExprContext) EnterRule ¶
func (s *AndExprContext) EnterRule(listener antlr.ParseTreeListener)
func (*AndExprContext) ExitRule ¶
func (s *AndExprContext) ExitRule(listener antlr.ParseTreeListener)
func (*AndExprContext) Expr ¶
func (s *AndExprContext) Expr(i int) IExprContext
func (*AndExprContext) GetRuleContext ¶
func (s *AndExprContext) GetRuleContext() antlr.RuleContext
type AssignExprContext ¶
type AssignExprContext struct { *ExprContext // contains filtered or unexported fields }
func NewAssignExprContext ¶
func NewAssignExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *AssignExprContext
func (*AssignExprContext) ASSIGN ¶
func (s *AssignExprContext) ASSIGN() antlr.TerminalNode
func (*AssignExprContext) ASSIGNADD ¶
func (s *AssignExprContext) ASSIGNADD() antlr.TerminalNode
func (*AssignExprContext) ASSIGNDIV ¶
func (s *AssignExprContext) ASSIGNDIV() antlr.TerminalNode
func (*AssignExprContext) ASSIGNMUL ¶
func (s *AssignExprContext) ASSIGNMUL() antlr.TerminalNode
func (*AssignExprContext) ASSIGNSUB ¶
func (s *AssignExprContext) ASSIGNSUB() antlr.TerminalNode
func (*AssignExprContext) EnterRule ¶
func (s *AssignExprContext) EnterRule(listener antlr.ParseTreeListener)
func (*AssignExprContext) ExitRule ¶
func (s *AssignExprContext) ExitRule(listener antlr.ParseTreeListener)
func (*AssignExprContext) Expr ¶
func (s *AssignExprContext) Expr() IExprContext
func (*AssignExprContext) GetOp ¶
func (s *AssignExprContext) GetOp() antlr.Token
func (*AssignExprContext) GetRuleContext ¶
func (s *AssignExprContext) GetRuleContext() antlr.RuleContext
func (*AssignExprContext) ID ¶
func (s *AssignExprContext) ID() antlr.TerminalNode
func (*AssignExprContext) SetOp ¶
func (s *AssignExprContext) SetOp(v antlr.Token)
type AtomContext ¶
type AtomContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewAtomContext ¶
func NewAtomContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AtomContext
func NewEmptyAtomContext ¶
func NewEmptyAtomContext() *AtomContext
func (*AtomContext) CopyFrom ¶
func (s *AtomContext) CopyFrom(ctx *AtomContext)
func (*AtomContext) GetParser ¶
func (s *AtomContext) GetParser() antlr.Parser
func (*AtomContext) GetRuleContext ¶
func (s *AtomContext) GetRuleContext() antlr.RuleContext
func (*AtomContext) IsAtomContext ¶
func (*AtomContext) IsAtomContext()
func (*AtomContext) ToStringTree ¶
func (s *AtomContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type AtomExprContext ¶
type AtomExprContext struct {
*ExprContext
}
func NewAtomExprContext ¶
func NewAtomExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *AtomExprContext
func (*AtomExprContext) Atom ¶
func (s *AtomExprContext) Atom() IAtomContext
func (*AtomExprContext) EnterRule ¶
func (s *AtomExprContext) EnterRule(listener antlr.ParseTreeListener)
func (*AtomExprContext) ExitRule ¶
func (s *AtomExprContext) ExitRule(listener antlr.ParseTreeListener)
func (*AtomExprContext) GetRuleContext ¶
func (s *AtomExprContext) GetRuleContext() antlr.RuleContext
type BaseMuParserListener ¶
type BaseMuParserListener struct{}
BaseMuParserListener is a complete listener for a parse tree produced by MuParserParser.
func (*BaseMuParserListener) EnterAddSubExpr ¶
func (s *BaseMuParserListener) EnterAddSubExpr(ctx *AddSubExprContext)
EnterAddSubExpr is called when production addSubExpr is entered.
func (*BaseMuParserListener) EnterAndExpr ¶
func (s *BaseMuParserListener) EnterAndExpr(ctx *AndExprContext)
EnterAndExpr is called when production andExpr is entered.
func (*BaseMuParserListener) EnterAssignExpr ¶
func (s *BaseMuParserListener) EnterAssignExpr(ctx *AssignExprContext)
EnterAssignExpr is called when production assignExpr is entered.
func (*BaseMuParserListener) EnterAtomExpr ¶
func (s *BaseMuParserListener) EnterAtomExpr(ctx *AtomExprContext)
EnterAtomExpr is called when production atomExpr is entered.
func (*BaseMuParserListener) EnterBooleanAtom ¶
func (s *BaseMuParserListener) EnterBooleanAtom(ctx *BooleanAtomContext)
EnterBooleanAtom is called when production booleanAtom is entered.
func (*BaseMuParserListener) EnterEqualityExpr ¶
func (s *BaseMuParserListener) EnterEqualityExpr(ctx *EqualityExprContext)
EnterEqualityExpr is called when production equalityExpr is entered.
func (*BaseMuParserListener) EnterEveryRule ¶
func (s *BaseMuParserListener) EnterEveryRule(ctx antlr.ParserRuleContext)
EnterEveryRule is called when any rule is entered.
func (*BaseMuParserListener) EnterFunctionExpr ¶
func (s *BaseMuParserListener) EnterFunctionExpr(ctx *FunctionExprContext)
EnterFunctionExpr is called when production functionExpr is entered.
func (*BaseMuParserListener) EnterFunctionMultiExpr ¶
func (s *BaseMuParserListener) EnterFunctionMultiExpr(ctx *FunctionMultiExprContext)
EnterFunctionMultiExpr is called when production functionMultiExpr is entered.
func (*BaseMuParserListener) EnterIdAtom ¶
func (s *BaseMuParserListener) EnterIdAtom(ctx *IdAtomContext)
EnterIdAtom is called when production idAtom is entered.
func (*BaseMuParserListener) EnterIteExpr ¶
func (s *BaseMuParserListener) EnterIteExpr(ctx *IteExprContext)
EnterIteExpr is called when production iteExpr is entered.
func (*BaseMuParserListener) EnterMulDivExpr ¶
func (s *BaseMuParserListener) EnterMulDivExpr(ctx *MulDivExprContext)
EnterMulDivExpr is called when production mulDivExpr is entered.
func (*BaseMuParserListener) EnterNumberAtom ¶
func (s *BaseMuParserListener) EnterNumberAtom(ctx *NumberAtomContext)
EnterNumberAtom is called when production numberAtom is entered.
func (*BaseMuParserListener) EnterOrExpr ¶
func (s *BaseMuParserListener) EnterOrExpr(ctx *OrExprContext)
EnterOrExpr is called when production orExpr is entered.
func (*BaseMuParserListener) EnterParExpr ¶
func (s *BaseMuParserListener) EnterParExpr(ctx *ParExprContext)
EnterParExpr is called when production parExpr is entered.
func (*BaseMuParserListener) EnterPowExpr ¶
func (s *BaseMuParserListener) EnterPowExpr(ctx *PowExprContext)
EnterPowExpr is called when production powExpr is entered.
func (*BaseMuParserListener) EnterPredefinedConstantAtom ¶
func (s *BaseMuParserListener) EnterPredefinedConstantAtom(ctx *PredefinedConstantAtomContext)
EnterPredefinedConstantAtom is called when production predefinedConstantAtom is entered.
func (*BaseMuParserListener) EnterProgExpr ¶
func (s *BaseMuParserListener) EnterProgExpr(ctx *ProgExprContext)
EnterProgExpr is called when production progExpr is entered.
func (*BaseMuParserListener) EnterRelationalExpr ¶
func (s *BaseMuParserListener) EnterRelationalExpr(ctx *RelationalExprContext)
EnterRelationalExpr is called when production relationalExpr is entered.
func (*BaseMuParserListener) EnterUnaryMinusExpr ¶
func (s *BaseMuParserListener) EnterUnaryMinusExpr(ctx *UnaryMinusExprContext)
EnterUnaryMinusExpr is called when production unaryMinusExpr is entered.
func (*BaseMuParserListener) ExitAddSubExpr ¶
func (s *BaseMuParserListener) ExitAddSubExpr(ctx *AddSubExprContext)
ExitAddSubExpr is called when production addSubExpr is exited.
func (*BaseMuParserListener) ExitAndExpr ¶
func (s *BaseMuParserListener) ExitAndExpr(ctx *AndExprContext)
ExitAndExpr is called when production andExpr is exited.
func (*BaseMuParserListener) ExitAssignExpr ¶
func (s *BaseMuParserListener) ExitAssignExpr(ctx *AssignExprContext)
ExitAssignExpr is called when production assignExpr is exited.
func (*BaseMuParserListener) ExitAtomExpr ¶
func (s *BaseMuParserListener) ExitAtomExpr(ctx *AtomExprContext)
ExitAtomExpr is called when production atomExpr is exited.
func (*BaseMuParserListener) ExitBooleanAtom ¶
func (s *BaseMuParserListener) ExitBooleanAtom(ctx *BooleanAtomContext)
ExitBooleanAtom is called when production booleanAtom is exited.
func (*BaseMuParserListener) ExitEqualityExpr ¶
func (s *BaseMuParserListener) ExitEqualityExpr(ctx *EqualityExprContext)
ExitEqualityExpr is called when production equalityExpr is exited.
func (*BaseMuParserListener) ExitEveryRule ¶
func (s *BaseMuParserListener) ExitEveryRule(ctx antlr.ParserRuleContext)
ExitEveryRule is called when any rule is exited.
func (*BaseMuParserListener) ExitFunctionExpr ¶
func (s *BaseMuParserListener) ExitFunctionExpr(ctx *FunctionExprContext)
ExitFunctionExpr is called when production functionExpr is exited.
func (*BaseMuParserListener) ExitFunctionMultiExpr ¶
func (s *BaseMuParserListener) ExitFunctionMultiExpr(ctx *FunctionMultiExprContext)
ExitFunctionMultiExpr is called when production functionMultiExpr is exited.
func (*BaseMuParserListener) ExitIdAtom ¶
func (s *BaseMuParserListener) ExitIdAtom(ctx *IdAtomContext)
ExitIdAtom is called when production idAtom is exited.
func (*BaseMuParserListener) ExitIteExpr ¶
func (s *BaseMuParserListener) ExitIteExpr(ctx *IteExprContext)
ExitIteExpr is called when production iteExpr is exited.
func (*BaseMuParserListener) ExitMulDivExpr ¶
func (s *BaseMuParserListener) ExitMulDivExpr(ctx *MulDivExprContext)
ExitMulDivExpr is called when production mulDivExpr is exited.
func (*BaseMuParserListener) ExitNumberAtom ¶
func (s *BaseMuParserListener) ExitNumberAtom(ctx *NumberAtomContext)
ExitNumberAtom is called when production numberAtom is exited.
func (*BaseMuParserListener) ExitOrExpr ¶
func (s *BaseMuParserListener) ExitOrExpr(ctx *OrExprContext)
ExitOrExpr is called when production orExpr is exited.
func (*BaseMuParserListener) ExitParExpr ¶
func (s *BaseMuParserListener) ExitParExpr(ctx *ParExprContext)
ExitParExpr is called when production parExpr is exited.
func (*BaseMuParserListener) ExitPowExpr ¶
func (s *BaseMuParserListener) ExitPowExpr(ctx *PowExprContext)
ExitPowExpr is called when production powExpr is exited.
func (*BaseMuParserListener) ExitPredefinedConstantAtom ¶
func (s *BaseMuParserListener) ExitPredefinedConstantAtom(ctx *PredefinedConstantAtomContext)
ExitPredefinedConstantAtom is called when production predefinedConstantAtom is exited.
func (*BaseMuParserListener) ExitProgExpr ¶
func (s *BaseMuParserListener) ExitProgExpr(ctx *ProgExprContext)
ExitProgExpr is called when production progExpr is exited.
func (*BaseMuParserListener) ExitRelationalExpr ¶
func (s *BaseMuParserListener) ExitRelationalExpr(ctx *RelationalExprContext)
ExitRelationalExpr is called when production relationalExpr is exited.
func (*BaseMuParserListener) ExitUnaryMinusExpr ¶
func (s *BaseMuParserListener) ExitUnaryMinusExpr(ctx *UnaryMinusExprContext)
ExitUnaryMinusExpr is called when production unaryMinusExpr is exited.
func (*BaseMuParserListener) VisitErrorNode ¶
func (s *BaseMuParserListener) VisitErrorNode(node antlr.ErrorNode)
VisitErrorNode is called when an error node is visited.
func (*BaseMuParserListener) VisitTerminal ¶
func (s *BaseMuParserListener) VisitTerminal(node antlr.TerminalNode)
VisitTerminal is called when a terminal node is visited.
type BooleanAtomContext ¶
type BooleanAtomContext struct {
*AtomContext
}
func NewBooleanAtomContext ¶
func NewBooleanAtomContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *BooleanAtomContext
func (*BooleanAtomContext) EnterRule ¶
func (s *BooleanAtomContext) EnterRule(listener antlr.ParseTreeListener)
func (*BooleanAtomContext) ExitRule ¶
func (s *BooleanAtomContext) ExitRule(listener antlr.ParseTreeListener)
func (*BooleanAtomContext) FALSE ¶
func (s *BooleanAtomContext) FALSE() antlr.TerminalNode
func (*BooleanAtomContext) GetRuleContext ¶
func (s *BooleanAtomContext) GetRuleContext() antlr.RuleContext
func (*BooleanAtomContext) TRUE ¶
func (s *BooleanAtomContext) TRUE() antlr.TerminalNode
type EqualityExprContext ¶
type EqualityExprContext struct { *ExprContext // contains filtered or unexported fields }
func NewEqualityExprContext ¶
func NewEqualityExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *EqualityExprContext
func (*EqualityExprContext) AllExpr ¶
func (s *EqualityExprContext) AllExpr() []IExprContext
func (*EqualityExprContext) EQ ¶
func (s *EqualityExprContext) EQ() antlr.TerminalNode
func (*EqualityExprContext) EnterRule ¶
func (s *EqualityExprContext) EnterRule(listener antlr.ParseTreeListener)
func (*EqualityExprContext) ExitRule ¶
func (s *EqualityExprContext) ExitRule(listener antlr.ParseTreeListener)
func (*EqualityExprContext) Expr ¶
func (s *EqualityExprContext) Expr(i int) IExprContext
func (*EqualityExprContext) GetOp ¶
func (s *EqualityExprContext) GetOp() antlr.Token
func (*EqualityExprContext) GetRuleContext ¶
func (s *EqualityExprContext) GetRuleContext() antlr.RuleContext
func (*EqualityExprContext) NEQ ¶
func (s *EqualityExprContext) NEQ() antlr.TerminalNode
func (*EqualityExprContext) SetOp ¶
func (s *EqualityExprContext) SetOp(v antlr.Token)
type ExprContext ¶
type ExprContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyExprContext ¶
func NewEmptyExprContext() *ExprContext
func NewExprContext ¶
func NewExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExprContext
func (*ExprContext) CopyFrom ¶
func (s *ExprContext) CopyFrom(ctx *ExprContext)
func (*ExprContext) GetParser ¶
func (s *ExprContext) GetParser() antlr.Parser
func (*ExprContext) GetRuleContext ¶
func (s *ExprContext) GetRuleContext() antlr.RuleContext
func (*ExprContext) IsExprContext ¶
func (*ExprContext) IsExprContext()
func (*ExprContext) ToStringTree ¶
func (s *ExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type FunctionExprContext ¶
type FunctionExprContext struct { *ExprContext // contains filtered or unexported fields }
func NewFunctionExprContext ¶
func NewFunctionExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *FunctionExprContext
func (*FunctionExprContext) CPAR ¶
func (s *FunctionExprContext) CPAR() antlr.TerminalNode
func (*FunctionExprContext) EnterRule ¶
func (s *FunctionExprContext) EnterRule(listener antlr.ParseTreeListener)
func (*FunctionExprContext) ExitRule ¶
func (s *FunctionExprContext) ExitRule(listener antlr.ParseTreeListener)
func (*FunctionExprContext) Expr ¶
func (s *FunctionExprContext) Expr() IExprContext
func (*FunctionExprContext) FUNCTION ¶
func (s *FunctionExprContext) FUNCTION() antlr.TerminalNode
func (*FunctionExprContext) GetOp ¶
func (s *FunctionExprContext) GetOp() antlr.Token
func (*FunctionExprContext) GetRuleContext ¶
func (s *FunctionExprContext) GetRuleContext() antlr.RuleContext
func (*FunctionExprContext) OPAR ¶
func (s *FunctionExprContext) OPAR() antlr.TerminalNode
func (*FunctionExprContext) SetOp ¶
func (s *FunctionExprContext) SetOp(v antlr.Token)
type FunctionMultiExprContext ¶
type FunctionMultiExprContext struct { *ExprContext // contains filtered or unexported fields }
func NewFunctionMultiExprContext ¶
func NewFunctionMultiExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *FunctionMultiExprContext
func (*FunctionMultiExprContext) AllExpr ¶
func (s *FunctionMultiExprContext) AllExpr() []IExprContext
func (*FunctionMultiExprContext) CPAR ¶
func (s *FunctionMultiExprContext) CPAR() antlr.TerminalNode
func (*FunctionMultiExprContext) EnterRule ¶
func (s *FunctionMultiExprContext) EnterRule(listener antlr.ParseTreeListener)
func (*FunctionMultiExprContext) ExitRule ¶
func (s *FunctionMultiExprContext) ExitRule(listener antlr.ParseTreeListener)
func (*FunctionMultiExprContext) Expr ¶
func (s *FunctionMultiExprContext) Expr(i int) IExprContext
func (*FunctionMultiExprContext) FUNCTIONMULTI ¶
func (s *FunctionMultiExprContext) FUNCTIONMULTI() antlr.TerminalNode
func (*FunctionMultiExprContext) GetOp ¶
func (s *FunctionMultiExprContext) GetOp() antlr.Token
func (*FunctionMultiExprContext) GetRuleContext ¶
func (s *FunctionMultiExprContext) GetRuleContext() antlr.RuleContext
func (*FunctionMultiExprContext) OPAR ¶
func (s *FunctionMultiExprContext) OPAR() antlr.TerminalNode
func (*FunctionMultiExprContext) SetOp ¶
func (s *FunctionMultiExprContext) SetOp(v antlr.Token)
type IAtomContext ¶
type IAtomContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsAtomContext differentiates from other interfaces. IsAtomContext() }
IAtomContext is an interface to support dynamic dispatch.
type IExprContext ¶
type IExprContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsExprContext differentiates from other interfaces. IsExprContext() }
IExprContext is an interface to support dynamic dispatch.
type IProgContext ¶
type IProgContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsProgContext differentiates from other interfaces. IsProgContext() }
IProgContext is an interface to support dynamic dispatch.
type IdAtomContext ¶
type IdAtomContext struct {
*AtomContext
}
func NewIdAtomContext ¶
func NewIdAtomContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *IdAtomContext
func (*IdAtomContext) EnterRule ¶
func (s *IdAtomContext) EnterRule(listener antlr.ParseTreeListener)
func (*IdAtomContext) ExitRule ¶
func (s *IdAtomContext) ExitRule(listener antlr.ParseTreeListener)
func (*IdAtomContext) GetRuleContext ¶
func (s *IdAtomContext) GetRuleContext() antlr.RuleContext
func (*IdAtomContext) ID ¶
func (s *IdAtomContext) ID() antlr.TerminalNode
type IteExprContext ¶
type IteExprContext struct {
*ExprContext
}
func NewIteExprContext ¶
func NewIteExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *IteExprContext
func (*IteExprContext) AllExpr ¶
func (s *IteExprContext) AllExpr() []IExprContext
func (*IteExprContext) COLON ¶
func (s *IteExprContext) COLON() antlr.TerminalNode
func (*IteExprContext) EnterRule ¶
func (s *IteExprContext) EnterRule(listener antlr.ParseTreeListener)
func (*IteExprContext) ExitRule ¶
func (s *IteExprContext) ExitRule(listener antlr.ParseTreeListener)
func (*IteExprContext) Expr ¶
func (s *IteExprContext) Expr(i int) IExprContext
func (*IteExprContext) GetRuleContext ¶
func (s *IteExprContext) GetRuleContext() antlr.RuleContext
func (*IteExprContext) QUESTION ¶
func (s *IteExprContext) QUESTION() antlr.TerminalNode
type MuParserLexer ¶
func NewMuParserLexer ¶
func NewMuParserLexer(input antlr.CharStream) *MuParserLexer
type MuParserListener ¶
type MuParserListener interface { antlr.ParseTreeListener // EnterProgExpr is called when entering the progExpr production. EnterProgExpr(c *ProgExprContext) // EnterFunctionMultiExpr is called when entering the functionMultiExpr production. EnterFunctionMultiExpr(c *FunctionMultiExprContext) // EnterAddSubExpr is called when entering the addSubExpr production. EnterAddSubExpr(c *AddSubExprContext) // EnterAtomExpr is called when entering the atomExpr production. EnterAtomExpr(c *AtomExprContext) // EnterOrExpr is called when entering the orExpr production. EnterOrExpr(c *OrExprContext) // EnterRelationalExpr is called when entering the relationalExpr production. EnterRelationalExpr(c *RelationalExprContext) // EnterFunctionExpr is called when entering the functionExpr production. EnterFunctionExpr(c *FunctionExprContext) // EnterUnaryMinusExpr is called when entering the unaryMinusExpr production. EnterUnaryMinusExpr(c *UnaryMinusExprContext) // EnterPowExpr is called when entering the powExpr production. EnterPowExpr(c *PowExprContext) // EnterAssignExpr is called when entering the assignExpr production. EnterAssignExpr(c *AssignExprContext) // EnterMulDivExpr is called when entering the mulDivExpr production. EnterMulDivExpr(c *MulDivExprContext) // EnterEqualityExpr is called when entering the equalityExpr production. EnterEqualityExpr(c *EqualityExprContext) // EnterAndExpr is called when entering the andExpr production. EnterAndExpr(c *AndExprContext) // EnterIteExpr is called when entering the iteExpr production. EnterIteExpr(c *IteExprContext) // EnterParExpr is called when entering the parExpr production. EnterParExpr(c *ParExprContext) // EnterNumberAtom is called when entering the numberAtom production. EnterNumberAtom(c *NumberAtomContext) // EnterBooleanAtom is called when entering the booleanAtom production. EnterBooleanAtom(c *BooleanAtomContext) // EnterPredefinedConstantAtom is called when entering the predefinedConstantAtom production. EnterPredefinedConstantAtom(c *PredefinedConstantAtomContext) // EnterIdAtom is called when entering the idAtom production. EnterIdAtom(c *IdAtomContext) // ExitProgExpr is called when exiting the progExpr production. ExitProgExpr(c *ProgExprContext) // ExitFunctionMultiExpr is called when exiting the functionMultiExpr production. ExitFunctionMultiExpr(c *FunctionMultiExprContext) // ExitAddSubExpr is called when exiting the addSubExpr production. ExitAddSubExpr(c *AddSubExprContext) // ExitAtomExpr is called when exiting the atomExpr production. ExitAtomExpr(c *AtomExprContext) // ExitOrExpr is called when exiting the orExpr production. ExitOrExpr(c *OrExprContext) // ExitRelationalExpr is called when exiting the relationalExpr production. ExitRelationalExpr(c *RelationalExprContext) // ExitFunctionExpr is called when exiting the functionExpr production. ExitFunctionExpr(c *FunctionExprContext) // ExitUnaryMinusExpr is called when exiting the unaryMinusExpr production. ExitUnaryMinusExpr(c *UnaryMinusExprContext) // ExitPowExpr is called when exiting the powExpr production. ExitPowExpr(c *PowExprContext) // ExitAssignExpr is called when exiting the assignExpr production. ExitAssignExpr(c *AssignExprContext) // ExitMulDivExpr is called when exiting the mulDivExpr production. ExitMulDivExpr(c *MulDivExprContext) // ExitEqualityExpr is called when exiting the equalityExpr production. ExitEqualityExpr(c *EqualityExprContext) // ExitAndExpr is called when exiting the andExpr production. ExitAndExpr(c *AndExprContext) // ExitIteExpr is called when exiting the iteExpr production. ExitIteExpr(c *IteExprContext) // ExitParExpr is called when exiting the parExpr production. ExitParExpr(c *ParExprContext) // ExitNumberAtom is called when exiting the numberAtom production. ExitNumberAtom(c *NumberAtomContext) // ExitBooleanAtom is called when exiting the booleanAtom production. ExitBooleanAtom(c *BooleanAtomContext) // ExitPredefinedConstantAtom is called when exiting the predefinedConstantAtom production. ExitPredefinedConstantAtom(c *PredefinedConstantAtomContext) // ExitIdAtom is called when exiting the idAtom production. ExitIdAtom(c *IdAtomContext) }
MuParserListener is a complete listener for a parse tree produced by MuParserParser.
type MuParserParser ¶
type MuParserParser struct {
*antlr.BaseParser
}
func NewMuParserParser ¶
func NewMuParserParser(input antlr.TokenStream) *MuParserParser
func (*MuParserParser) Atom ¶
func (p *MuParserParser) Atom() (localctx IAtomContext)
func (*MuParserParser) Expr ¶
func (p *MuParserParser) Expr() (localctx IExprContext)
func (*MuParserParser) Expr_Sempred ¶
func (p *MuParserParser) Expr_Sempred(localctx antlr.RuleContext, predIndex int) bool
func (*MuParserParser) Prog ¶
func (p *MuParserParser) Prog() (localctx IProgContext)
func (*MuParserParser) Sempred ¶
func (p *MuParserParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool
type MulDivExprContext ¶
type MulDivExprContext struct { *ExprContext // contains filtered or unexported fields }
func NewMulDivExprContext ¶
func NewMulDivExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *MulDivExprContext
func (*MulDivExprContext) AllExpr ¶
func (s *MulDivExprContext) AllExpr() []IExprContext
func (*MulDivExprContext) DIV ¶
func (s *MulDivExprContext) DIV() antlr.TerminalNode
func (*MulDivExprContext) EnterRule ¶
func (s *MulDivExprContext) EnterRule(listener antlr.ParseTreeListener)
func (*MulDivExprContext) ExitRule ¶
func (s *MulDivExprContext) ExitRule(listener antlr.ParseTreeListener)
func (*MulDivExprContext) Expr ¶
func (s *MulDivExprContext) Expr(i int) IExprContext
func (*MulDivExprContext) GetOp ¶
func (s *MulDivExprContext) GetOp() antlr.Token
func (*MulDivExprContext) GetRuleContext ¶
func (s *MulDivExprContext) GetRuleContext() antlr.RuleContext
func (*MulDivExprContext) MUL ¶
func (s *MulDivExprContext) MUL() antlr.TerminalNode
func (*MulDivExprContext) SetOp ¶
func (s *MulDivExprContext) SetOp(v antlr.Token)
type NumberAtomContext ¶
type NumberAtomContext struct {
*AtomContext
}
func NewNumberAtomContext ¶
func NewNumberAtomContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *NumberAtomContext
func (*NumberAtomContext) EnterRule ¶
func (s *NumberAtomContext) EnterRule(listener antlr.ParseTreeListener)
func (*NumberAtomContext) ExitRule ¶
func (s *NumberAtomContext) ExitRule(listener antlr.ParseTreeListener)
func (*NumberAtomContext) FLOAT ¶
func (s *NumberAtomContext) FLOAT() antlr.TerminalNode
func (*NumberAtomContext) GetRuleContext ¶
func (s *NumberAtomContext) GetRuleContext() antlr.RuleContext
func (*NumberAtomContext) INT ¶
func (s *NumberAtomContext) INT() antlr.TerminalNode
type OrExprContext ¶
type OrExprContext struct {
*ExprContext
}
func NewOrExprContext ¶
func NewOrExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *OrExprContext
func (*OrExprContext) AllExpr ¶
func (s *OrExprContext) AllExpr() []IExprContext
func (*OrExprContext) EnterRule ¶
func (s *OrExprContext) EnterRule(listener antlr.ParseTreeListener)
func (*OrExprContext) ExitRule ¶
func (s *OrExprContext) ExitRule(listener antlr.ParseTreeListener)
func (*OrExprContext) Expr ¶
func (s *OrExprContext) Expr(i int) IExprContext
func (*OrExprContext) GetRuleContext ¶
func (s *OrExprContext) GetRuleContext() antlr.RuleContext
func (*OrExprContext) OR ¶
func (s *OrExprContext) OR() antlr.TerminalNode
type ParExprContext ¶
type ParExprContext struct {
*AtomContext
}
func NewParExprContext ¶
func NewParExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ParExprContext
func (*ParExprContext) CPAR ¶
func (s *ParExprContext) CPAR() antlr.TerminalNode
func (*ParExprContext) EnterRule ¶
func (s *ParExprContext) EnterRule(listener antlr.ParseTreeListener)
func (*ParExprContext) ExitRule ¶
func (s *ParExprContext) ExitRule(listener antlr.ParseTreeListener)
func (*ParExprContext) Expr ¶
func (s *ParExprContext) Expr() IExprContext
func (*ParExprContext) GetRuleContext ¶
func (s *ParExprContext) GetRuleContext() antlr.RuleContext
func (*ParExprContext) OPAR ¶
func (s *ParExprContext) OPAR() antlr.TerminalNode
type PowExprContext ¶
type PowExprContext struct {
*ExprContext
}
func NewPowExprContext ¶
func NewPowExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *PowExprContext
func (*PowExprContext) AllExpr ¶
func (s *PowExprContext) AllExpr() []IExprContext
func (*PowExprContext) EnterRule ¶
func (s *PowExprContext) EnterRule(listener antlr.ParseTreeListener)
func (*PowExprContext) ExitRule ¶
func (s *PowExprContext) ExitRule(listener antlr.ParseTreeListener)
func (*PowExprContext) Expr ¶
func (s *PowExprContext) Expr(i int) IExprContext
func (*PowExprContext) GetRuleContext ¶
func (s *PowExprContext) GetRuleContext() antlr.RuleContext
func (*PowExprContext) POW ¶
func (s *PowExprContext) POW() antlr.TerminalNode
type PredefinedConstantAtomContext ¶
type PredefinedConstantAtomContext struct {
*AtomContext
}
func NewPredefinedConstantAtomContext ¶
func NewPredefinedConstantAtomContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *PredefinedConstantAtomContext
func (*PredefinedConstantAtomContext) E ¶
func (s *PredefinedConstantAtomContext) E() antlr.TerminalNode
func (*PredefinedConstantAtomContext) EnterRule ¶
func (s *PredefinedConstantAtomContext) EnterRule(listener antlr.ParseTreeListener)
func (*PredefinedConstantAtomContext) ExitRule ¶
func (s *PredefinedConstantAtomContext) ExitRule(listener antlr.ParseTreeListener)
func (*PredefinedConstantAtomContext) GetRuleContext ¶
func (s *PredefinedConstantAtomContext) GetRuleContext() antlr.RuleContext
func (*PredefinedConstantAtomContext) PI ¶
func (s *PredefinedConstantAtomContext) PI() antlr.TerminalNode
type ProgContext ¶
type ProgContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyProgContext ¶
func NewEmptyProgContext() *ProgContext
func NewProgContext ¶
func NewProgContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ProgContext
func (*ProgContext) CopyFrom ¶
func (s *ProgContext) CopyFrom(ctx *ProgContext)
func (*ProgContext) GetParser ¶
func (s *ProgContext) GetParser() antlr.Parser
func (*ProgContext) GetRuleContext ¶
func (s *ProgContext) GetRuleContext() antlr.RuleContext
func (*ProgContext) IsProgContext ¶
func (*ProgContext) IsProgContext()
func (*ProgContext) ToStringTree ¶
func (s *ProgContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type ProgExprContext ¶
type ProgExprContext struct {
*ProgContext
}
func NewProgExprContext ¶
func NewProgExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ProgExprContext
func (*ProgExprContext) AllExpr ¶
func (s *ProgExprContext) AllExpr() []IExprContext
func (*ProgExprContext) EnterRule ¶
func (s *ProgExprContext) EnterRule(listener antlr.ParseTreeListener)
func (*ProgExprContext) ExitRule ¶
func (s *ProgExprContext) ExitRule(listener antlr.ParseTreeListener)
func (*ProgExprContext) Expr ¶
func (s *ProgExprContext) Expr(i int) IExprContext
func (*ProgExprContext) GetRuleContext ¶
func (s *ProgExprContext) GetRuleContext() antlr.RuleContext
type RelationalExprContext ¶
type RelationalExprContext struct { *ExprContext // contains filtered or unexported fields }
func NewRelationalExprContext ¶
func NewRelationalExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RelationalExprContext
func (*RelationalExprContext) AllExpr ¶
func (s *RelationalExprContext) AllExpr() []IExprContext
func (*RelationalExprContext) EnterRule ¶
func (s *RelationalExprContext) EnterRule(listener antlr.ParseTreeListener)
func (*RelationalExprContext) ExitRule ¶
func (s *RelationalExprContext) ExitRule(listener antlr.ParseTreeListener)
func (*RelationalExprContext) Expr ¶
func (s *RelationalExprContext) Expr(i int) IExprContext
func (*RelationalExprContext) GT ¶
func (s *RelationalExprContext) GT() antlr.TerminalNode
func (*RelationalExprContext) GTEQ ¶
func (s *RelationalExprContext) GTEQ() antlr.TerminalNode
func (*RelationalExprContext) GetOp ¶
func (s *RelationalExprContext) GetOp() antlr.Token
func (*RelationalExprContext) GetRuleContext ¶
func (s *RelationalExprContext) GetRuleContext() antlr.RuleContext
func (*RelationalExprContext) LT ¶
func (s *RelationalExprContext) LT() antlr.TerminalNode
func (*RelationalExprContext) LTEQ ¶
func (s *RelationalExprContext) LTEQ() antlr.TerminalNode
func (*RelationalExprContext) SetOp ¶
func (s *RelationalExprContext) SetOp(v antlr.Token)
type UnaryMinusExprContext ¶
type UnaryMinusExprContext struct {
*ExprContext
}
func NewUnaryMinusExprContext ¶
func NewUnaryMinusExprContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *UnaryMinusExprContext
func (*UnaryMinusExprContext) EnterRule ¶
func (s *UnaryMinusExprContext) EnterRule(listener antlr.ParseTreeListener)
func (*UnaryMinusExprContext) ExitRule ¶
func (s *UnaryMinusExprContext) ExitRule(listener antlr.ParseTreeListener)
func (*UnaryMinusExprContext) Expr ¶
func (s *UnaryMinusExprContext) Expr() IExprContext
func (*UnaryMinusExprContext) GetRuleContext ¶
func (s *UnaryMinusExprContext) GetRuleContext() antlr.RuleContext
func (*UnaryMinusExprContext) SUB ¶
func (s *UnaryMinusExprContext) SUB() antlr.TerminalNode