Documentation ¶
Index ¶
- Constants
- type ANDORContext
- func (s *ANDORContext) AND() antlr.TerminalNode
- func (s *ANDORContext) AllExpression() []IExpressionContext
- func (s *ANDORContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *ANDORContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *ANDORContext) Expression(i int) IExpressionContext
- func (s *ANDORContext) GetOp() antlr.Token
- func (s *ANDORContext) GetRuleContext() antlr.RuleContext
- func (s *ANDORContext) LOOP() antlr.TerminalNode
- func (s *ANDORContext) OR() antlr.TerminalNode
- func (s *ANDORContext) SetOp(v antlr.Token)
- type BaseExprListener
- func (s *BaseExprListener) EnterANDOR(ctx *ANDORContext)
- func (s *BaseExprListener) EnterEveryRule(ctx antlr.ParserRuleContext)
- func (s *BaseExprListener) EnterID(ctx *IDContext)
- func (s *BaseExprListener) EnterParenthesis(ctx *ParenthesisContext)
- func (s *BaseExprListener) EnterStart(ctx *StartContext)
- func (s *BaseExprListener) ExitANDOR(ctx *ANDORContext)
- func (s *BaseExprListener) ExitEveryRule(ctx antlr.ParserRuleContext)
- func (s *BaseExprListener) ExitID(ctx *IDContext)
- func (s *BaseExprListener) ExitParenthesis(ctx *ParenthesisContext)
- func (s *BaseExprListener) ExitStart(ctx *StartContext)
- func (s *BaseExprListener) VisitErrorNode(node antlr.ErrorNode)
- func (s *BaseExprListener) VisitTerminal(node antlr.TerminalNode)
- type ExprLexer
- type ExprListener
- type ExprParser
- type ExpressionContext
- func (s *ExpressionContext) CopyFrom(ctx *ExpressionContext)
- func (s *ExpressionContext) GetParser() antlr.Parser
- func (s *ExpressionContext) GetRuleContext() antlr.RuleContext
- func (*ExpressionContext) IsExpressionContext()
- func (s *ExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
- type IDContext
- type IExpressionContext
- type IStartContext
- type ParenthesisContext
- type StartContext
- func (s *StartContext) EOF() antlr.TerminalNode
- func (s *StartContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *StartContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *StartContext) Expression() IExpressionContext
- func (s *StartContext) GetParser() antlr.Parser
- func (s *StartContext) GetRuleContext() antlr.RuleContext
- func (*StartContext) IsStartContext()
- func (s *StartContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
Constants ¶
const ( ExprLexerT__0 = 1 ExprLexerT__1 = 2 ExprLexerAND = 3 ExprLexerOR = 4 ExprLexerLOOP = 5 ExprLexerID = 6 ExprLexerWHITESPACE = 7 )
ExprLexer tokens.
const ( ExprParserEOF = antlr.TokenEOF ExprParserT__0 = 1 ExprParserT__1 = 2 ExprParserAND = 3 ExprParserOR = 4 ExprParserLOOP = 5 ExprParserID = 6 ExprParserWHITESPACE = 7 )
ExprParser tokens.
const ( ExprParserRULE_start = 0 ExprParserRULE_expression = 1 )
ExprParser rules.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ANDORContext ¶
type ANDORContext struct { *ExpressionContext // contains filtered or unexported fields }
func NewANDORContext ¶
func NewANDORContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ANDORContext
func (*ANDORContext) AND ¶
func (s *ANDORContext) AND() antlr.TerminalNode
func (*ANDORContext) AllExpression ¶
func (s *ANDORContext) AllExpression() []IExpressionContext
func (*ANDORContext) EnterRule ¶
func (s *ANDORContext) EnterRule(listener antlr.ParseTreeListener)
func (*ANDORContext) ExitRule ¶
func (s *ANDORContext) ExitRule(listener antlr.ParseTreeListener)
func (*ANDORContext) Expression ¶
func (s *ANDORContext) Expression(i int) IExpressionContext
func (*ANDORContext) GetOp ¶
func (s *ANDORContext) GetOp() antlr.Token
func (*ANDORContext) GetRuleContext ¶
func (s *ANDORContext) GetRuleContext() antlr.RuleContext
func (*ANDORContext) LOOP ¶
func (s *ANDORContext) LOOP() antlr.TerminalNode
func (*ANDORContext) OR ¶
func (s *ANDORContext) OR() antlr.TerminalNode
func (*ANDORContext) SetOp ¶
func (s *ANDORContext) SetOp(v antlr.Token)
type BaseExprListener ¶
type BaseExprListener struct{}
BaseExprListener is a complete listener for a parse tree produced by ExprParser.
func (*BaseExprListener) EnterANDOR ¶
func (s *BaseExprListener) EnterANDOR(ctx *ANDORContext)
EnterANDOR is called when production ANDOR is entered.
func (*BaseExprListener) EnterEveryRule ¶
func (s *BaseExprListener) EnterEveryRule(ctx antlr.ParserRuleContext)
EnterEveryRule is called when any rule is entered.
func (*BaseExprListener) EnterID ¶
func (s *BaseExprListener) EnterID(ctx *IDContext)
EnterID is called when production ID is entered.
func (*BaseExprListener) EnterParenthesis ¶
func (s *BaseExprListener) EnterParenthesis(ctx *ParenthesisContext)
EnterParenthesis is called when production Parenthesis is entered.
func (*BaseExprListener) EnterStart ¶
func (s *BaseExprListener) EnterStart(ctx *StartContext)
EnterStart is called when production start is entered.
func (*BaseExprListener) ExitANDOR ¶
func (s *BaseExprListener) ExitANDOR(ctx *ANDORContext)
ExitANDOR is called when production ANDOR is exited.
func (*BaseExprListener) ExitEveryRule ¶
func (s *BaseExprListener) ExitEveryRule(ctx antlr.ParserRuleContext)
ExitEveryRule is called when any rule is exited.
func (*BaseExprListener) ExitID ¶
func (s *BaseExprListener) ExitID(ctx *IDContext)
ExitID is called when production ID is exited.
func (*BaseExprListener) ExitParenthesis ¶
func (s *BaseExprListener) ExitParenthesis(ctx *ParenthesisContext)
ExitParenthesis is called when production Parenthesis is exited.
func (*BaseExprListener) ExitStart ¶
func (s *BaseExprListener) ExitStart(ctx *StartContext)
ExitStart is called when production start is exited.
func (*BaseExprListener) VisitErrorNode ¶
func (s *BaseExprListener) VisitErrorNode(node antlr.ErrorNode)
VisitErrorNode is called when an error node is visited.
func (*BaseExprListener) VisitTerminal ¶
func (s *BaseExprListener) VisitTerminal(node antlr.TerminalNode)
VisitTerminal is called when a terminal node is visited.
type ExprLexer ¶
func NewExprLexer ¶
func NewExprLexer(input antlr.CharStream) *ExprLexer
type ExprListener ¶
type ExprListener interface { antlr.ParseTreeListener // EnterStart is called when entering the start production. EnterStart(c *StartContext) // EnterParenthesis is called when entering the Parenthesis production. EnterParenthesis(c *ParenthesisContext) // EnterANDOR is called when entering the ANDOR production. EnterANDOR(c *ANDORContext) // EnterID is called when entering the ID production. EnterID(c *IDContext) // ExitStart is called when exiting the start production. ExitStart(c *StartContext) // ExitParenthesis is called when exiting the Parenthesis production. ExitParenthesis(c *ParenthesisContext) // ExitANDOR is called when exiting the ANDOR production. ExitANDOR(c *ANDORContext) // ExitID is called when exiting the ID production. ExitID(c *IDContext) }
ExprListener is a complete listener for a parse tree produced by ExprParser.
type ExprParser ¶
type ExprParser struct {
*antlr.BaseParser
}
func NewExprParser ¶
func NewExprParser(input antlr.TokenStream) *ExprParser
func (*ExprParser) Expression ¶
func (p *ExprParser) Expression() (localctx IExpressionContext)
func (*ExprParser) Expression_Sempred ¶
func (p *ExprParser) Expression_Sempred(localctx antlr.RuleContext, predIndex int) bool
func (*ExprParser) Sempred ¶
func (p *ExprParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool
func (*ExprParser) Start ¶
func (p *ExprParser) Start() (localctx IStartContext)
type ExpressionContext ¶
type ExpressionContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyExpressionContext ¶
func NewEmptyExpressionContext() *ExpressionContext
func NewExpressionContext ¶
func NewExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExpressionContext
func (*ExpressionContext) CopyFrom ¶
func (s *ExpressionContext) CopyFrom(ctx *ExpressionContext)
func (*ExpressionContext) GetParser ¶
func (s *ExpressionContext) GetParser() antlr.Parser
func (*ExpressionContext) GetRuleContext ¶
func (s *ExpressionContext) GetRuleContext() antlr.RuleContext
func (*ExpressionContext) IsExpressionContext ¶
func (*ExpressionContext) IsExpressionContext()
func (*ExpressionContext) ToStringTree ¶
func (s *ExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string
type IDContext ¶
type IDContext struct {
*ExpressionContext
}
func NewIDContext ¶
func NewIDContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *IDContext
func (*IDContext) EnterRule ¶
func (s *IDContext) EnterRule(listener antlr.ParseTreeListener)
func (*IDContext) ExitRule ¶
func (s *IDContext) ExitRule(listener antlr.ParseTreeListener)
func (*IDContext) GetRuleContext ¶
func (s *IDContext) GetRuleContext() antlr.RuleContext
func (*IDContext) ID ¶
func (s *IDContext) ID() antlr.TerminalNode
type IExpressionContext ¶
type IExpressionContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsExpressionContext differentiates from other interfaces. IsExpressionContext() }
IExpressionContext is an interface to support dynamic dispatch.
type IStartContext ¶
type IStartContext interface { antlr.ParserRuleContext // GetParser returns the parser. GetParser() antlr.Parser // IsStartContext differentiates from other interfaces. IsStartContext() }
IStartContext is an interface to support dynamic dispatch.
type ParenthesisContext ¶
type ParenthesisContext struct {
*ExpressionContext
}
func NewParenthesisContext ¶
func NewParenthesisContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ParenthesisContext
func (*ParenthesisContext) EnterRule ¶
func (s *ParenthesisContext) EnterRule(listener antlr.ParseTreeListener)
func (*ParenthesisContext) ExitRule ¶
func (s *ParenthesisContext) ExitRule(listener antlr.ParseTreeListener)
func (*ParenthesisContext) Expression ¶
func (s *ParenthesisContext) Expression() IExpressionContext
func (*ParenthesisContext) GetRuleContext ¶
func (s *ParenthesisContext) GetRuleContext() antlr.RuleContext
type StartContext ¶
type StartContext struct { *antlr.BaseParserRuleContext // contains filtered or unexported fields }
func NewEmptyStartContext ¶
func NewEmptyStartContext() *StartContext
func NewStartContext ¶
func NewStartContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StartContext
func (*StartContext) EOF ¶
func (s *StartContext) EOF() antlr.TerminalNode
func (*StartContext) EnterRule ¶
func (s *StartContext) EnterRule(listener antlr.ParseTreeListener)
func (*StartContext) ExitRule ¶
func (s *StartContext) ExitRule(listener antlr.ParseTreeListener)
func (*StartContext) Expression ¶
func (s *StartContext) Expression() IExpressionContext
func (*StartContext) GetParser ¶
func (s *StartContext) GetParser() antlr.Parser
func (*StartContext) GetRuleContext ¶
func (s *StartContext) GetRuleContext() antlr.RuleContext
func (*StartContext) IsStartContext ¶
func (*StartContext) IsStartContext()
func (*StartContext) ToStringTree ¶
func (s *StartContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string