Package tilda.grammar

Class TildaSQLValidator

  • All Implemented Interfaces:
    org.antlr.v4.runtime.tree.ParseTreeListener, tilda.grammar.TildaSQLListener

    public class TildaSQLValidator
    extends tilda.grammar.TildaSQLBaseListener
    • 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 by TildaSQLParser.arithmetic_expr_base().
      void enterArithmetic_expr_sub​(tilda.grammar.TildaSQLParser.Arithmetic_expr_subContext ctx)
      Enter a parse tree produced by TildaSQLParser.arithmetic_expr_sub().
      void enterArithmetic_op_add​(tilda.grammar.TildaSQLParser.Arithmetic_op_addContext ctx)
      Enter a parse tree produced by TildaSQLParser.arithmetic_op_add().
      void enterArithmetic_op_mul​(tilda.grammar.TildaSQLParser.Arithmetic_op_mulContext ctx)
      Enter a parse tree produced by TildaSQLParser.arithmetic_op_mul().
      void enterArithmeticExpr​(tilda.grammar.TildaSQLParser.ArithmeticExprContext ctx)
      Enter a parse tree produced by the ArithmeticExpr labeled alternative in TildaSQLParser.arithmetic_expr().
      void enterBin_expr​(tilda.grammar.TildaSQLParser.Bin_exprContext ctx)
      Enter a parse tree produced by TildaSQLParser.bin_expr().
      void enterBool_expr_sub​(tilda.grammar.TildaSQLParser.Bool_expr_subContext ctx)
      Enter a parse tree produced by TildaSQLParser.bool_expr_sub().
      void enterBool_op​(tilda.grammar.TildaSQLParser.Bool_opContext ctx)
      Enter a parse tree produced by TildaSQLParser.bool_op().
      void enterColumn​(tilda.grammar.TildaSQLParser.ColumnContext ctx)
      Enter a parse tree produced by TildaSQLParser.column().
      void enterIsnull_expr​(tilda.grammar.TildaSQLParser.Isnull_exprContext ctx)
      Enter a parse tree produced by TildaSQLParser.isnull_expr().
      void enterValue_list​(tilda.grammar.TildaSQLParser.Value_listContext ctx)
      Enter a parse tree produced by TildaSQLParser.value_list().
      void enterValueBindParam​(tilda.grammar.TildaSQLParser.ValueBindParamContext ctx)
      Enter a parse tree produced by the ValueBindParam labeled alternative in TildaSQLParser.value().
      void enterValueNumericLiteral​(tilda.grammar.TildaSQLParser.ValueNumericLiteralContext ctx)
      Enter a parse tree produced by the ValueNumericLiteral labeled alternative in TildaSQLParser.value().
      void enterValueStringLiteral​(tilda.grammar.TildaSQLParser.ValueStringLiteralContext ctx)
      Enter a parse tree produced by the ValueStringLiteral labeled alternative in TildaSQLParser.value().
      void enterValueTimestampLiteral​(tilda.grammar.TildaSQLParser.ValueTimestampLiteralContext ctx)
      Enter a parse tree produced by the ValueTimestampLiteral labeled alternative in TildaSQLParser.value().
      void exitArithmetic_expr_base​(tilda.grammar.TildaSQLParser.Arithmetic_expr_baseContext ctx)
      Exit a parse tree produced by TildaSQLParser.arithmetic_expr_base().
      void exitArithmetic_expr_sub​(tilda.grammar.TildaSQLParser.Arithmetic_expr_subContext ctx)
      Exit a parse tree produced by TildaSQLParser.arithmetic_expr_sub().
      void exitArithmeticExpr​(tilda.grammar.TildaSQLParser.ArithmeticExprContext ctx)
      Exit a parse tree produced by the ArithmeticExpr labeled alternative in TildaSQLParser.arithmetic_expr().
      void exitBin_expr​(tilda.grammar.TildaSQLParser.Bin_exprContext ctx)
      Exit a parse tree produced by TildaSQLParser.bin_expr().
      void exitBool_expr_sub​(tilda.grammar.TildaSQLParser.Bool_expr_subContext ctx)
      Exit a parse tree produced by TildaSQLParser.bool_expr_sub().
      void exitValue_list​(tilda.grammar.TildaSQLParser.Value_listContext ctx)
      Exit a parse tree produced by TildaSQLParser.value_list().
      void exitWhere​(tilda.grammar.TildaSQLParser.WhereContext ctx)
      Exit a parse tree produced by TildaSQLParser.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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
      • _ArgumentLists

        protected java.util.Deque<Counter> _ArgumentLists
    • Constructor Detail

      • TildaSQLValidator

        public TildaSQLValidator​(java.lang.String Expr)
    • Method Detail

      • getParserSyntaxErrors

        public int getParserSyntaxErrors()
      • setColumnEnvironment

        public void setColumnEnvironment​(java.util.List<ColumnDefinition> Columns)
      • 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 by TildaSQLParser.bool_op().

        The default implementation does nothing.

        Specified by:
        enterBool_op in interface tilda.grammar.TildaSQLListener
        Overrides:
        enterBool_op in class tilda.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 by TildaSQLParser.bool_expr_sub().

        The default implementation does nothing.

        Specified by:
        enterBool_expr_sub in interface tilda.grammar.TildaSQLListener
        Overrides:
        enterBool_expr_sub in class tilda.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 by TildaSQLParser.bool_expr_sub().

        The default implementation does nothing.

        Specified by:
        exitBool_expr_sub in interface tilda.grammar.TildaSQLListener
        Overrides:
        exitBool_expr_sub in class tilda.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 by TildaSQLParser.bin_expr().

        The default implementation does nothing.

        Specified by:
        enterBin_expr in interface tilda.grammar.TildaSQLListener
        Overrides:
        enterBin_expr in class tilda.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 by TildaSQLParser.bin_expr().

        The default implementation does nothing.

        Specified by:
        exitBin_expr in interface tilda.grammar.TildaSQLListener
        Overrides:
        exitBin_expr in class tilda.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 by TildaSQLParser.value_list().

        The default implementation does nothing.

        Specified by:
        enterValue_list in interface tilda.grammar.TildaSQLListener
        Overrides:
        enterValue_list in class tilda.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 by TildaSQLParser.value_list().

        The default implementation does nothing.

        Specified by:
        exitValue_list in interface tilda.grammar.TildaSQLListener
        Overrides:
        exitValue_list in class tilda.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 by TildaSQLParser.column().

        The default implementation does nothing.

        Specified by:
        enterColumn in interface tilda.grammar.TildaSQLListener
        Overrides:
        enterColumn in class tilda.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 by TildaSQLParser.arithmetic_expr_base().

        The default implementation does nothing.

        Specified by:
        enterArithmetic_expr_base in interface tilda.grammar.TildaSQLListener
        Overrides:
        enterArithmetic_expr_base in class tilda.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 by TildaSQLParser.arithmetic_expr_base().

        The default implementation does nothing.

        Specified by:
        exitArithmetic_expr_base in interface tilda.grammar.TildaSQLListener
        Overrides:
        exitArithmetic_expr_base in class tilda.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 the ArithmeticExpr labeled alternative in TildaSQLParser.arithmetic_expr().

        The default implementation does nothing.

        Specified by:
        enterArithmeticExpr in interface tilda.grammar.TildaSQLListener
        Overrides:
        enterArithmeticExpr in class tilda.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 the ArithmeticExpr labeled alternative in TildaSQLParser.arithmetic_expr().

        The default implementation does nothing.

        Specified by:
        exitArithmeticExpr in interface tilda.grammar.TildaSQLListener
        Overrides:
        exitArithmeticExpr in class tilda.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 by TildaSQLParser.arithmetic_op_add().

        The default implementation does nothing.

        Specified by:
        enterArithmetic_op_add in interface tilda.grammar.TildaSQLListener
        Overrides:
        enterArithmetic_op_add in class tilda.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 by TildaSQLParser.arithmetic_op_mul().

        The default implementation does nothing.

        Specified by:
        enterArithmetic_op_mul in interface tilda.grammar.TildaSQLListener
        Overrides:
        enterArithmetic_op_mul in class tilda.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 by TildaSQLParser.arithmetic_expr_sub().

        The default implementation does nothing.

        Specified by:
        enterArithmetic_expr_sub in interface tilda.grammar.TildaSQLListener
        Overrides:
        enterArithmetic_expr_sub in class tilda.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 by TildaSQLParser.arithmetic_expr_sub().

        The default implementation does nothing.

        Specified by:
        exitArithmetic_expr_sub in interface tilda.grammar.TildaSQLListener
        Overrides:
        exitArithmetic_expr_sub in class tilda.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 the ValueNumericLiteral labeled alternative in TildaSQLParser.value().

        The default implementation does nothing.

        Specified by:
        enterValueNumericLiteral in interface tilda.grammar.TildaSQLListener
        Overrides:
        enterValueNumericLiteral in class tilda.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 the ValueStringLiteral labeled alternative in TildaSQLParser.value().

        The default implementation does nothing.

        Specified by:
        enterValueStringLiteral in interface tilda.grammar.TildaSQLListener
        Overrides:
        enterValueStringLiteral in class tilda.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 the ValueBindParam labeled alternative in TildaSQLParser.value().

        The default implementation does nothing.

        Specified by:
        enterValueBindParam in interface tilda.grammar.TildaSQLListener
        Overrides:
        enterValueBindParam in class tilda.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 the ValueTimestampLiteral labeled alternative in TildaSQLParser.value().

        The default implementation does nothing.

        Specified by:
        enterValueTimestampLiteral in interface tilda.grammar.TildaSQLListener
        Overrides:
        enterValueTimestampLiteral in class tilda.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 by TildaSQLParser.where().

        The default implementation does nothing.

        Specified by:
        exitWhere in interface tilda.grammar.TildaSQLListener
        Overrides:
        exitWhere in class tilda.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 by TildaSQLParser.isnull_expr().

        The default implementation does nothing.

        Specified by:
        enterIsnull_expr in interface tilda.grammar.TildaSQLListener
        Overrides:
        enterIsnull_expr in class tilda.grammar.TildaSQLBaseListener
        Parameters:
        ctx - the parse tree