Class TildaSQLValidator
- java.lang.Object
-
- tilda.grammar.TildaSQLBaseListener
-
- tilda.grammar.TildaSQLValidator
-
- All Implemented Interfaces:
org.antlr.v4.runtime.tree.ParseTreeListener
,tilda.grammar.TildaSQLListener
public class TildaSQLValidator extends tilda.grammar.TildaSQLBaseListener
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Deque<Counter>
_ArgumentLists
protected WhereClauseCodeGen
_CG
protected ErrorList
_Errors
protected int
_SyntaxErrors
protected org.antlr.v4.runtime.tree.ParseTree
_Tree
protected TypeManager
_TypeManager
protected static org.apache.logging.log4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description TildaSQLValidator(java.lang.String Expr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
enterArithmetic_expr_base(tilda.grammar.TildaSQLParser.Arithmetic_expr_baseContext ctx)
Enter a parse tree produced byTildaSQLParser.arithmetic_expr_base()
.void
enterArithmetic_expr_sub(tilda.grammar.TildaSQLParser.Arithmetic_expr_subContext ctx)
Enter a parse tree produced byTildaSQLParser.arithmetic_expr_sub()
.void
enterArithmetic_op_add(tilda.grammar.TildaSQLParser.Arithmetic_op_addContext ctx)
Enter a parse tree produced byTildaSQLParser.arithmetic_op_add()
.void
enterArithmetic_op_mul(tilda.grammar.TildaSQLParser.Arithmetic_op_mulContext ctx)
Enter a parse tree produced byTildaSQLParser.arithmetic_op_mul()
.void
enterArithmeticExpr(tilda.grammar.TildaSQLParser.ArithmeticExprContext ctx)
Enter a parse tree produced by theArithmeticExpr
labeled alternative inTildaSQLParser.arithmetic_expr()
.void
enterBin_expr(tilda.grammar.TildaSQLParser.Bin_exprContext ctx)
Enter a parse tree produced byTildaSQLParser.bin_expr()
.void
enterBool_expr_sub(tilda.grammar.TildaSQLParser.Bool_expr_subContext ctx)
Enter a parse tree produced byTildaSQLParser.bool_expr_sub()
.void
enterBool_op(tilda.grammar.TildaSQLParser.Bool_opContext ctx)
Enter a parse tree produced byTildaSQLParser.bool_op()
.void
enterColumn(tilda.grammar.TildaSQLParser.ColumnContext ctx)
Enter a parse tree produced byTildaSQLParser.column()
.void
enterIsnull_expr(tilda.grammar.TildaSQLParser.Isnull_exprContext ctx)
Enter a parse tree produced byTildaSQLParser.isnull_expr()
.void
enterValue_list(tilda.grammar.TildaSQLParser.Value_listContext ctx)
Enter a parse tree produced byTildaSQLParser.value_list()
.void
enterValueBindParam(tilda.grammar.TildaSQLParser.ValueBindParamContext ctx)
Enter a parse tree produced by theValueBindParam
labeled alternative inTildaSQLParser.value()
.void
enterValueNumericLiteral(tilda.grammar.TildaSQLParser.ValueNumericLiteralContext ctx)
Enter a parse tree produced by theValueNumericLiteral
labeled alternative inTildaSQLParser.value()
.void
enterValueStringLiteral(tilda.grammar.TildaSQLParser.ValueStringLiteralContext ctx)
Enter a parse tree produced by theValueStringLiteral
labeled alternative inTildaSQLParser.value()
.void
enterValueTimestampLiteral(tilda.grammar.TildaSQLParser.ValueTimestampLiteralContext ctx)
Enter a parse tree produced by theValueTimestampLiteral
labeled alternative inTildaSQLParser.value()
.void
exitArithmetic_expr_base(tilda.grammar.TildaSQLParser.Arithmetic_expr_baseContext ctx)
Exit a parse tree produced byTildaSQLParser.arithmetic_expr_base()
.void
exitArithmetic_expr_sub(tilda.grammar.TildaSQLParser.Arithmetic_expr_subContext ctx)
Exit a parse tree produced byTildaSQLParser.arithmetic_expr_sub()
.void
exitArithmeticExpr(tilda.grammar.TildaSQLParser.ArithmeticExprContext ctx)
Exit a parse tree produced by theArithmeticExpr
labeled alternative inTildaSQLParser.arithmetic_expr()
.void
exitBin_expr(tilda.grammar.TildaSQLParser.Bin_exprContext ctx)
Exit a parse tree produced byTildaSQLParser.bin_expr()
.void
exitBool_expr_sub(tilda.grammar.TildaSQLParser.Bool_expr_subContext ctx)
Exit a parse tree produced byTildaSQLParser.bool_expr_sub()
.void
exitValue_list(tilda.grammar.TildaSQLParser.Value_listContext ctx)
Exit a parse tree produced byTildaSQLParser.value_list()
.void
exitWhere(tilda.grammar.TildaSQLParser.WhereContext ctx)
Exit a parse tree produced byTildaSQLParser.where()
.int
getParserSyntaxErrors()
ErrorList
getValidationErrors()
protected void
handleArgumentList()
void
setCodeGen(WhereClauseCodeGen CG)
void
setColumnEnvironment(java.util.List<ColumnDefinition> Columns)
void
validate()
-
Methods inherited from class tilda.grammar.TildaSQLBaseListener
enterArithmeticExprSub, enterArithmeticExprVal, enterBetween_expr, enterBetween_op, enterBin_expr_lhs, enterBin_like, enterBin_op, enterBind_parameter, enterBool_expr, enterEveryRule, enterExpr, enterExpr_sub, enterFunc_expr, enterFunction, enterIsnull_op, enterNumeric_literal, enterString_literal, enterTimestamp_literal, enterWhere, exitArithmetic_op_add, exitArithmetic_op_mul, exitArithmeticExprSub, exitArithmeticExprVal, exitBetween_expr, exitBetween_op, exitBin_expr_lhs, exitBin_like, exitBin_op, exitBind_parameter, exitBool_expr, exitBool_op, exitColumn, exitEveryRule, exitExpr, exitExpr_sub, exitFunc_expr, exitFunction, exitIsnull_expr, exitIsnull_op, exitNumeric_literal, exitString_literal, exitTimestamp_literal, exitValueBindParam, exitValueNumericLiteral, exitValueStringLiteral, exitValueTimestampLiteral, visitErrorNode, visitTerminal
-
-
-
-
Field Detail
-
LOG
protected static final org.apache.logging.log4j.Logger LOG
-
_Tree
protected org.antlr.v4.runtime.tree.ParseTree _Tree
-
_SyntaxErrors
protected int _SyntaxErrors
-
_TypeManager
protected TypeManager _TypeManager
-
_Errors
protected ErrorList _Errors
-
_CG
protected WhereClauseCodeGen _CG
-
_ArgumentLists
protected java.util.Deque<Counter> _ArgumentLists
-
-
Method Detail
-
getParserSyntaxErrors
public int getParserSyntaxErrors()
-
setColumnEnvironment
public void setColumnEnvironment(java.util.List<ColumnDefinition> Columns)
-
setCodeGen
public void setCodeGen(WhereClauseCodeGen CG)
-
validate
public void validate()
-
getValidationErrors
public ErrorList getValidationErrors()
-
enterBool_op
public void enterBool_op(tilda.grammar.TildaSQLParser.Bool_opContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Enter a parse tree produced byTildaSQLParser.bool_op()
.The default implementation does nothing.
- Specified by:
enterBool_op
in interfacetilda.grammar.TildaSQLListener
- Overrides:
enterBool_op
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
enterBool_expr_sub
public void enterBool_expr_sub(tilda.grammar.TildaSQLParser.Bool_expr_subContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Enter a parse tree produced byTildaSQLParser.bool_expr_sub()
.The default implementation does nothing.
- Specified by:
enterBool_expr_sub
in interfacetilda.grammar.TildaSQLListener
- Overrides:
enterBool_expr_sub
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
exitBool_expr_sub
public void exitBool_expr_sub(tilda.grammar.TildaSQLParser.Bool_expr_subContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Exit a parse tree produced byTildaSQLParser.bool_expr_sub()
.The default implementation does nothing.
- Specified by:
exitBool_expr_sub
in interfacetilda.grammar.TildaSQLListener
- Overrides:
exitBool_expr_sub
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
enterBin_expr
public void enterBin_expr(tilda.grammar.TildaSQLParser.Bin_exprContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Enter a parse tree produced byTildaSQLParser.bin_expr()
.The default implementation does nothing.
- Specified by:
enterBin_expr
in interfacetilda.grammar.TildaSQLListener
- Overrides:
enterBin_expr
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
exitBin_expr
public void exitBin_expr(tilda.grammar.TildaSQLParser.Bin_exprContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Exit a parse tree produced byTildaSQLParser.bin_expr()
.The default implementation does nothing.
- Specified by:
exitBin_expr
in interfacetilda.grammar.TildaSQLListener
- Overrides:
exitBin_expr
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
enterValue_list
public void enterValue_list(tilda.grammar.TildaSQLParser.Value_listContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Enter a parse tree produced byTildaSQLParser.value_list()
.The default implementation does nothing.
- Specified by:
enterValue_list
in interfacetilda.grammar.TildaSQLListener
- Overrides:
enterValue_list
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
exitValue_list
public void exitValue_list(tilda.grammar.TildaSQLParser.Value_listContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Exit a parse tree produced byTildaSQLParser.value_list()
.The default implementation does nothing.
- Specified by:
exitValue_list
in interfacetilda.grammar.TildaSQLListener
- Overrides:
exitValue_list
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
enterColumn
public void enterColumn(tilda.grammar.TildaSQLParser.ColumnContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Enter a parse tree produced byTildaSQLParser.column()
.The default implementation does nothing.
- Specified by:
enterColumn
in interfacetilda.grammar.TildaSQLListener
- Overrides:
enterColumn
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
enterArithmetic_expr_base
public void enterArithmetic_expr_base(tilda.grammar.TildaSQLParser.Arithmetic_expr_baseContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Enter a parse tree produced byTildaSQLParser.arithmetic_expr_base()
.The default implementation does nothing.
- Specified by:
enterArithmetic_expr_base
in interfacetilda.grammar.TildaSQLListener
- Overrides:
enterArithmetic_expr_base
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
exitArithmetic_expr_base
public void exitArithmetic_expr_base(tilda.grammar.TildaSQLParser.Arithmetic_expr_baseContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Exit a parse tree produced byTildaSQLParser.arithmetic_expr_base()
.The default implementation does nothing.
- Specified by:
exitArithmetic_expr_base
in interfacetilda.grammar.TildaSQLListener
- Overrides:
exitArithmetic_expr_base
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
enterArithmeticExpr
public void enterArithmeticExpr(tilda.grammar.TildaSQLParser.ArithmeticExprContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Enter a parse tree produced by theArithmeticExpr
labeled alternative inTildaSQLParser.arithmetic_expr()
.The default implementation does nothing.
- Specified by:
enterArithmeticExpr
in interfacetilda.grammar.TildaSQLListener
- Overrides:
enterArithmeticExpr
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
exitArithmeticExpr
public void exitArithmeticExpr(tilda.grammar.TildaSQLParser.ArithmeticExprContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Exit a parse tree produced by theArithmeticExpr
labeled alternative inTildaSQLParser.arithmetic_expr()
.The default implementation does nothing.
- Specified by:
exitArithmeticExpr
in interfacetilda.grammar.TildaSQLListener
- Overrides:
exitArithmeticExpr
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
enterArithmetic_op_add
public void enterArithmetic_op_add(tilda.grammar.TildaSQLParser.Arithmetic_op_addContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Enter a parse tree produced byTildaSQLParser.arithmetic_op_add()
.The default implementation does nothing.
- Specified by:
enterArithmetic_op_add
in interfacetilda.grammar.TildaSQLListener
- Overrides:
enterArithmetic_op_add
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
enterArithmetic_op_mul
public void enterArithmetic_op_mul(tilda.grammar.TildaSQLParser.Arithmetic_op_mulContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Enter a parse tree produced byTildaSQLParser.arithmetic_op_mul()
.The default implementation does nothing.
- Specified by:
enterArithmetic_op_mul
in interfacetilda.grammar.TildaSQLListener
- Overrides:
enterArithmetic_op_mul
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
enterArithmetic_expr_sub
public void enterArithmetic_expr_sub(tilda.grammar.TildaSQLParser.Arithmetic_expr_subContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Enter a parse tree produced byTildaSQLParser.arithmetic_expr_sub()
.The default implementation does nothing.
- Specified by:
enterArithmetic_expr_sub
in interfacetilda.grammar.TildaSQLListener
- Overrides:
enterArithmetic_expr_sub
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
exitArithmetic_expr_sub
public void exitArithmetic_expr_sub(tilda.grammar.TildaSQLParser.Arithmetic_expr_subContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Exit a parse tree produced byTildaSQLParser.arithmetic_expr_sub()
.The default implementation does nothing.
- Specified by:
exitArithmetic_expr_sub
in interfacetilda.grammar.TildaSQLListener
- Overrides:
exitArithmetic_expr_sub
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
handleArgumentList
protected void handleArgumentList()
-
enterValueNumericLiteral
public void enterValueNumericLiteral(tilda.grammar.TildaSQLParser.ValueNumericLiteralContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Enter a parse tree produced by theValueNumericLiteral
labeled alternative inTildaSQLParser.value()
.The default implementation does nothing.
- Specified by:
enterValueNumericLiteral
in interfacetilda.grammar.TildaSQLListener
- Overrides:
enterValueNumericLiteral
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
enterValueStringLiteral
public void enterValueStringLiteral(tilda.grammar.TildaSQLParser.ValueStringLiteralContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Enter a parse tree produced by theValueStringLiteral
labeled alternative inTildaSQLParser.value()
.The default implementation does nothing.
- Specified by:
enterValueStringLiteral
in interfacetilda.grammar.TildaSQLListener
- Overrides:
enterValueStringLiteral
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
enterValueBindParam
public void enterValueBindParam(tilda.grammar.TildaSQLParser.ValueBindParamContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Enter a parse tree produced by theValueBindParam
labeled alternative inTildaSQLParser.value()
.The default implementation does nothing.
- Specified by:
enterValueBindParam
in interfacetilda.grammar.TildaSQLListener
- Overrides:
enterValueBindParam
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
enterValueTimestampLiteral
public void enterValueTimestampLiteral(tilda.grammar.TildaSQLParser.ValueTimestampLiteralContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Enter a parse tree produced by theValueTimestampLiteral
labeled alternative inTildaSQLParser.value()
.The default implementation does nothing.
- Specified by:
enterValueTimestampLiteral
in interfacetilda.grammar.TildaSQLListener
- Overrides:
enterValueTimestampLiteral
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
exitWhere
public void exitWhere(tilda.grammar.TildaSQLParser.WhereContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Exit a parse tree produced byTildaSQLParser.where()
.The default implementation does nothing.
- Specified by:
exitWhere
in interfacetilda.grammar.TildaSQLListener
- Overrides:
exitWhere
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
enterIsnull_expr
public void enterIsnull_expr(tilda.grammar.TildaSQLParser.Isnull_exprContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListener
Enter a parse tree produced byTildaSQLParser.isnull_expr()
.The default implementation does nothing.
- Specified by:
enterIsnull_expr
in interfacetilda.grammar.TildaSQLListener
- Overrides:
enterIsnull_expr
in classtilda.grammar.TildaSQLBaseListener
- Parameters:
ctx
- the parse tree
-
-