T
- The return type of the visit operation. Use Void
for
operations with no return type.public class BasicBaseVisitor<T> extends AbstractParseTreeVisitor<T> implements BasicVisitor<T>
BasicVisitor
,
which can be extended to create a visitor which only needs to handle a subset
of the available methods.Constructor and Description |
---|
BasicBaseVisitor() |
Modifier and Type | Method and Description |
---|---|
T |
visitAssign(BasicParser.AssignContext ctx)
Visit a parse tree produced by the
assign
labeled alternative in BasicParser.singleExpr() . |
T |
visitBlock(BasicParser.BlockContext ctx)
Visit a parse tree produced by the
block
labeled alternative in BasicParser.singleExpr() . |
T |
visitBool(BasicParser.BoolContext ctx)
Visit a parse tree produced by the
bool
labeled alternative in BasicParser.singleExpr() . |
T |
visitChar(BasicParser.CharContext ctx)
Visit a parse tree produced by the
char
labeled alternative in BasicParser.singleExpr() . |
T |
visitDeclare(BasicParser.DeclareContext ctx)
Visit a parse tree produced by the
declare
labeled alternative in BasicParser.singleExpr() . |
T |
visitExpr(BasicParser.ExprContext ctx)
Visit a parse tree produced by
BasicParser.expr() . |
T |
visitIf(BasicParser.IfContext ctx)
Visit a parse tree produced by the
if
labeled alternative in BasicParser.singleExpr() . |
T |
visitInfix1(BasicParser.Infix1Context ctx)
Visit a parse tree produced by the
infix1
labeled alternative in BasicParser.singleExpr() . |
T |
visitInfix2(BasicParser.Infix2Context ctx)
Visit a parse tree produced by the
infix2
labeled alternative in BasicParser.singleExpr() . |
T |
visitInfix3(BasicParser.Infix3Context ctx)
Visit a parse tree produced by the
infix3
labeled alternative in BasicParser.singleExpr() . |
T |
visitInfix4(BasicParser.Infix4Context ctx)
Visit a parse tree produced by the
infix4
labeled alternative in BasicParser.singleExpr() . |
T |
visitInfix5(BasicParser.Infix5Context ctx)
Visit a parse tree produced by the
infix5
labeled alternative in BasicParser.singleExpr() . |
T |
visitNumber(BasicParser.NumberContext ctx)
Visit a parse tree produced by the
number
labeled alternative in BasicParser.singleExpr() . |
T |
visitParens(BasicParser.ParensContext ctx)
Visit a parse tree produced by the
parens
labeled alternative in BasicParser.singleExpr() . |
T |
visitPrefix1(BasicParser.Prefix1Context ctx)
Visit a parse tree produced by the
prefix1
labeled alternative in BasicParser.singleExpr() . |
T |
visitProgram(BasicParser.ProgramContext ctx)
Visit a parse tree produced by
BasicParser.program() . |
T |
visitRead(BasicParser.ReadContext ctx)
Visit a parse tree produced by the
read
labeled alternative in BasicParser.singleExpr() . |
T |
visitType(BasicParser.TypeContext ctx)
Visit a parse tree produced by
BasicParser.type() . |
T |
visitVar(BasicParser.VarContext ctx)
Visit a parse tree produced by the
var
labeled alternative in BasicParser.singleExpr() . |
T |
visitVariable(BasicParser.VariableContext ctx)
Visit a parse tree produced by
BasicParser.variable() . |
T |
visitWhile(BasicParser.WhileContext ctx)
Visit a parse tree produced by the
while
labeled alternative in BasicParser.singleExpr() . |
T |
visitWrite(BasicParser.WriteContext ctx)
Visit a parse tree produced by the
write
labeled alternative in BasicParser.singleExpr() . |
visit, visitChildren, visitErrorNode, visitTerminal
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visit, visitChildren, visitErrorNode, visitTerminal
public T visitProgram(BasicParser.ProgramContext ctx)
BasicParser.program()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitProgram
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitExpr(BasicParser.ExprContext ctx)
BasicParser.expr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitExpr
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitParens(BasicParser.ParensContext ctx)
parens
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitParens
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitRead(BasicParser.ReadContext ctx)
read
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitRead
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitDeclare(BasicParser.DeclareContext ctx)
declare
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitDeclare
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitBool(BasicParser.BoolContext ctx)
bool
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitBool
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitVar(BasicParser.VarContext ctx)
var
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitVar
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitInfix2(BasicParser.Infix2Context ctx)
infix2
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitInfix2
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitInfix3(BasicParser.Infix3Context ctx)
infix3
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitInfix3
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitInfix1(BasicParser.Infix1Context ctx)
infix1
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitInfix1
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitWhile(BasicParser.WhileContext ctx)
while
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitWhile
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitInfix4(BasicParser.Infix4Context ctx)
infix4
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitInfix4
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitInfix5(BasicParser.Infix5Context ctx)
infix5
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitInfix5
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitNumber(BasicParser.NumberContext ctx)
number
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitNumber
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitChar(BasicParser.CharContext ctx)
char
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitChar
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitBlock(BasicParser.BlockContext ctx)
block
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitBlock
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitWrite(BasicParser.WriteContext ctx)
write
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitWrite
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitIf(BasicParser.IfContext ctx)
if
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitIf
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitPrefix1(BasicParser.Prefix1Context ctx)
prefix1
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitPrefix1
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitAssign(BasicParser.AssignContext ctx)
assign
labeled alternative in BasicParser.singleExpr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitAssign
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitType(BasicParser.TypeContext ctx)
BasicParser.type()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitType
in interface BasicVisitor<T>
ctx
- the parse treepublic T visitVariable(BasicParser.VariableContext ctx)
BasicParser.variable()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitVariable
in interface BasicVisitor<T>
ctx
- the parse tree