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>_ArgumentListsprotected WhereClauseCodeGen_CGprotected ErrorList_Errorsprotected int_SyntaxErrorsprotected org.antlr.v4.runtime.tree.ParseTree_Treeprotected TypeManager_TypeManagerprotected static org.apache.logging.log4j.LoggerLOG
-
Constructor Summary
Constructors Constructor Description TildaSQLValidator(java.lang.String Expr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidenterArithmetic_expr_base(tilda.grammar.TildaSQLParser.Arithmetic_expr_baseContext ctx)Enter a parse tree produced byTildaSQLParser.arithmetic_expr_base().voidenterArithmetic_expr_sub(tilda.grammar.TildaSQLParser.Arithmetic_expr_subContext ctx)Enter a parse tree produced byTildaSQLParser.arithmetic_expr_sub().voidenterArithmetic_op_add(tilda.grammar.TildaSQLParser.Arithmetic_op_addContext ctx)Enter a parse tree produced byTildaSQLParser.arithmetic_op_add().voidenterArithmetic_op_mul(tilda.grammar.TildaSQLParser.Arithmetic_op_mulContext ctx)Enter a parse tree produced byTildaSQLParser.arithmetic_op_mul().voidenterArithmeticExpr(tilda.grammar.TildaSQLParser.ArithmeticExprContext ctx)Enter a parse tree produced by theArithmeticExprlabeled alternative inTildaSQLParser.arithmetic_expr().voidenterBin_expr(tilda.grammar.TildaSQLParser.Bin_exprContext ctx)Enter a parse tree produced byTildaSQLParser.bin_expr().voidenterBool_expr_sub(tilda.grammar.TildaSQLParser.Bool_expr_subContext ctx)Enter a parse tree produced byTildaSQLParser.bool_expr_sub().voidenterBool_op(tilda.grammar.TildaSQLParser.Bool_opContext ctx)Enter a parse tree produced byTildaSQLParser.bool_op().voidenterColumn(tilda.grammar.TildaSQLParser.ColumnContext ctx)Enter a parse tree produced byTildaSQLParser.column().voidenterIsnull_expr(tilda.grammar.TildaSQLParser.Isnull_exprContext ctx)Enter a parse tree produced byTildaSQLParser.isnull_expr().voidenterValue_list(tilda.grammar.TildaSQLParser.Value_listContext ctx)Enter a parse tree produced byTildaSQLParser.value_list().voidenterValueBindParam(tilda.grammar.TildaSQLParser.ValueBindParamContext ctx)Enter a parse tree produced by theValueBindParamlabeled alternative inTildaSQLParser.value().voidenterValueNumericLiteral(tilda.grammar.TildaSQLParser.ValueNumericLiteralContext ctx)Enter a parse tree produced by theValueNumericLiterallabeled alternative inTildaSQLParser.value().voidenterValueStringLiteral(tilda.grammar.TildaSQLParser.ValueStringLiteralContext ctx)Enter a parse tree produced by theValueStringLiterallabeled alternative inTildaSQLParser.value().voidenterValueTimestampLiteral(tilda.grammar.TildaSQLParser.ValueTimestampLiteralContext ctx)Enter a parse tree produced by theValueTimestampLiterallabeled alternative inTildaSQLParser.value().voidexitArithmetic_expr_base(tilda.grammar.TildaSQLParser.Arithmetic_expr_baseContext ctx)Exit a parse tree produced byTildaSQLParser.arithmetic_expr_base().voidexitArithmetic_expr_sub(tilda.grammar.TildaSQLParser.Arithmetic_expr_subContext ctx)Exit a parse tree produced byTildaSQLParser.arithmetic_expr_sub().voidexitArithmeticExpr(tilda.grammar.TildaSQLParser.ArithmeticExprContext ctx)Exit a parse tree produced by theArithmeticExprlabeled alternative inTildaSQLParser.arithmetic_expr().voidexitBin_expr(tilda.grammar.TildaSQLParser.Bin_exprContext ctx)Exit a parse tree produced byTildaSQLParser.bin_expr().voidexitBool_expr_sub(tilda.grammar.TildaSQLParser.Bool_expr_subContext ctx)Exit a parse tree produced byTildaSQLParser.bool_expr_sub().voidexitValue_list(tilda.grammar.TildaSQLParser.Value_listContext ctx)Exit a parse tree produced byTildaSQLParser.value_list().voidexitWhere(tilda.grammar.TildaSQLParser.WhereContext ctx)Exit a parse tree produced byTildaSQLParser.where().intgetParserSyntaxErrors()ErrorListgetValidationErrors()protected voidhandleArgumentList()voidsetCodeGen(WhereClauseCodeGen CG)voidsetColumnEnvironment(java.util.List<ColumnDefinition> Columns)voidvalidate()-
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.TildaSQLBaseListenerEnter a parse tree produced byTildaSQLParser.bool_op().The default implementation does nothing.
- Specified by:
enterBool_opin interfacetilda.grammar.TildaSQLListener- Overrides:
enterBool_opin 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.TildaSQLBaseListenerEnter a parse tree produced byTildaSQLParser.bool_expr_sub().The default implementation does nothing.
- Specified by:
enterBool_expr_subin interfacetilda.grammar.TildaSQLListener- Overrides:
enterBool_expr_subin 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.TildaSQLBaseListenerExit a parse tree produced byTildaSQLParser.bool_expr_sub().The default implementation does nothing.
- Specified by:
exitBool_expr_subin interfacetilda.grammar.TildaSQLListener- Overrides:
exitBool_expr_subin 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.TildaSQLBaseListenerEnter a parse tree produced byTildaSQLParser.bin_expr().The default implementation does nothing.
- Specified by:
enterBin_exprin interfacetilda.grammar.TildaSQLListener- Overrides:
enterBin_exprin 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.TildaSQLBaseListenerExit a parse tree produced byTildaSQLParser.bin_expr().The default implementation does nothing.
- Specified by:
exitBin_exprin interfacetilda.grammar.TildaSQLListener- Overrides:
exitBin_exprin 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.TildaSQLBaseListenerEnter a parse tree produced byTildaSQLParser.value_list().The default implementation does nothing.
- Specified by:
enterValue_listin interfacetilda.grammar.TildaSQLListener- Overrides:
enterValue_listin 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.TildaSQLBaseListenerExit a parse tree produced byTildaSQLParser.value_list().The default implementation does nothing.
- Specified by:
exitValue_listin interfacetilda.grammar.TildaSQLListener- Overrides:
exitValue_listin classtilda.grammar.TildaSQLBaseListener- Parameters:
ctx- the parse tree
-
enterColumn
public void enterColumn(tilda.grammar.TildaSQLParser.ColumnContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListenerEnter a parse tree produced byTildaSQLParser.column().The default implementation does nothing.
- Specified by:
enterColumnin interfacetilda.grammar.TildaSQLListener- Overrides:
enterColumnin 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.TildaSQLBaseListenerEnter a parse tree produced byTildaSQLParser.arithmetic_expr_base().The default implementation does nothing.
- Specified by:
enterArithmetic_expr_basein interfacetilda.grammar.TildaSQLListener- Overrides:
enterArithmetic_expr_basein 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.TildaSQLBaseListenerExit a parse tree produced byTildaSQLParser.arithmetic_expr_base().The default implementation does nothing.
- Specified by:
exitArithmetic_expr_basein interfacetilda.grammar.TildaSQLListener- Overrides:
exitArithmetic_expr_basein classtilda.grammar.TildaSQLBaseListener- Parameters:
ctx- the parse tree
-
enterArithmeticExpr
public void enterArithmeticExpr(tilda.grammar.TildaSQLParser.ArithmeticExprContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListenerEnter a parse tree produced by theArithmeticExprlabeled alternative inTildaSQLParser.arithmetic_expr().The default implementation does nothing.
- Specified by:
enterArithmeticExprin interfacetilda.grammar.TildaSQLListener- Overrides:
enterArithmeticExprin classtilda.grammar.TildaSQLBaseListener- Parameters:
ctx- the parse tree
-
exitArithmeticExpr
public void exitArithmeticExpr(tilda.grammar.TildaSQLParser.ArithmeticExprContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListenerExit a parse tree produced by theArithmeticExprlabeled alternative inTildaSQLParser.arithmetic_expr().The default implementation does nothing.
- Specified by:
exitArithmeticExprin interfacetilda.grammar.TildaSQLListener- Overrides:
exitArithmeticExprin 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.TildaSQLBaseListenerEnter a parse tree produced byTildaSQLParser.arithmetic_op_add().The default implementation does nothing.
- Specified by:
enterArithmetic_op_addin interfacetilda.grammar.TildaSQLListener- Overrides:
enterArithmetic_op_addin 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.TildaSQLBaseListenerEnter a parse tree produced byTildaSQLParser.arithmetic_op_mul().The default implementation does nothing.
- Specified by:
enterArithmetic_op_mulin interfacetilda.grammar.TildaSQLListener- Overrides:
enterArithmetic_op_mulin 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.TildaSQLBaseListenerEnter a parse tree produced byTildaSQLParser.arithmetic_expr_sub().The default implementation does nothing.
- Specified by:
enterArithmetic_expr_subin interfacetilda.grammar.TildaSQLListener- Overrides:
enterArithmetic_expr_subin 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.TildaSQLBaseListenerExit a parse tree produced byTildaSQLParser.arithmetic_expr_sub().The default implementation does nothing.
- Specified by:
exitArithmetic_expr_subin interfacetilda.grammar.TildaSQLListener- Overrides:
exitArithmetic_expr_subin 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.TildaSQLBaseListenerEnter a parse tree produced by theValueNumericLiterallabeled alternative inTildaSQLParser.value().The default implementation does nothing.
- Specified by:
enterValueNumericLiteralin interfacetilda.grammar.TildaSQLListener- Overrides:
enterValueNumericLiteralin classtilda.grammar.TildaSQLBaseListener- Parameters:
ctx- the parse tree
-
enterValueStringLiteral
public void enterValueStringLiteral(tilda.grammar.TildaSQLParser.ValueStringLiteralContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListenerEnter a parse tree produced by theValueStringLiterallabeled alternative inTildaSQLParser.value().The default implementation does nothing.
- Specified by:
enterValueStringLiteralin interfacetilda.grammar.TildaSQLListener- Overrides:
enterValueStringLiteralin classtilda.grammar.TildaSQLBaseListener- Parameters:
ctx- the parse tree
-
enterValueBindParam
public void enterValueBindParam(tilda.grammar.TildaSQLParser.ValueBindParamContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListenerEnter a parse tree produced by theValueBindParamlabeled alternative inTildaSQLParser.value().The default implementation does nothing.
- Specified by:
enterValueBindParamin interfacetilda.grammar.TildaSQLListener- Overrides:
enterValueBindParamin classtilda.grammar.TildaSQLBaseListener- Parameters:
ctx- the parse tree
-
enterValueTimestampLiteral
public void enterValueTimestampLiteral(tilda.grammar.TildaSQLParser.ValueTimestampLiteralContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListenerEnter a parse tree produced by theValueTimestampLiterallabeled alternative inTildaSQLParser.value().The default implementation does nothing.
- Specified by:
enterValueTimestampLiteralin interfacetilda.grammar.TildaSQLListener- Overrides:
enterValueTimestampLiteralin classtilda.grammar.TildaSQLBaseListener- Parameters:
ctx- the parse tree
-
exitWhere
public void exitWhere(tilda.grammar.TildaSQLParser.WhereContext ctx)
Description copied from class:tilda.grammar.TildaSQLBaseListenerExit a parse tree produced byTildaSQLParser.where().The default implementation does nothing.
- Specified by:
exitWherein interfacetilda.grammar.TildaSQLListener- Overrides:
exitWherein 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.TildaSQLBaseListenerEnter a parse tree produced byTildaSQLParser.isnull_expr().The default implementation does nothing.
- Specified by:
enterIsnull_exprin interfacetilda.grammar.TildaSQLListener- Overrides:
enterIsnull_exprin classtilda.grammar.TildaSQLBaseListener- Parameters:
ctx- the parse tree
-
-