[#74] netmap/parser: Update antlr4 generator
Also, add -no-listener option, as we use visitor only. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
70f23dd1ea
commit
f5b23eb225
9 changed files with 93 additions and 375 deletions
Binary file not shown.
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
package parser
|
||||
|
||||
// ANTLR can be downloaded from https://www.antlr.org/download/antlr-4.11.1-complete.jar
|
||||
//go:generate java -Xmx500M -cp "./antlr-4.11.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool -Dlanguage=Go -visitor QueryLexer.g4 Query.g4
|
||||
// ANTLR can be downloaded from https://www.antlr.org/download/antlr-4.12.0-complete.jar
|
||||
//go:generate java -Xmx500M -cp "./antlr-4.12.0-complete.jar:$CLASSPATH" org.antlr.v4.Tool -Dlanguage=Go -no-listener -visitor QueryLexer.g4 Query.g4
|
||||
|
|
|
@ -1,106 +0,0 @@
|
|||
// Code generated from java-escape by ANTLR 4.11.1. DO NOT EDIT.
|
||||
|
||||
package parser // Query
|
||||
|
||||
import "github.com/antlr/antlr4/runtime/Go/antlr/v4"
|
||||
|
||||
// BaseQueryListener is a complete listener for a parse tree produced by Query.
|
||||
type BaseQueryListener struct{}
|
||||
|
||||
var _ QueryListener = &BaseQueryListener{}
|
||||
|
||||
// VisitTerminal is called when a terminal node is visited.
|
||||
func (s *BaseQueryListener) VisitTerminal(node antlr.TerminalNode) {}
|
||||
|
||||
// VisitErrorNode is called when an error node is visited.
|
||||
func (s *BaseQueryListener) VisitErrorNode(node antlr.ErrorNode) {}
|
||||
|
||||
// EnterEveryRule is called when any rule is entered.
|
||||
func (s *BaseQueryListener) EnterEveryRule(ctx antlr.ParserRuleContext) {}
|
||||
|
||||
// ExitEveryRule is called when any rule is exited.
|
||||
func (s *BaseQueryListener) ExitEveryRule(ctx antlr.ParserRuleContext) {}
|
||||
|
||||
// EnterPolicy is called when production policy is entered.
|
||||
func (s *BaseQueryListener) EnterPolicy(ctx *PolicyContext) {}
|
||||
|
||||
// ExitPolicy is called when production policy is exited.
|
||||
func (s *BaseQueryListener) ExitPolicy(ctx *PolicyContext) {}
|
||||
|
||||
// EnterRepStmt is called when production repStmt is entered.
|
||||
func (s *BaseQueryListener) EnterRepStmt(ctx *RepStmtContext) {}
|
||||
|
||||
// ExitRepStmt is called when production repStmt is exited.
|
||||
func (s *BaseQueryListener) ExitRepStmt(ctx *RepStmtContext) {}
|
||||
|
||||
// EnterCbfStmt is called when production cbfStmt is entered.
|
||||
func (s *BaseQueryListener) EnterCbfStmt(ctx *CbfStmtContext) {}
|
||||
|
||||
// ExitCbfStmt is called when production cbfStmt is exited.
|
||||
func (s *BaseQueryListener) ExitCbfStmt(ctx *CbfStmtContext) {}
|
||||
|
||||
// EnterSelectStmt is called when production selectStmt is entered.
|
||||
func (s *BaseQueryListener) EnterSelectStmt(ctx *SelectStmtContext) {}
|
||||
|
||||
// ExitSelectStmt is called when production selectStmt is exited.
|
||||
func (s *BaseQueryListener) ExitSelectStmt(ctx *SelectStmtContext) {}
|
||||
|
||||
// EnterClause is called when production clause is entered.
|
||||
func (s *BaseQueryListener) EnterClause(ctx *ClauseContext) {}
|
||||
|
||||
// ExitClause is called when production clause is exited.
|
||||
func (s *BaseQueryListener) ExitClause(ctx *ClauseContext) {}
|
||||
|
||||
// EnterFilterExpr is called when production filterExpr is entered.
|
||||
func (s *BaseQueryListener) EnterFilterExpr(ctx *FilterExprContext) {}
|
||||
|
||||
// ExitFilterExpr is called when production filterExpr is exited.
|
||||
func (s *BaseQueryListener) ExitFilterExpr(ctx *FilterExprContext) {}
|
||||
|
||||
// EnterFilterStmt is called when production filterStmt is entered.
|
||||
func (s *BaseQueryListener) EnterFilterStmt(ctx *FilterStmtContext) {}
|
||||
|
||||
// ExitFilterStmt is called when production filterStmt is exited.
|
||||
func (s *BaseQueryListener) ExitFilterStmt(ctx *FilterStmtContext) {}
|
||||
|
||||
// EnterExpr is called when production expr is entered.
|
||||
func (s *BaseQueryListener) EnterExpr(ctx *ExprContext) {}
|
||||
|
||||
// ExitExpr is called when production expr is exited.
|
||||
func (s *BaseQueryListener) ExitExpr(ctx *ExprContext) {}
|
||||
|
||||
// EnterFilterKey is called when production filterKey is entered.
|
||||
func (s *BaseQueryListener) EnterFilterKey(ctx *FilterKeyContext) {}
|
||||
|
||||
// ExitFilterKey is called when production filterKey is exited.
|
||||
func (s *BaseQueryListener) ExitFilterKey(ctx *FilterKeyContext) {}
|
||||
|
||||
// EnterFilterValue is called when production filterValue is entered.
|
||||
func (s *BaseQueryListener) EnterFilterValue(ctx *FilterValueContext) {}
|
||||
|
||||
// ExitFilterValue is called when production filterValue is exited.
|
||||
func (s *BaseQueryListener) ExitFilterValue(ctx *FilterValueContext) {}
|
||||
|
||||
// EnterNumber is called when production number is entered.
|
||||
func (s *BaseQueryListener) EnterNumber(ctx *NumberContext) {}
|
||||
|
||||
// ExitNumber is called when production number is exited.
|
||||
func (s *BaseQueryListener) ExitNumber(ctx *NumberContext) {}
|
||||
|
||||
// EnterKeyword is called when production keyword is entered.
|
||||
func (s *BaseQueryListener) EnterKeyword(ctx *KeywordContext) {}
|
||||
|
||||
// ExitKeyword is called when production keyword is exited.
|
||||
func (s *BaseQueryListener) ExitKeyword(ctx *KeywordContext) {}
|
||||
|
||||
// EnterIdent is called when production ident is entered.
|
||||
func (s *BaseQueryListener) EnterIdent(ctx *IdentContext) {}
|
||||
|
||||
// ExitIdent is called when production ident is exited.
|
||||
func (s *BaseQueryListener) ExitIdent(ctx *IdentContext) {}
|
||||
|
||||
// EnterIdentWC is called when production identWC is entered.
|
||||
func (s *BaseQueryListener) EnterIdentWC(ctx *IdentWCContext) {}
|
||||
|
||||
// ExitIdentWC is called when production identWC is exited.
|
||||
func (s *BaseQueryListener) ExitIdentWC(ctx *IdentWCContext) {}
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated from java-escape by ANTLR 4.11.1. DO NOT EDIT.
|
||||
// Code generated from Query.g4 by ANTLR 4.12.0. DO NOT EDIT.
|
||||
|
||||
package parser // Query
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated from java-escape by ANTLR 4.11.1. DO NOT EDIT.
|
||||
// Code generated from QueryLexer.g4 by ANTLR 4.12.0. DO NOT EDIT.
|
||||
|
||||
package parser
|
||||
|
||||
|
|
|
@ -1,94 +0,0 @@
|
|||
// Code generated from java-escape by ANTLR 4.11.1. DO NOT EDIT.
|
||||
|
||||
package parser // Query
|
||||
|
||||
import "github.com/antlr/antlr4/runtime/Go/antlr/v4"
|
||||
|
||||
// QueryListener is a complete listener for a parse tree produced by Query.
|
||||
type QueryListener interface {
|
||||
antlr.ParseTreeListener
|
||||
|
||||
// EnterPolicy is called when entering the policy production.
|
||||
EnterPolicy(c *PolicyContext)
|
||||
|
||||
// EnterRepStmt is called when entering the repStmt production.
|
||||
EnterRepStmt(c *RepStmtContext)
|
||||
|
||||
// EnterCbfStmt is called when entering the cbfStmt production.
|
||||
EnterCbfStmt(c *CbfStmtContext)
|
||||
|
||||
// EnterSelectStmt is called when entering the selectStmt production.
|
||||
EnterSelectStmt(c *SelectStmtContext)
|
||||
|
||||
// EnterClause is called when entering the clause production.
|
||||
EnterClause(c *ClauseContext)
|
||||
|
||||
// EnterFilterExpr is called when entering the filterExpr production.
|
||||
EnterFilterExpr(c *FilterExprContext)
|
||||
|
||||
// EnterFilterStmt is called when entering the filterStmt production.
|
||||
EnterFilterStmt(c *FilterStmtContext)
|
||||
|
||||
// EnterExpr is called when entering the expr production.
|
||||
EnterExpr(c *ExprContext)
|
||||
|
||||
// EnterFilterKey is called when entering the filterKey production.
|
||||
EnterFilterKey(c *FilterKeyContext)
|
||||
|
||||
// EnterFilterValue is called when entering the filterValue production.
|
||||
EnterFilterValue(c *FilterValueContext)
|
||||
|
||||
// EnterNumber is called when entering the number production.
|
||||
EnterNumber(c *NumberContext)
|
||||
|
||||
// EnterKeyword is called when entering the keyword production.
|
||||
EnterKeyword(c *KeywordContext)
|
||||
|
||||
// EnterIdent is called when entering the ident production.
|
||||
EnterIdent(c *IdentContext)
|
||||
|
||||
// EnterIdentWC is called when entering the identWC production.
|
||||
EnterIdentWC(c *IdentWCContext)
|
||||
|
||||
// ExitPolicy is called when exiting the policy production.
|
||||
ExitPolicy(c *PolicyContext)
|
||||
|
||||
// ExitRepStmt is called when exiting the repStmt production.
|
||||
ExitRepStmt(c *RepStmtContext)
|
||||
|
||||
// ExitCbfStmt is called when exiting the cbfStmt production.
|
||||
ExitCbfStmt(c *CbfStmtContext)
|
||||
|
||||
// ExitSelectStmt is called when exiting the selectStmt production.
|
||||
ExitSelectStmt(c *SelectStmtContext)
|
||||
|
||||
// ExitClause is called when exiting the clause production.
|
||||
ExitClause(c *ClauseContext)
|
||||
|
||||
// ExitFilterExpr is called when exiting the filterExpr production.
|
||||
ExitFilterExpr(c *FilterExprContext)
|
||||
|
||||
// ExitFilterStmt is called when exiting the filterStmt production.
|
||||
ExitFilterStmt(c *FilterStmtContext)
|
||||
|
||||
// ExitExpr is called when exiting the expr production.
|
||||
ExitExpr(c *ExprContext)
|
||||
|
||||
// ExitFilterKey is called when exiting the filterKey production.
|
||||
ExitFilterKey(c *FilterKeyContext)
|
||||
|
||||
// ExitFilterValue is called when exiting the filterValue production.
|
||||
ExitFilterValue(c *FilterValueContext)
|
||||
|
||||
// ExitNumber is called when exiting the number production.
|
||||
ExitNumber(c *NumberContext)
|
||||
|
||||
// ExitKeyword is called when exiting the keyword production.
|
||||
ExitKeyword(c *KeywordContext)
|
||||
|
||||
// ExitIdent is called when exiting the ident production.
|
||||
ExitIdent(c *IdentContext)
|
||||
|
||||
// ExitIdentWC is called when exiting the identWC production.
|
||||
ExitIdentWC(c *IdentWCContext)
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated from java-escape by ANTLR 4.11.1. DO NOT EDIT.
|
||||
// Code generated from Query.g4 by ANTLR 4.12.0. DO NOT EDIT.
|
||||
|
||||
package parser // Query
|
||||
|
||||
|
@ -133,7 +133,7 @@ func NewQuery(input antlr.TokenStream) *Query {
|
|||
this.RuleNames = staticData.ruleNames
|
||||
this.LiteralNames = staticData.literalNames
|
||||
this.SymbolicNames = staticData.symbolicNames
|
||||
this.GrammarFileName = "java-escape"
|
||||
this.GrammarFileName = "Query.g4"
|
||||
|
||||
return this
|
||||
}
|
||||
|
@ -189,6 +189,16 @@ type IPolicyContext interface {
|
|||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
EOF() antlr.TerminalNode
|
||||
AllRepStmt() []IRepStmtContext
|
||||
RepStmt(i int) IRepStmtContext
|
||||
CbfStmt() ICbfStmtContext
|
||||
AllSelectStmt() []ISelectStmtContext
|
||||
SelectStmt(i int) ISelectStmtContext
|
||||
AllFilterStmt() []IFilterStmtContext
|
||||
FilterStmt(i int) IFilterStmtContext
|
||||
|
||||
// IsPolicyContext differentiates from other interfaces.
|
||||
IsPolicyContext()
|
||||
}
|
||||
|
@ -371,18 +381,6 @@ func (s *PolicyContext) ToStringTree(ruleNames []string, recog antlr.Recognizer)
|
|||
return antlr.TreesStringTree(s, ruleNames, recog)
|
||||
}
|
||||
|
||||
func (s *PolicyContext) EnterRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.EnterPolicy(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *PolicyContext) ExitRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.ExitPolicy(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *PolicyContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
||||
switch t := visitor.(type) {
|
||||
case QueryVisitor:
|
||||
|
@ -498,6 +496,12 @@ type IRepStmtContext interface {
|
|||
// SetSelector sets the Selector rule contexts.
|
||||
SetSelector(IIdentContext)
|
||||
|
||||
// Getter signatures
|
||||
REP() antlr.TerminalNode
|
||||
NUMBER1() antlr.TerminalNode
|
||||
IN() antlr.TerminalNode
|
||||
Ident() IIdentContext
|
||||
|
||||
// IsRepStmtContext differentiates from other interfaces.
|
||||
IsRepStmtContext()
|
||||
}
|
||||
|
@ -575,18 +579,6 @@ func (s *RepStmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer
|
|||
return antlr.TreesStringTree(s, ruleNames, recog)
|
||||
}
|
||||
|
||||
func (s *RepStmtContext) EnterRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.EnterRepStmt(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *RepStmtContext) ExitRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.ExitRepStmt(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *RepStmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
||||
switch t := visitor.(type) {
|
||||
case QueryVisitor:
|
||||
|
@ -668,6 +660,10 @@ type ICbfStmtContext interface {
|
|||
// SetBackupFactor sets the BackupFactor token.
|
||||
SetBackupFactor(antlr.Token)
|
||||
|
||||
// Getter signatures
|
||||
CBF() antlr.TerminalNode
|
||||
NUMBER1() antlr.TerminalNode
|
||||
|
||||
// IsCbfStmtContext differentiates from other interfaces.
|
||||
IsCbfStmtContext()
|
||||
}
|
||||
|
@ -720,18 +716,6 @@ func (s *CbfStmtContext) ToStringTree(ruleNames []string, recog antlr.Recognizer
|
|||
return antlr.TreesStringTree(s, ruleNames, recog)
|
||||
}
|
||||
|
||||
func (s *CbfStmtContext) EnterRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.EnterCbfStmt(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *CbfStmtContext) ExitRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.ExitCbfStmt(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *CbfStmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
||||
switch t := visitor.(type) {
|
||||
case QueryVisitor:
|
||||
|
@ -812,6 +796,17 @@ type ISelectStmtContext interface {
|
|||
// SetName sets the Name rule contexts.
|
||||
SetName(IIdentContext)
|
||||
|
||||
// Getter signatures
|
||||
SELECT() antlr.TerminalNode
|
||||
FROM() antlr.TerminalNode
|
||||
NUMBER1() antlr.TerminalNode
|
||||
IdentWC() IIdentWCContext
|
||||
IN() antlr.TerminalNode
|
||||
AS() antlr.TerminalNode
|
||||
AllIdent() []IIdentContext
|
||||
Ident(i int) IIdentContext
|
||||
Clause() IClauseContext
|
||||
|
||||
// IsSelectStmtContext differentiates from other interfaces.
|
||||
IsSelectStmtContext()
|
||||
}
|
||||
|
@ -964,18 +959,6 @@ func (s *SelectStmtContext) ToStringTree(ruleNames []string, recog antlr.Recogni
|
|||
return antlr.TreesStringTree(s, ruleNames, recog)
|
||||
}
|
||||
|
||||
func (s *SelectStmtContext) EnterRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.EnterSelectStmt(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *SelectStmtContext) ExitRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.ExitSelectStmt(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *SelectStmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
||||
switch t := visitor.(type) {
|
||||
case QueryVisitor:
|
||||
|
@ -1091,6 +1074,10 @@ type IClauseContext interface {
|
|||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
CLAUSE_SAME() antlr.TerminalNode
|
||||
CLAUSE_DISTINCT() antlr.TerminalNode
|
||||
|
||||
// IsClauseContext differentiates from other interfaces.
|
||||
IsClauseContext()
|
||||
}
|
||||
|
@ -1138,18 +1125,6 @@ func (s *ClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer)
|
|||
return antlr.TreesStringTree(s, ruleNames, recog)
|
||||
}
|
||||
|
||||
func (s *ClauseContext) EnterRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.EnterClause(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *ClauseContext) ExitRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.ExitClause(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *ClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
||||
switch t := visitor.(type) {
|
||||
case QueryVisitor:
|
||||
|
@ -1231,6 +1206,15 @@ type IFilterExprContext interface {
|
|||
// SetF2 sets the F2 rule contexts.
|
||||
SetF2(IFilterExprContext)
|
||||
|
||||
// Getter signatures
|
||||
L_PAREN() antlr.TerminalNode
|
||||
R_PAREN() antlr.TerminalNode
|
||||
AllFilterExpr() []IFilterExprContext
|
||||
FilterExpr(i int) IFilterExprContext
|
||||
Expr() IExprContext
|
||||
AND_OP() antlr.TerminalNode
|
||||
OR_OP() antlr.TerminalNode
|
||||
|
||||
// IsFilterExprContext differentiates from other interfaces.
|
||||
IsFilterExprContext()
|
||||
}
|
||||
|
@ -1363,18 +1347,6 @@ func (s *FilterExprContext) ToStringTree(ruleNames []string, recog antlr.Recogni
|
|||
return antlr.TreesStringTree(s, ruleNames, recog)
|
||||
}
|
||||
|
||||
func (s *FilterExprContext) EnterRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.EnterFilterExpr(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FilterExprContext) ExitRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.ExitFilterExpr(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FilterExprContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
||||
switch t := visitor.(type) {
|
||||
case QueryVisitor:
|
||||
|
@ -1542,6 +1514,12 @@ type IFilterStmtContext interface {
|
|||
// SetName sets the Name rule contexts.
|
||||
SetName(IIdentContext)
|
||||
|
||||
// Getter signatures
|
||||
FILTER() antlr.TerminalNode
|
||||
AS() antlr.TerminalNode
|
||||
FilterExpr() IFilterExprContext
|
||||
Ident() IIdentContext
|
||||
|
||||
// IsFilterStmtContext differentiates from other interfaces.
|
||||
IsFilterStmtContext()
|
||||
}
|
||||
|
@ -1631,18 +1609,6 @@ func (s *FilterStmtContext) ToStringTree(ruleNames []string, recog antlr.Recogni
|
|||
return antlr.TreesStringTree(s, ruleNames, recog)
|
||||
}
|
||||
|
||||
func (s *FilterStmtContext) EnterRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.EnterFilterStmt(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FilterStmtContext) ExitRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.ExitFilterStmt(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FilterStmtContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
||||
switch t := visitor.(type) {
|
||||
case QueryVisitor:
|
||||
|
@ -1728,6 +1694,13 @@ type IExprContext interface {
|
|||
// SetValue sets the Value rule contexts.
|
||||
SetValue(IFilterValueContext)
|
||||
|
||||
// Getter signatures
|
||||
AT() antlr.TerminalNode
|
||||
Ident() IIdentContext
|
||||
SIMPLE_OP() antlr.TerminalNode
|
||||
FilterKey() IFilterKeyContext
|
||||
FilterValue() IFilterValueContext
|
||||
|
||||
// IsExprContext differentiates from other interfaces.
|
||||
IsExprContext()
|
||||
}
|
||||
|
@ -1838,18 +1811,6 @@ func (s *ExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) s
|
|||
return antlr.TreesStringTree(s, ruleNames, recog)
|
||||
}
|
||||
|
||||
func (s *ExprContext) EnterRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.EnterExpr(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *ExprContext) ExitRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.ExitExpr(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *ExprContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
||||
switch t := visitor.(type) {
|
||||
case QueryVisitor:
|
||||
|
@ -1936,6 +1897,10 @@ type IFilterKeyContext interface {
|
|||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Ident() IIdentContext
|
||||
STRING() antlr.TerminalNode
|
||||
|
||||
// IsFilterKeyContext differentiates from other interfaces.
|
||||
IsFilterKeyContext()
|
||||
}
|
||||
|
@ -1995,18 +1960,6 @@ func (s *FilterKeyContext) ToStringTree(ruleNames []string, recog antlr.Recogniz
|
|||
return antlr.TreesStringTree(s, ruleNames, recog)
|
||||
}
|
||||
|
||||
func (s *FilterKeyContext) EnterRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.EnterFilterKey(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FilterKeyContext) ExitRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.ExitFilterKey(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FilterKeyContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
||||
switch t := visitor.(type) {
|
||||
case QueryVisitor:
|
||||
|
@ -2072,6 +2025,11 @@ type IFilterValueContext interface {
|
|||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Ident() IIdentContext
|
||||
Number() INumberContext
|
||||
STRING() antlr.TerminalNode
|
||||
|
||||
// IsFilterValueContext differentiates from other interfaces.
|
||||
IsFilterValueContext()
|
||||
}
|
||||
|
@ -2147,18 +2105,6 @@ func (s *FilterValueContext) ToStringTree(ruleNames []string, recog antlr.Recogn
|
|||
return antlr.TreesStringTree(s, ruleNames, recog)
|
||||
}
|
||||
|
||||
func (s *FilterValueContext) EnterRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.EnterFilterValue(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FilterValueContext) ExitRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.ExitFilterValue(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *FilterValueContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
||||
switch t := visitor.(type) {
|
||||
case QueryVisitor:
|
||||
|
@ -2231,6 +2177,10 @@ type INumberContext interface {
|
|||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
ZERO() antlr.TerminalNode
|
||||
NUMBER1() antlr.TerminalNode
|
||||
|
||||
// IsNumberContext differentiates from other interfaces.
|
||||
IsNumberContext()
|
||||
}
|
||||
|
@ -2278,18 +2228,6 @@ func (s *NumberContext) ToStringTree(ruleNames []string, recog antlr.Recognizer)
|
|||
return antlr.TreesStringTree(s, ruleNames, recog)
|
||||
}
|
||||
|
||||
func (s *NumberContext) EnterRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.EnterNumber(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *NumberContext) ExitRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.ExitNumber(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *NumberContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
||||
switch t := visitor.(type) {
|
||||
case QueryVisitor:
|
||||
|
@ -2347,6 +2285,14 @@ type IKeywordContext interface {
|
|||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
REP() antlr.TerminalNode
|
||||
IN() antlr.TerminalNode
|
||||
AS() antlr.TerminalNode
|
||||
SELECT() antlr.TerminalNode
|
||||
FROM() antlr.TerminalNode
|
||||
FILTER() antlr.TerminalNode
|
||||
|
||||
// IsKeywordContext differentiates from other interfaces.
|
||||
IsKeywordContext()
|
||||
}
|
||||
|
@ -2410,18 +2356,6 @@ func (s *KeywordContext) ToStringTree(ruleNames []string, recog antlr.Recognizer
|
|||
return antlr.TreesStringTree(s, ruleNames, recog)
|
||||
}
|
||||
|
||||
func (s *KeywordContext) EnterRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.EnterKeyword(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *KeywordContext) ExitRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.ExitKeyword(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *KeywordContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
||||
switch t := visitor.(type) {
|
||||
case QueryVisitor:
|
||||
|
@ -2479,6 +2413,10 @@ type IIdentContext interface {
|
|||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Keyword() IKeywordContext
|
||||
IDENT() antlr.TerminalNode
|
||||
|
||||
// IsIdentContext differentiates from other interfaces.
|
||||
IsIdentContext()
|
||||
}
|
||||
|
@ -2538,18 +2476,6 @@ func (s *IdentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer)
|
|||
return antlr.TreesStringTree(s, ruleNames, recog)
|
||||
}
|
||||
|
||||
func (s *IdentContext) EnterRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.EnterIdent(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IdentContext) ExitRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.ExitIdent(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IdentContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
||||
switch t := visitor.(type) {
|
||||
case QueryVisitor:
|
||||
|
@ -2615,6 +2541,10 @@ type IIdentWCContext interface {
|
|||
// GetParser returns the parser.
|
||||
GetParser() antlr.Parser
|
||||
|
||||
// Getter signatures
|
||||
Ident() IIdentContext
|
||||
WILDCARD() antlr.TerminalNode
|
||||
|
||||
// IsIdentWCContext differentiates from other interfaces.
|
||||
IsIdentWCContext()
|
||||
}
|
||||
|
@ -2674,18 +2604,6 @@ func (s *IdentWCContext) ToStringTree(ruleNames []string, recog antlr.Recognizer
|
|||
return antlr.TreesStringTree(s, ruleNames, recog)
|
||||
}
|
||||
|
||||
func (s *IdentWCContext) EnterRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.EnterIdentWC(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IdentWCContext) ExitRule(listener antlr.ParseTreeListener) {
|
||||
if listenerT, ok := listener.(QueryListener); ok {
|
||||
listenerT.ExitIdentWC(s)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *IdentWCContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
|
||||
switch t := visitor.(type) {
|
||||
case QueryVisitor:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated from java-escape by ANTLR 4.11.1. DO NOT EDIT.
|
||||
// Code generated from Query.g4 by ANTLR 4.12.0. DO NOT EDIT.
|
||||
|
||||
package parser // Query
|
||||
|
||||
|
|
Loading…
Reference in a new issue