Class ASTBuilderWalker
- java.lang.Object
-
- io.dialob.rule.parser.DialobRuleBaseListener
-
- io.dialob.rule.parser.node.ASTBuilderWalker
-
- All Implemented Interfaces:
DialobRuleListener,org.antlr.v4.runtime.tree.ParseTreeListener
public class ASTBuilderWalker extends DialobRuleBaseListener
-
-
Field Summary
Fields Modifier and Type Field Description static VariableFinderDUMMY_VARIABLE_FINDER
-
Constructor Summary
Constructors Constructor Description ASTBuilderWalker(@NotNull VariableFinder variableFinder, Map<NodeBase,String> asyncFunctionVariables)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidenterCallExpr(DialobRuleParser.CallExprContext ctx)Enter a parse tree produced by thecallExprlabeled alternative inDialobRuleParser.arithExprRule().voidenterConstExprRule(DialobRuleParser.ConstExprRuleContext ctx)Enter a parse tree produced byDialobRuleParser.constExprRule().voidenterIdExprRule(DialobRuleParser.IdExprRuleContext ctx)Enter a parse tree produced byDialobRuleParser.idExprRule().voidenterInfixExpr(DialobRuleParser.InfixExprContext ctx)Enter a parse tree produced by theinfixExprlabeled alternative inDialobRuleParser.arithExprRule().voidenterInOperExpr(DialobRuleParser.InOperExprContext ctx)Enter a parse tree produced by theinOperExprlabeled alternative inDialobRuleParser.expr().voidenterIsExpr(DialobRuleParser.IsExprContext ctx)Enter a parse tree produced by theisExprlabeled alternative inDialobRuleParser.isExprRule().voidenterLogicExpr(DialobRuleParser.LogicExprContext ctx)Enter a parse tree produced by thelogicExprlabeled alternative inDialobRuleParser.expr().voidenterMatchesExpr(DialobRuleParser.MatchesExprContext ctx)Enter a parse tree produced by thematchesExprlabeled alternative inDialobRuleParser.expr().voidenterNegateExpr(DialobRuleParser.NegateExprContext ctx)Enter a parse tree produced by thenegateExprlabeled alternative inDialobRuleParser.arithExprRule().voidenterNotExpr(DialobRuleParser.NotExprContext ctx)Enter a parse tree produced by thenotExprlabeled alternative inDialobRuleParser.expr().voidenterOfExpr(DialobRuleParser.OfExprContext ctx)Enter a parse tree produced by theofExprlabeled alternative inDialobRuleParser.arithExprRule().voidenterRelationExpr(DialobRuleParser.RelationExprContext ctx)Enter a parse tree produced by therelationExprlabeled alternative inDialobRuleParser.expr().voidexitCallExpr(DialobRuleParser.CallExprContext ctx)Exit a parse tree produced by thecallExprlabeled alternative inDialobRuleParser.arithExprRule().voidexitConstExprRule(DialobRuleParser.ConstExprRuleContext ctx)Exit a parse tree produced byDialobRuleParser.constExprRule().voidexitIdExprRule(DialobRuleParser.IdExprRuleContext ctx)Exit a parse tree produced byDialobRuleParser.idExprRule().voidexitInfixExpr(DialobRuleParser.InfixExprContext ctx)Exit a parse tree produced by theinfixExprlabeled alternative inDialobRuleParser.arithExprRule().voidexitInOperExpr(DialobRuleParser.InOperExprContext ctx)Exit a parse tree produced by theinOperExprlabeled alternative inDialobRuleParser.expr().voidexitIsExpr(DialobRuleParser.IsExprContext ctx)Exit a parse tree produced by theisExprlabeled alternative inDialobRuleParser.isExprRule().voidexitLogicExpr(DialobRuleParser.LogicExprContext ctx)Exit a parse tree produced by thelogicExprlabeled alternative inDialobRuleParser.expr().voidexitMatchesExpr(DialobRuleParser.MatchesExprContext ctx)Exit a parse tree produced by thematchesExprlabeled alternative inDialobRuleParser.expr().voidexitNegateExpr(DialobRuleParser.NegateExprContext ctx)Exit a parse tree produced by thenegateExprlabeled alternative inDialobRuleParser.arithExprRule().voidexitNotExpr(DialobRuleParser.NotExprContext ctx)Exit a parse tree produced by thenotExprlabeled alternative inDialobRuleParser.expr().voidexitOfExpr(DialobRuleParser.OfExprContext ctx)Exit a parse tree produced by theofExprlabeled alternative inDialobRuleParser.arithExprRule().voidexitRelationExpr(DialobRuleParser.RelationExprContext ctx)Exit a parse tree produced by therelationExprlabeled alternative inDialobRuleParser.expr().ASTBuildergetBuilder()protected NodeBasegetLhs()protected List<ValueType>getLhsAndRhsValueTypes()protected NodeBasegetRhs()protected booleanisConstantString(NodeBase lhs)protected booleanisQuoted(@NotNull String text)voidsetErrorLogger(ErrorLogger errorLogger)StringtoString()voidvisitErrorNode(org.antlr.v4.runtime.tree.ErrorNode errorNode)-
Methods inherited from class io.dialob.rule.parser.DialobRuleBaseListener
enterArithExpr, enterCompileUnit, enterConstExpr, enterEveryRule, enterGroupExpr, enterIdExpr, enterIsExprRl, enterListExpr, enterParensExpr, enterReducerExprRule, exitArithExpr, exitCompileUnit, exitConstExpr, exitEveryRule, exitGroupExpr, exitIdExpr, exitIsExprRl, exitListExpr, exitParensExpr, exitReducerExprRule, visitTerminal
-
-
-
-
Field Detail
-
DUMMY_VARIABLE_FINDER
public static final VariableFinder DUMMY_VARIABLE_FINDER
-
-
Constructor Detail
-
ASTBuilderWalker
public ASTBuilderWalker(@NotNull @NotNull VariableFinder variableFinder, Map<NodeBase,String> asyncFunctionVariables)
-
-
Method Detail
-
setErrorLogger
public void setErrorLogger(ErrorLogger errorLogger)
-
getBuilder
public ASTBuilder getBuilder()
-
getLhs
protected NodeBase getLhs()
-
getRhs
protected NodeBase getRhs()
-
enterNotExpr
public void enterNotExpr(DialobRuleParser.NotExprContext ctx)
Description copied from class:DialobRuleBaseListenerEnter a parse tree produced by thenotExprlabeled alternative inDialobRuleParser.expr().The default implementation does nothing.
- Specified by:
enterNotExprin interfaceDialobRuleListener- Overrides:
enterNotExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
exitNotExpr
public void exitNotExpr(DialobRuleParser.NotExprContext ctx)
Description copied from class:DialobRuleBaseListenerExit a parse tree produced by thenotExprlabeled alternative inDialobRuleParser.expr().The default implementation does nothing.
- Specified by:
exitNotExprin interfaceDialobRuleListener- Overrides:
exitNotExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
enterInOperExpr
public void enterInOperExpr(DialobRuleParser.InOperExprContext ctx)
Description copied from class:DialobRuleBaseListenerEnter a parse tree produced by theinOperExprlabeled alternative inDialobRuleParser.expr().The default implementation does nothing.
- Specified by:
enterInOperExprin interfaceDialobRuleListener- Overrides:
enterInOperExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
exitInOperExpr
public void exitInOperExpr(DialobRuleParser.InOperExprContext ctx)
Description copied from class:DialobRuleBaseListenerExit a parse tree produced by theinOperExprlabeled alternative inDialobRuleParser.expr().The default implementation does nothing.
- Specified by:
exitInOperExprin interfaceDialobRuleListener- Overrides:
exitInOperExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
enterLogicExpr
public void enterLogicExpr(DialobRuleParser.LogicExprContext ctx)
Description copied from class:DialobRuleBaseListenerEnter a parse tree produced by thelogicExprlabeled alternative inDialobRuleParser.expr().The default implementation does nothing.
- Specified by:
enterLogicExprin interfaceDialobRuleListener- Overrides:
enterLogicExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
exitLogicExpr
public void exitLogicExpr(DialobRuleParser.LogicExprContext ctx)
Description copied from class:DialobRuleBaseListenerExit a parse tree produced by thelogicExprlabeled alternative inDialobRuleParser.expr().The default implementation does nothing.
- Specified by:
exitLogicExprin interfaceDialobRuleListener- Overrides:
exitLogicExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
enterMatchesExpr
public void enterMatchesExpr(DialobRuleParser.MatchesExprContext ctx)
Description copied from class:DialobRuleBaseListenerEnter a parse tree produced by thematchesExprlabeled alternative inDialobRuleParser.expr().The default implementation does nothing.
- Specified by:
enterMatchesExprin interfaceDialobRuleListener- Overrides:
enterMatchesExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
exitMatchesExpr
public void exitMatchesExpr(DialobRuleParser.MatchesExprContext ctx)
Description copied from class:DialobRuleBaseListenerExit a parse tree produced by thematchesExprlabeled alternative inDialobRuleParser.expr().The default implementation does nothing.
- Specified by:
exitMatchesExprin interfaceDialobRuleListener- Overrides:
exitMatchesExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
enterRelationExpr
public void enterRelationExpr(DialobRuleParser.RelationExprContext ctx)
Description copied from class:DialobRuleBaseListenerEnter a parse tree produced by therelationExprlabeled alternative inDialobRuleParser.expr().The default implementation does nothing.
- Specified by:
enterRelationExprin interfaceDialobRuleListener- Overrides:
enterRelationExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
exitRelationExpr
public void exitRelationExpr(DialobRuleParser.RelationExprContext ctx)
Description copied from class:DialobRuleBaseListenerExit a parse tree produced by therelationExprlabeled alternative inDialobRuleParser.expr().The default implementation does nothing.
- Specified by:
exitRelationExprin interfaceDialobRuleListener- Overrides:
exitRelationExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
isConstantString
protected boolean isConstantString(NodeBase lhs)
-
enterNegateExpr
public void enterNegateExpr(DialobRuleParser.NegateExprContext ctx)
Description copied from class:DialobRuleBaseListenerEnter a parse tree produced by thenegateExprlabeled alternative inDialobRuleParser.arithExprRule().The default implementation does nothing.
- Specified by:
enterNegateExprin interfaceDialobRuleListener- Overrides:
enterNegateExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
exitNegateExpr
public void exitNegateExpr(DialobRuleParser.NegateExprContext ctx)
Description copied from class:DialobRuleBaseListenerExit a parse tree produced by thenegateExprlabeled alternative inDialobRuleParser.arithExprRule().The default implementation does nothing.
- Specified by:
exitNegateExprin interfaceDialobRuleListener- Overrides:
exitNegateExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
enterInfixExpr
public void enterInfixExpr(DialobRuleParser.InfixExprContext ctx)
Description copied from class:DialobRuleBaseListenerEnter a parse tree produced by theinfixExprlabeled alternative inDialobRuleParser.arithExprRule().The default implementation does nothing.
- Specified by:
enterInfixExprin interfaceDialobRuleListener- Overrides:
enterInfixExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
exitInfixExpr
public void exitInfixExpr(DialobRuleParser.InfixExprContext ctx)
Description copied from class:DialobRuleBaseListenerExit a parse tree produced by theinfixExprlabeled alternative inDialobRuleParser.arithExprRule().The default implementation does nothing.
- Specified by:
exitInfixExprin interfaceDialobRuleListener- Overrides:
exitInfixExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
enterCallExpr
public void enterCallExpr(DialobRuleParser.CallExprContext ctx)
Description copied from class:DialobRuleBaseListenerEnter a parse tree produced by thecallExprlabeled alternative inDialobRuleParser.arithExprRule().The default implementation does nothing.
- Specified by:
enterCallExprin interfaceDialobRuleListener- Overrides:
enterCallExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
exitCallExpr
public void exitCallExpr(DialobRuleParser.CallExprContext ctx)
Description copied from class:DialobRuleBaseListenerExit a parse tree produced by thecallExprlabeled alternative inDialobRuleParser.arithExprRule().The default implementation does nothing.
- Specified by:
exitCallExprin interfaceDialobRuleListener- Overrides:
exitCallExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
enterOfExpr
public void enterOfExpr(DialobRuleParser.OfExprContext ctx)
Description copied from class:DialobRuleBaseListenerEnter a parse tree produced by theofExprlabeled alternative inDialobRuleParser.arithExprRule().The default implementation does nothing.
- Specified by:
enterOfExprin interfaceDialobRuleListener- Overrides:
enterOfExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
exitOfExpr
public void exitOfExpr(DialobRuleParser.OfExprContext ctx)
Description copied from class:DialobRuleBaseListenerExit a parse tree produced by theofExprlabeled alternative inDialobRuleParser.arithExprRule().The default implementation does nothing.
- Specified by:
exitOfExprin interfaceDialobRuleListener- Overrides:
exitOfExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
enterIdExprRule
public void enterIdExprRule(DialobRuleParser.IdExprRuleContext ctx)
Description copied from class:DialobRuleBaseListenerEnter a parse tree produced byDialobRuleParser.idExprRule().The default implementation does nothing.
- Specified by:
enterIdExprRulein interfaceDialobRuleListener- Overrides:
enterIdExprRulein classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
exitIdExprRule
public void exitIdExprRule(DialobRuleParser.IdExprRuleContext ctx)
Description copied from class:DialobRuleBaseListenerExit a parse tree produced byDialobRuleParser.idExprRule().The default implementation does nothing.
- Specified by:
exitIdExprRulein interfaceDialobRuleListener- Overrides:
exitIdExprRulein classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
enterConstExprRule
public void enterConstExprRule(DialobRuleParser.ConstExprRuleContext ctx)
Description copied from class:DialobRuleBaseListenerEnter a parse tree produced byDialobRuleParser.constExprRule().The default implementation does nothing.
- Specified by:
enterConstExprRulein interfaceDialobRuleListener- Overrides:
enterConstExprRulein classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
isQuoted
protected boolean isQuoted(@NotNull @NotNull String text)
-
exitConstExprRule
public void exitConstExprRule(DialobRuleParser.ConstExprRuleContext ctx)
Description copied from class:DialobRuleBaseListenerExit a parse tree produced byDialobRuleParser.constExprRule().The default implementation does nothing.
- Specified by:
exitConstExprRulein interfaceDialobRuleListener- Overrides:
exitConstExprRulein classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
visitErrorNode
public void visitErrorNode(org.antlr.v4.runtime.tree.ErrorNode errorNode)
Description copied from class:DialobRuleBaseListenerThe default implementation does nothing.
- Specified by:
visitErrorNodein interfaceorg.antlr.v4.runtime.tree.ParseTreeListener- Overrides:
visitErrorNodein classDialobRuleBaseListener
-
enterIsExpr
public void enterIsExpr(DialobRuleParser.IsExprContext ctx)
Description copied from class:DialobRuleBaseListenerEnter a parse tree produced by theisExprlabeled alternative inDialobRuleParser.isExprRule().The default implementation does nothing.
- Specified by:
enterIsExprin interfaceDialobRuleListener- Overrides:
enterIsExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
exitIsExpr
public void exitIsExpr(DialobRuleParser.IsExprContext ctx)
Description copied from class:DialobRuleBaseListenerExit a parse tree produced by theisExprlabeled alternative inDialobRuleParser.isExprRule().The default implementation does nothing.
- Specified by:
exitIsExprin interfaceDialobRuleListener- Overrides:
exitIsExprin classDialobRuleBaseListener- Parameters:
ctx- the parse tree
-
-