Class CalcCompiler
- All Implemented Interfaces:
org.antlr.v4.runtime.tree.ParseTreeVisitor<TypedCalcLambda>,GorScriptVisitor<TypedCalcLambda>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidsetColumnNamesAndTypes(String[] colNames, String[] colTypes) Visit a parse tree produced byGorScriptParser.calc_expression().Visit a parse tree produced byGorScriptParser.compare_expressions().Visit a parse tree produced byGorScriptParser.expression().Visit a parse tree produced byGorScriptParser.filename().Visit a parse tree produced byGorScriptParser.function_call().Visit a parse tree produced byGorScriptParser.if_expr().Visit a parse tree produced byGorScriptParser.in_expression().Visit a parse tree produced byGorScriptParser.indag_expression().Visit a parse tree produced byGorScriptParser.not_rel_expr().Visit a parse tree produced byGorScriptParser.number().Visit a parse tree produced byGorScriptParser.paren_expr().Visit a parse tree produced byGorScriptParser.paren_rel_expr().Visit a parse tree produced byGorScriptParser.power_factor().Visit a parse tree produced byGorScriptParser.rel_expr().Visit a parse tree produced byGorScriptParser.rel_term().Visit a parse tree produced byGorScriptParser.signed_factor().Visit a parse tree produced byGorScriptParser.string_literal().Visit a parse tree produced byGorScriptParser.term().Visit a parse tree produced byGorScriptParser.variable().Methods inherited from class org.gorpipe.gor.GorScriptBaseVisitor
visitArgument, visitCalc_command, visitCalc_expression_list, visitColumn_list, visitColumn_name, visitColumn_number, visitColumn_range, visitColumn_ref, visitColumn_rename_rule, visitColumn_selection, visitColumn_wildcard, visitCreate_statement, visitDef_macro, visitFactor, visitFunction_expr, visitFunction_name, visitGeneric_command, visitGor_expression, visitGornor_expression, visitHide_command, visitInput_source, visitMacro_name, visitMacro_value, visitNested_query, visitNor_expression, visitOption, visitOption_value, visitOptional_power_factor, visitOptions_and_args, visitPgor_expression, visitPipe_command, visitPredicate, visitPredicate_factor, visitQuery_expression, visitRename_command, visitReplace_command, visitScript, visitSelect_command, visitString_literal_list, visitValue, visitVirtual_relation, visitVirtual_relation_name, visitWhere_command, visitXfactorMethods inherited from class org.antlr.v4.runtime.tree.AbstractParseTreeVisitor
aggregateResult, defaultResult, shouldVisitNextChild, visit, visitChildren, visitErrorNode, visitTerminalMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.antlr.v4.runtime.tree.ParseTreeVisitor
visit, visitChildren, visitErrorNode, visitTerminal
-
Constructor Details
-
CalcCompiler
public CalcCompiler() -
CalcCompiler
public CalcCompiler(gorsat.parser.ParseArith owner)
-
-
Method Details
-
setColumnNamesAndTypes
-
addSpecialVars
public void addSpecialVars() -
visitCalc_expression
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.calc_expression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitCalc_expressionin interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitCalc_expressionin classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitExpression
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.expression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitExpressionin interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitExpressionin classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitTerm
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.term().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitTermin interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitTermin classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitSigned_factor
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.signed_factor().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitSigned_factorin interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitSigned_factorin classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFunction_call
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.function_call().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitFunction_callin interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitFunction_callin classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitParen_expr
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.paren_expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitParen_exprin interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitParen_exprin classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitParen_rel_expr
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.paren_rel_expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitParen_rel_exprin interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitParen_rel_exprin classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitNot_rel_expr
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.not_rel_expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitNot_rel_exprin interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitNot_rel_exprin classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitIn_expression
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.in_expression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitIn_expressionin interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitIn_expressionin classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitIndag_expression
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.indag_expression().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitIndag_expressionin interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitIndag_expressionin classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitRel_term
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.rel_term().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitRel_termin interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitRel_termin classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitRel_expr
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.rel_expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitRel_exprin interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitRel_exprin classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitCompare_expressions
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.compare_expressions().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitCompare_expressionsin interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitCompare_expressionsin classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitIf_expr
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.if_expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitIf_exprin interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitIf_exprin classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitPower_factor
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.power_factor().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitPower_factorin interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitPower_factorin classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitString_literal
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.string_literal().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitString_literalin interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitString_literalin classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitNumber
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.number().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitNumberin interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitNumberin classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitVariable
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.variable().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitVariablein interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitVariablein classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFilename
Description copied from class:GorScriptBaseVisitorVisit a parse tree produced byGorScriptParser.filename().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitFilenamein interfaceGorScriptVisitor<TypedCalcLambda>- Overrides:
visitFilenamein classGorScriptBaseVisitor<TypedCalcLambda>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-