Documentation
¶
Index ¶
- Constants
- type AndCompareContext
- func (s *AndCompareContext) AllExpression() []IExpressionContext
- func (s *AndCompareContext) AndOP() antlr.TerminalNode
- func (s *AndCompareContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *AndCompareContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *AndCompareContext) Expression(i int) IExpressionContext
- func (s *AndCompareContext) GetLeft() IExpressionContext
- func (s *AndCompareContext) GetRight() IExpressionContext
- func (s *AndCompareContext) GetRuleContext() antlr.RuleContext
- func (s *AndCompareContext) SetLeft(v IExpressionContext)
- func (s *AndCompareContext) SetRight(v IExpressionContext)
- type BaseConditionListener
- func (s *BaseConditionListener) EnterAndCompare(ctx *AndCompareContext)
- func (s *BaseConditionListener) EnterCompare(ctx *CompareContext)
- func (s *BaseConditionListener) EnterEveryRule(ctx antlr.ParserRuleContext)
- func (s *BaseConditionListener) EnterOrCompare(ctx *OrCompareContext)
- func (s *BaseConditionListener) EnterParensExpression(ctx *ParensExpressionContext)
- func (s *BaseConditionListener) EnterStart(ctx *StartContext)
- func (s *BaseConditionListener) ExitAndCompare(ctx *AndCompareContext)
- func (s *BaseConditionListener) ExitCompare(ctx *CompareContext)
- func (s *BaseConditionListener) ExitEveryRule(ctx antlr.ParserRuleContext)
- func (s *BaseConditionListener) ExitOrCompare(ctx *OrCompareContext)
- func (s *BaseConditionListener) ExitParensExpression(ctx *ParensExpressionContext)
- func (s *BaseConditionListener) ExitStart(ctx *StartContext)
- func (s *BaseConditionListener) VisitErrorNode(node antlr.ErrorNode)
- func (s *BaseConditionListener) VisitTerminal(node antlr.TerminalNode)
- type CompareContext
- func (s *CompareContext) AllParamater() []antlr.TerminalNode
- func (s *CompareContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *CompareContext) EqualOP() antlr.TerminalNode
- func (s *CompareContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *CompareContext) GetLeft() antlr.Token
- func (s *CompareContext) GetOp() antlr.Token
- func (s *CompareContext) GetRight() antlr.Token
- func (s *CompareContext) GetRuleContext() antlr.RuleContext
- func (s *CompareContext) InOP() antlr.TerminalNode
- func (s *CompareContext) LargerEqualOp() antlr.TerminalNode
- func (s *CompareContext) LargerOp() antlr.TerminalNode
- func (s *CompareContext) LessEqualOp() antlr.TerminalNode
- func (s *CompareContext) LessOp() antlr.TerminalNode
- func (s *CompareContext) NotEqualOP() antlr.TerminalNode
- func (s *CompareContext) Number() antlr.TerminalNode
- func (s *CompareContext) Paramater(i int) antlr.TerminalNode
- func (s *CompareContext) SetLeft(v antlr.Token)
- func (s *CompareContext) SetOp(v antlr.Token)
- func (s *CompareContext) SetRight(v antlr.Token)
- type ConditionLexer
- type ConditionListener
- type ConditionParser
- func (p *ConditionParser) Expression() (localctx IExpressionContext)
- func (p *ConditionParser) Expression_Sempred(localctx antlr.RuleContext, predIndex int) bool
- func (p *ConditionParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool
- func (p *ConditionParser) Start() (localctx IStartContext)
- 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 IExpressionContext
- type IStartContext
- type OrCompareContext
- func (s *OrCompareContext) AllExpression() []IExpressionContext
- func (s *OrCompareContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *OrCompareContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *OrCompareContext) Expression(i int) IExpressionContext
- func (s *OrCompareContext) GetLeft() IExpressionContext
- func (s *OrCompareContext) GetRight() IExpressionContext
- func (s *OrCompareContext) GetRuleContext() antlr.RuleContext
- func (s *OrCompareContext) OrOP() antlr.TerminalNode
- func (s *OrCompareContext) SetLeft(v IExpressionContext)
- func (s *OrCompareContext) SetRight(v IExpressionContext)
- type ParensExpressionContext
- func (s *ParensExpressionContext) EnterRule(listener antlr.ParseTreeListener)
- func (s *ParensExpressionContext) ExitRule(listener antlr.ParseTreeListener)
- func (s *ParensExpressionContext) Expression() IExpressionContext
- func (s *ParensExpressionContext) GetRuleContext() antlr.RuleContext
- func (s *ParensExpressionContext) LeftParen() antlr.TerminalNode
- func (s *ParensExpressionContext) RightParen() antlr.TerminalNode
- type StartContext
- 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 ( ConditionLexerEqualOP = 1 ConditionLexerNotEqualOP = 2 ConditionLexerLargerOp = 3 ConditionLexerLargerEqualOp = 4 ConditionLexerLessOp = 5 ConditionLexerLessEqualOp = 6 ConditionLexerInOP = 7 ConditionLexerLeftParen = 8 ConditionLexerRightParen = 9 ConditionLexerOrOP = 10 ConditionLexerAndOP = 11 ConditionLexerParamater = 12 ConditionLexerNumber = 13 ConditionLexerWhitespace = 14 ConditionLexerNewline = 15 )
ConditionLexer tokens.
const ( ConditionParserEOF = antlr.TokenEOF ConditionParserEqualOP = 1 ConditionParserNotEqualOP = 2 ConditionParserLargerOp = 3 ConditionParserLargerEqualOp = 4 ConditionParserLessOp = 5 ConditionParserLessEqualOp = 6 ConditionParserInOP = 7 ConditionParserLeftParen = 8 ConditionParserRightParen = 9 ConditionParserOrOP = 10 ConditionParserAndOP = 11 ConditionParserParamater = 12 ConditionParserNumber = 13 ConditionParserWhitespace = 14 ConditionParserNewline = 15 )
ConditionParser tokens.
const ( ConditionParserRULE_start = 0 ConditionParserRULE_expression = 1 )
ConditionParser rules.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AndCompareContext ¶
type AndCompareContext struct { *ExpressionContext // contains filtered or unexported fields }
func NewAndCompareContext ¶
func NewAndCompareContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *AndCompareContext
func (*AndCompareContext) AllExpression ¶
func (s *AndCompareContext) AllExpression() []IExpressionContext
func (*AndCompareContext) AndOP ¶
func (s *AndCompareContext) AndOP() antlr.TerminalNode
func (*AndCompareContext) EnterRule ¶
func (s *AndCompareContext) EnterRule(listener antlr.ParseTreeListener)
func (*AndCompareContext) ExitRule ¶
func (s *AndCompareContext) ExitRule(listener antlr.ParseTreeListener)
func (*AndCompareContext) Expression ¶
func (s *AndCompareContext) Expression(i int) IExpressionContext
func (*AndCompareContext) GetLeft ¶
func (s *AndCompareContext) GetLeft() IExpressionContext
func (*AndCompareContext) GetRight ¶
func (s *AndCompareContext) GetRight() IExpressionContext
func (*AndCompareContext) GetRuleContext ¶
func (s *AndCompareContext) GetRuleContext() antlr.RuleContext
func (*AndCompareContext) SetLeft ¶
func (s *AndCompareContext) SetLeft(v IExpressionContext)
func (*AndCompareContext) SetRight ¶
func (s *AndCompareContext) SetRight(v IExpressionContext)
type BaseConditionListener ¶
type BaseConditionListener struct{}
BaseConditionListener is a complete listener for a parse tree produced by ConditionParser.
func (*BaseConditionListener) EnterAndCompare ¶
func (s *BaseConditionListener) EnterAndCompare(ctx *AndCompareContext)
EnterAndCompare is called when production andCompare is entered.
func (*BaseConditionListener) EnterCompare ¶
func (s *BaseConditionListener) EnterCompare(ctx *CompareContext)
EnterCompare is called when production compare is entered.
func (*BaseConditionListener) EnterEveryRule ¶
func (s *BaseConditionListener) EnterEveryRule(ctx antlr.ParserRuleContext)
EnterEveryRule is called when any rule is entered.
func (*BaseConditionListener) EnterOrCompare ¶
func (s *BaseConditionListener) EnterOrCompare(ctx *OrCompareContext)
EnterOrCompare is called when production orCompare is entered.
func (*BaseConditionListener) EnterParensExpression ¶
func (s *BaseConditionListener) EnterParensExpression(ctx *ParensExpressionContext)
EnterParensExpression is called when production parensExpression is entered.
func (*BaseConditionListener) EnterStart ¶
func (s *BaseConditionListener) EnterStart(ctx *StartContext)
EnterStart is called when production start is entered.
func (*BaseConditionListener) ExitAndCompare ¶
func (s *BaseConditionListener) ExitAndCompare(ctx *AndCompareContext)
ExitAndCompare is called when production andCompare is exited.
func (*BaseConditionListener) ExitCompare ¶
func (s *BaseConditionListener) ExitCompare(ctx *CompareContext)
ExitCompare is called when production compare is exited.
func (*BaseConditionListener) ExitEveryRule ¶
func (s *BaseConditionListener) ExitEveryRule(ctx antlr.ParserRuleContext)
ExitEveryRule is called when any rule is exited.
func (*BaseConditionListener) ExitOrCompare ¶
func (s *BaseConditionListener) ExitOrCompare(ctx *OrCompareContext)
ExitOrCompare is called when production orCompare is exited.
func (*BaseConditionListener) ExitParensExpression ¶
func (s *BaseConditionListener) ExitParensExpression(ctx *ParensExpressionContext)
ExitParensExpression is called when production parensExpression is exited.
func (*BaseConditionListener) ExitStart ¶
func (s *BaseConditionListener) ExitStart(ctx *StartContext)
ExitStart is called when production start is exited.
func (*BaseConditionListener) VisitErrorNode ¶
func (s *BaseConditionListener) VisitErrorNode(node antlr.ErrorNode)
VisitErrorNode is called when an error node is visited.
func (*BaseConditionListener) VisitTerminal ¶
func (s *BaseConditionListener) VisitTerminal(node antlr.TerminalNode)
VisitTerminal is called when a terminal node is visited.
type CompareContext ¶
type CompareContext struct { *ExpressionContext // contains filtered or unexported fields }
func NewCompareContext ¶
func NewCompareContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CompareContext
func (*CompareContext) AllParamater ¶
func (s *CompareContext) AllParamater() []antlr.TerminalNode
func (*CompareContext) EnterRule ¶
func (s *CompareContext) EnterRule(listener antlr.ParseTreeListener)
func (*CompareContext) EqualOP ¶
func (s *CompareContext) EqualOP() antlr.TerminalNode
func (*CompareContext) ExitRule ¶
func (s *CompareContext) ExitRule(listener antlr.ParseTreeListener)
func (*CompareContext) GetLeft ¶
func (s *CompareContext) GetLeft() antlr.Token
func (*CompareContext) GetOp ¶
func (s *CompareContext) GetOp() antlr.Token
func (*CompareContext) GetRight ¶
func (s *CompareContext) GetRight() antlr.Token
func (*CompareContext) GetRuleContext ¶
func (s *CompareContext) GetRuleContext() antlr.RuleContext
func (*CompareContext) InOP ¶
func (s *CompareContext) InOP() antlr.TerminalNode
func (*CompareContext) LargerEqualOp ¶
func (s *CompareContext) LargerEqualOp() antlr.TerminalNode
func (*CompareContext) LargerOp ¶
func (s *CompareContext) LargerOp() antlr.TerminalNode
func (*CompareContext) LessEqualOp ¶
func (s *CompareContext) LessEqualOp() antlr.TerminalNode
func (*CompareContext) LessOp ¶
func (s *CompareContext) LessOp() antlr.TerminalNode
func (*CompareContext) NotEqualOP ¶
func (s *CompareContext) NotEqualOP() antlr.TerminalNode
func (*CompareContext) Number ¶
func (s *CompareContext) Number() antlr.TerminalNode
func (*CompareContext) Paramater ¶
func (s *CompareContext) Paramater(i int) antlr.TerminalNode
func (*CompareContext) SetLeft ¶
func (s *CompareContext) SetLeft(v antlr.Token)
func (*CompareContext) SetOp ¶
func (s *CompareContext) SetOp(v antlr.Token)
func (*CompareContext) SetRight ¶
func (s *CompareContext) SetRight(v antlr.Token)
type ConditionLexer ¶
func NewConditionLexer ¶
func NewConditionLexer(input antlr.CharStream) *ConditionLexer
NewConditionLexer produces a new lexer instance for the optional input antlr.CharStream.
The *ConditionLexer instance produced may be reused by calling the SetInputStream method. The initial lexer configuration is expensive to construct, and the object is not thread-safe; however, if used within a Golang sync.Pool, the construction cost amortizes well and the objects can be used in a thread-safe manner.
type ConditionListener ¶
type ConditionListener interface { antlr.ParseTreeListener // EnterStart is called when entering the start production. EnterStart(c *StartContext) // EnterCompare is called when entering the compare production. EnterCompare(c *CompareContext) // EnterOrCompare is called when entering the orCompare production. EnterOrCompare(c *OrCompareContext) // EnterParensExpression is called when entering the parensExpression production. EnterParensExpression(c *ParensExpressionContext) // EnterAndCompare is called when entering the andCompare production. EnterAndCompare(c *AndCompareContext) // ExitStart is called when exiting the start production. ExitStart(c *StartContext) // ExitCompare is called when exiting the compare production. ExitCompare(c *CompareContext) // ExitOrCompare is called when exiting the orCompare production. ExitOrCompare(c *OrCompareContext) // ExitParensExpression is called when exiting the parensExpression production. ExitParensExpression(c *ParensExpressionContext) // ExitAndCompare is called when exiting the andCompare production. ExitAndCompare(c *AndCompareContext) }
ConditionListener is a complete listener for a parse tree produced by ConditionParser.
type ConditionParser ¶
type ConditionParser struct {
*antlr.BaseParser
}
func NewConditionParser ¶
func NewConditionParser(input antlr.TokenStream) *ConditionParser
NewConditionParser produces a new parser instance for the optional input antlr.TokenStream.
The *ConditionParser instance produced may be reused by calling the SetInputStream method. The initial parser configuration is expensive to construct, and the object is not thread-safe; however, if used within a Golang sync.Pool, the construction cost amortizes well and the objects can be used in a thread-safe manner.
func (*ConditionParser) Expression ¶
func (p *ConditionParser) Expression() (localctx IExpressionContext)
func (*ConditionParser) Expression_Sempred ¶
func (p *ConditionParser) Expression_Sempred(localctx antlr.RuleContext, predIndex int) bool
func (*ConditionParser) Sempred ¶
func (p *ConditionParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool
func (*ConditionParser) Start ¶
func (p *ConditionParser) 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 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 OrCompareContext ¶
type OrCompareContext struct { *ExpressionContext // contains filtered or unexported fields }
func NewOrCompareContext ¶
func NewOrCompareContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *OrCompareContext
func (*OrCompareContext) AllExpression ¶
func (s *OrCompareContext) AllExpression() []IExpressionContext
func (*OrCompareContext) EnterRule ¶
func (s *OrCompareContext) EnterRule(listener antlr.ParseTreeListener)
func (*OrCompareContext) ExitRule ¶
func (s *OrCompareContext) ExitRule(listener antlr.ParseTreeListener)
func (*OrCompareContext) Expression ¶
func (s *OrCompareContext) Expression(i int) IExpressionContext
func (*OrCompareContext) GetLeft ¶
func (s *OrCompareContext) GetLeft() IExpressionContext
func (*OrCompareContext) GetRight ¶
func (s *OrCompareContext) GetRight() IExpressionContext
func (*OrCompareContext) GetRuleContext ¶
func (s *OrCompareContext) GetRuleContext() antlr.RuleContext
func (*OrCompareContext) OrOP ¶
func (s *OrCompareContext) OrOP() antlr.TerminalNode
func (*OrCompareContext) SetLeft ¶
func (s *OrCompareContext) SetLeft(v IExpressionContext)
func (*OrCompareContext) SetRight ¶
func (s *OrCompareContext) SetRight(v IExpressionContext)
type ParensExpressionContext ¶
type ParensExpressionContext struct {
*ExpressionContext
}
func NewParensExpressionContext ¶
func NewParensExpressionContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ParensExpressionContext
func (*ParensExpressionContext) EnterRule ¶
func (s *ParensExpressionContext) EnterRule(listener antlr.ParseTreeListener)
func (*ParensExpressionContext) ExitRule ¶
func (s *ParensExpressionContext) ExitRule(listener antlr.ParseTreeListener)
func (*ParensExpressionContext) Expression ¶
func (s *ParensExpressionContext) Expression() IExpressionContext
func (*ParensExpressionContext) GetRuleContext ¶
func (s *ParensExpressionContext) GetRuleContext() antlr.RuleContext
func (*ParensExpressionContext) LeftParen ¶
func (s *ParensExpressionContext) LeftParen() antlr.TerminalNode
func (*ParensExpressionContext) RightParen ¶
func (s *ParensExpressionContext) RightParen() antlr.TerminalNode
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) 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