Class calculatorBaseVisitor<T>
- Type Parameters:
T- The return type of the visit operation. UseVoidfor operations with no return type.
- All Implemented Interfaces:
calculatorVisitor<T>, org.antlr.v4.runtime.tree.ParseTreeVisitor<T>
- Direct Known Subclasses:
ParserVisitor
calculatorVisitor,
which can be extended to create a visitor which only needs to handle a subset
of the available methods.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionVisit a parse tree produced by theAtomComplexlabeled alternative incalculatorParser.atom().Visit a parse tree produced by theAtomNumberlabeled alternative incalculatorParser.atom().Visit a parse tree produced by theCompleteInfixlabeled alternative incalculatorParser.complete().Visit a parse tree produced by theCompletePostfixlabeled alternative incalculatorParser.complete().Visit a parse tree produced by theCompletePrefixlabeled alternative incalculatorParser.complete().Visit a parse tree produced by theComplexNumberlabeled alternative incalculatorParser.complex().Visit a parse tree produced by theConstEulerlabeled alternative incalculatorParser.constant().Visit a parse tree produced by theConstPilabeled alternative incalculatorParser.constant().Visit a parse tree produced by theFnAcoslabeled alternative incalculatorParser.funcname().Visit a parse tree produced by theFnAsinlabeled alternative incalculatorParser.funcname().Visit a parse tree produced by theFnAtanlabeled alternative incalculatorParser.funcname().Visit a parse tree produced by theFnCoslabeled alternative incalculatorParser.funcname().Visit a parse tree produced by theFnCoshlabeled alternative incalculatorParser.funcname().Visit a parse tree produced by theFnLnlabeled alternative incalculatorParser.funcname().Visit a parse tree produced by theFnLoglabeled alternative incalculatorParser.funcname().Visit a parse tree produced by theFnSinlabeled alternative incalculatorParser.funcname().Visit a parse tree produced by theFnSinhlabeled alternative incalculatorParser.funcname().Visit a parse tree produced by theFnSqrtlabeled alternative incalculatorParser.funcname().Visit a parse tree produced by theFnTanlabeled alternative incalculatorParser.funcname().Visit a parse tree produced by theFnTanhlabeled alternative incalculatorParser.funcname().Visit a parse tree produced by theINAddSublabeled alternative incalculatorParser.expressionIN().Visit a parse tree produced by theInfixFunctionCalllabeled alternative incalculatorParser.functionIN().Visit a parse tree produced by theINFunctionlabeled alternative incalculatorParser.atomIN().Visit a parse tree produced by theINImplicitMultlabeled alternative incalculatorParser.atomIN().Visit a parse tree produced by theINMultlabeled alternative incalculatorParser.multExp().Visit a parse tree produced by theINParenthesislabeled alternative incalculatorParser.atomIN().Visit a parse tree produced by theINPowlabeled alternative incalculatorParser.powExp().Visit a parse tree produced by theINSignedAtomlabeled alternative incalculatorParser.atomIN().Visit a parse tree produced by theINTimesDivlabeled alternative incalculatorParser.multExp().Visit a parse tree produced by theNumberConstantlabeled alternative incalculatorParser.number().Visit a parse tree produced by theNumberReallabeled alternative incalculatorParser.number().Visit a parse tree produced by theNumberScientificlabeled alternative incalculatorParser.number().Visit a parse tree produced by theOpDivlabeled alternative incalculatorParser.operator().Visit a parse tree produced by theOpMinuslabeled alternative incalculatorParser.operator().Visit a parse tree produced by theOpPluslabeled alternative incalculatorParser.operator().Visit a parse tree produced by theOpPowlabeled alternative incalculatorParser.operator().Visit a parse tree produced by theOpTimeslabeled alternative incalculatorParser.operator().Visit a parse tree produced by thePost2Paramlabeled alternative incalculatorParser.expressionPOST().Visit a parse tree produced by thePostAtomlabeled alternative incalculatorParser.expressionPOST().Visit a parse tree produced by thePostFunclabeled alternative incalculatorParser.expressionPOST().Visit a parse tree produced by thePostFunc1Paramlabeled alternative incalculatorParser.expressionPOST().Visit a parse tree produced by thePostMultlabeled alternative incalculatorParser.expressionPOST().Visit a parse tree produced by thePostPlus2Paramlabeled alternative incalculatorParser.expressionPOST().Visit a parse tree produced by thePre2Paramlabeled alternative incalculatorParser.expressionPRE().Visit a parse tree produced by thePreAtomlabeled alternative incalculatorParser.expressionPRE().Visit a parse tree produced by thePreFunclabeled alternative incalculatorParser.expressionPRE().Visit a parse tree produced by thePreFunc1Paramlabeled alternative incalculatorParser.expressionPRE().Visit a parse tree produced by thePreMultlabeled alternative incalculatorParser.expressionPRE().Visit a parse tree produced by thePrePlus2Paramlabeled alternative incalculatorParser.expressionPRE().Visit a parse tree produced by theRealNumberlabeled alternative incalculatorParser.real().Visit a parse tree produced by theScientificNumberlabeled alternative incalculatorParser.scientific().Methods inherited from class org.antlr.v4.runtime.tree.AbstractParseTreeVisitor
aggregateResult, defaultResult, shouldVisitNextChild, visit, visitChildren, visitErrorNode, visitTerminalMethods inherited from class 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
-
calculatorBaseVisitor
public calculatorBaseVisitor()
-
-
Method Details
-
visitCompleteInfix
Visit a parse tree produced by theCompleteInfixlabeled alternative incalculatorParser.complete().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitCompleteInfixin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitCompletePostfix
Visit a parse tree produced by theCompletePostfixlabeled alternative incalculatorParser.complete().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitCompletePostfixin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitCompletePrefix
Visit a parse tree produced by theCompletePrefixlabeled alternative incalculatorParser.complete().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitCompletePrefixin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitPre2Param
Visit a parse tree produced by thePre2Paramlabeled alternative incalculatorParser.expressionPRE().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitPre2Paramin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitPrePlus2Param
Visit a parse tree produced by thePrePlus2Paramlabeled alternative incalculatorParser.expressionPRE().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitPrePlus2Paramin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitPreMult
Visit a parse tree produced by thePreMultlabeled alternative incalculatorParser.expressionPRE().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitPreMultin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitPreFunc
Visit a parse tree produced by thePreFunclabeled alternative incalculatorParser.expressionPRE().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitPreFuncin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitPreAtom
Visit a parse tree produced by thePreAtomlabeled alternative incalculatorParser.expressionPRE().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitPreAtomin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitPreFunc1Param
Visit a parse tree produced by thePreFunc1Paramlabeled alternative incalculatorParser.expressionPRE().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitPreFunc1Paramin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitPostAtom
Visit a parse tree produced by thePostAtomlabeled alternative incalculatorParser.expressionPOST().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitPostAtomin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitPostFunc1Param
Visit a parse tree produced by thePostFunc1Paramlabeled alternative incalculatorParser.expressionPOST().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitPostFunc1Paramin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitPostMult
Visit a parse tree produced by thePostMultlabeled alternative incalculatorParser.expressionPOST().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitPostMultin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitPostFunc
Visit a parse tree produced by thePostFunclabeled alternative incalculatorParser.expressionPOST().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitPostFuncin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitPostPlus2Param
Visit a parse tree produced by thePostPlus2Paramlabeled alternative incalculatorParser.expressionPOST().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitPostPlus2Paramin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitPost2Param
Visit a parse tree produced by thePost2Paramlabeled alternative incalculatorParser.expressionPOST().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitPost2Paramin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitOpPlus
Visit a parse tree produced by theOpPluslabeled alternative incalculatorParser.operator().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitOpPlusin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitOpMinus
Visit a parse tree produced by theOpMinuslabeled alternative incalculatorParser.operator().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitOpMinusin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitOpTimes
Visit a parse tree produced by theOpTimeslabeled alternative incalculatorParser.operator().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitOpTimesin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitOpDiv
Visit a parse tree produced by theOpDivlabeled alternative incalculatorParser.operator().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitOpDivin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitOpPow
Visit a parse tree produced by theOpPowlabeled alternative incalculatorParser.operator().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitOpPowin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitINAddSub
Visit a parse tree produced by theINAddSublabeled alternative incalculatorParser.expressionIN().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitINAddSubin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitINTimesDiv
Visit a parse tree produced by theINTimesDivlabeled alternative incalculatorParser.multExp().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitINTimesDivin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitINMult
Visit a parse tree produced by theINMultlabeled alternative incalculatorParser.multExp().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitINMultin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitINPow
Visit a parse tree produced by theINPowlabeled alternative incalculatorParser.powExp().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitINPowin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitINSignedAtom
Visit a parse tree produced by theINSignedAtomlabeled alternative incalculatorParser.atomIN().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitINSignedAtomin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitINImplicitMult
Visit a parse tree produced by theINImplicitMultlabeled alternative incalculatorParser.atomIN().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitINImplicitMultin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitINParenthesis
Visit a parse tree produced by theINParenthesislabeled alternative incalculatorParser.atomIN().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitINParenthesisin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitINFunction
Visit a parse tree produced by theINFunctionlabeled alternative incalculatorParser.atomIN().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitINFunctionin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitAtomComplex
Visit a parse tree produced by theAtomComplexlabeled alternative incalculatorParser.atom().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitAtomComplexin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitAtomNumber
Visit a parse tree produced by theAtomNumberlabeled alternative incalculatorParser.atom().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitAtomNumberin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitNumberConstant
Visit a parse tree produced by theNumberConstantlabeled alternative incalculatorParser.number().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitNumberConstantin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitNumberReal
Visit a parse tree produced by theNumberReallabeled alternative incalculatorParser.number().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitNumberRealin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitNumberScientific
Visit a parse tree produced by theNumberScientificlabeled alternative incalculatorParser.number().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitNumberScientificin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitScientificNumber
Visit a parse tree produced by theScientificNumberlabeled alternative incalculatorParser.scientific().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitScientificNumberin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitRealNumber
Visit a parse tree produced by theRealNumberlabeled alternative incalculatorParser.real().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitRealNumberin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitComplexNumber
Visit a parse tree produced by theComplexNumberlabeled alternative incalculatorParser.complex().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitComplexNumberin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitConstPi
Visit a parse tree produced by theConstPilabeled alternative incalculatorParser.constant().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitConstPiin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitConstEuler
Visit a parse tree produced by theConstEulerlabeled alternative incalculatorParser.constant().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitConstEulerin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitInfixFunctionCall
Visit a parse tree produced by theInfixFunctionCalllabeled alternative incalculatorParser.functionIN().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitInfixFunctionCallin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFnCos
Visit a parse tree produced by theFnCoslabeled alternative incalculatorParser.funcname().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitFnCosin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFnTan
Visit a parse tree produced by theFnTanlabeled alternative incalculatorParser.funcname().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitFnTanin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFnSin
Visit a parse tree produced by theFnSinlabeled alternative incalculatorParser.funcname().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitFnSinin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFnAcos
Visit a parse tree produced by theFnAcoslabeled alternative incalculatorParser.funcname().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitFnAcosin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFnAtan
Visit a parse tree produced by theFnAtanlabeled alternative incalculatorParser.funcname().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitFnAtanin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFnAsin
Visit a parse tree produced by theFnAsinlabeled alternative incalculatorParser.funcname().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitFnAsinin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFnLog
Visit a parse tree produced by theFnLoglabeled alternative incalculatorParser.funcname().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitFnLogin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFnLn
Visit a parse tree produced by theFnLnlabeled alternative incalculatorParser.funcname().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitFnLnin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFnSqrt
Visit a parse tree produced by theFnSqrtlabeled alternative incalculatorParser.funcname().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitFnSqrtin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFnCosh
Visit a parse tree produced by theFnCoshlabeled alternative incalculatorParser.funcname().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitFnCoshin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFnSinh
Visit a parse tree produced by theFnSinhlabeled alternative incalculatorParser.funcname().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitFnSinhin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFnTanh
Visit a parse tree produced by theFnTanhlabeled alternative incalculatorParser.funcname().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(RuleNode)onctx.- Specified by:
visitFnTanhin interfacecalculatorVisitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-