public class BoppiBasicChecker extends BasicBaseVisitor<SimpleType>
Constructor and Description |
---|
BoppiBasicChecker(Logger logger,
Annotations annotations) |
Modifier and Type | Method and Description |
---|---|
SimpleType |
visit(ParseTree tree) |
SimpleType |
visitAssign(BasicParser.AssignContext ctx)
Visit a parse tree produced by the
assign
labeled alternative in BasicParser.singleExpr() . |
SimpleType |
visitBlock(BasicParser.BlockContext ctx)
Visit a parse tree produced by the
block
labeled alternative in BasicParser.singleExpr() . |
SimpleType |
visitBool(BasicParser.BoolContext ctx)
Visit a parse tree produced by the
bool
labeled alternative in BasicParser.singleExpr() . |
SimpleType |
visitChar(BasicParser.CharContext ctx)
Visit a parse tree produced by the
char
labeled alternative in BasicParser.singleExpr() . |
SimpleType |
visitDeclare(BasicParser.DeclareContext ctx)
Visit a parse tree produced by the
declare
labeled alternative in BasicParser.singleExpr() . |
SimpleType |
visitExpr(BasicParser.ExprContext ctx)
Visit a parse tree produced by
BasicParser.expr() . |
SimpleType |
visitIf(BasicParser.IfContext ctx)
Visit a parse tree produced by the
if
labeled alternative in BasicParser.singleExpr() . |
SimpleType |
visitInfix1(BasicParser.Infix1Context ctx)
Visit a parse tree produced by the
infix1
labeled alternative in BasicParser.singleExpr() . |
SimpleType |
visitInfix2(BasicParser.Infix2Context ctx)
Visit a parse tree produced by the
infix2
labeled alternative in BasicParser.singleExpr() . |
SimpleType |
visitInfix3(BasicParser.Infix3Context ctx)
Visit a parse tree produced by the
infix3
labeled alternative in BasicParser.singleExpr() . |
SimpleType |
visitInfix4(BasicParser.Infix4Context ctx)
Visit a parse tree produced by the
infix4
labeled alternative in BasicParser.singleExpr() . |
SimpleType |
visitInfix5(BasicParser.Infix5Context ctx)
Visit a parse tree produced by the
infix5
labeled alternative in BasicParser.singleExpr() . |
SimpleType |
visitNumber(BasicParser.NumberContext ctx)
Visit a parse tree produced by the
number
labeled alternative in BasicParser.singleExpr() . |
SimpleType |
visitParens(BasicParser.ParensContext ctx)
Visit a parse tree produced by the
parens
labeled alternative in BasicParser.singleExpr() . |
SimpleType |
visitPrefix1(BasicParser.Prefix1Context ctx)
Visit a parse tree produced by the
prefix1
labeled alternative in BasicParser.singleExpr() . |
SimpleType |
visitProgram(BasicParser.ProgramContext ctx)
Visit a parse tree produced by
BasicParser.program() . |
SimpleType |
visitRead(BasicParser.ReadContext ctx)
Visit a parse tree produced by the
read
labeled alternative in BasicParser.singleExpr() . |
SimpleType |
visitType(BasicParser.TypeContext ctx)
Visit a parse tree produced by
BasicParser.type() . |
SimpleType |
visitVar(BasicParser.VarContext ctx)
Visit a parse tree produced by the
var
labeled alternative in BasicParser.singleExpr() . |
SimpleType |
visitVariable(BasicParser.VariableContext ctx)
Visit a parse tree produced by
BasicParser.variable() . |
SimpleType |
visitWhile(BasicParser.WhileContext ctx)
Visit a parse tree produced by the
while
labeled alternative in BasicParser.singleExpr() . |
SimpleType |
visitWrite(BasicParser.WriteContext ctx)
Visit a parse tree produced by the
write
labeled alternative in BasicParser.singleExpr() . |
visitChildren, visitErrorNode, visitTerminal
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitChildren, visitErrorNode, visitTerminal
public BoppiBasicChecker(Logger logger, Annotations annotations)
public SimpleType visit(ParseTree tree)
visit
in interface ParseTreeVisitor<SimpleType>
visit
in class AbstractParseTreeVisitor<SimpleType>
public SimpleType visitAssign(BasicParser.AssignContext ctx)
BasicBaseVisitor
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<SimpleType>
visitAssign
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitBool(BasicParser.BoolContext ctx)
BasicBaseVisitor
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<SimpleType>
visitBool
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitBlock(BasicParser.BlockContext ctx)
BasicBaseVisitor
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<SimpleType>
visitBlock
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitChar(BasicParser.CharContext ctx)
BasicBaseVisitor
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<SimpleType>
visitChar
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitExpr(BasicParser.ExprContext ctx)
BasicBaseVisitor
BasicParser.expr()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitExpr
in interface BasicVisitor<SimpleType>
visitExpr
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitDeclare(BasicParser.DeclareContext ctx)
BasicBaseVisitor
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<SimpleType>
visitDeclare
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitIf(BasicParser.IfContext ctx)
BasicBaseVisitor
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<SimpleType>
visitIf
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitInfix1(BasicParser.Infix1Context ctx)
BasicBaseVisitor
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<SimpleType>
visitInfix1
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitInfix2(BasicParser.Infix2Context ctx)
BasicBaseVisitor
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<SimpleType>
visitInfix2
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitInfix3(BasicParser.Infix3Context ctx)
BasicBaseVisitor
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<SimpleType>
visitInfix3
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitInfix4(BasicParser.Infix4Context ctx)
BasicBaseVisitor
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<SimpleType>
visitInfix4
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitInfix5(BasicParser.Infix5Context ctx)
BasicBaseVisitor
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<SimpleType>
visitInfix5
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitNumber(BasicParser.NumberContext ctx)
BasicBaseVisitor
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<SimpleType>
visitNumber
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitParens(BasicParser.ParensContext ctx)
BasicBaseVisitor
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<SimpleType>
visitParens
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitPrefix1(BasicParser.Prefix1Context ctx)
BasicBaseVisitor
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<SimpleType>
visitPrefix1
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitProgram(BasicParser.ProgramContext ctx)
BasicBaseVisitor
BasicParser.program()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitProgram
in interface BasicVisitor<SimpleType>
visitProgram
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitRead(BasicParser.ReadContext ctx)
BasicBaseVisitor
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<SimpleType>
visitRead
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitType(BasicParser.TypeContext ctx)
BasicBaseVisitor
BasicParser.type()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitType
in interface BasicVisitor<SimpleType>
visitType
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitVar(BasicParser.VarContext ctx)
BasicBaseVisitor
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<SimpleType>
visitVar
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitVariable(BasicParser.VariableContext ctx)
BasicBaseVisitor
BasicParser.variable()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitVariable
in interface BasicVisitor<SimpleType>
visitVariable
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitWhile(BasicParser.WhileContext ctx)
BasicBaseVisitor
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<SimpleType>
visitWhile
in class BasicBaseVisitor<SimpleType>
ctx
- the parse treepublic SimpleType visitWrite(BasicParser.WriteContext ctx)
BasicBaseVisitor
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<SimpleType>
visitWrite
in class BasicBaseVisitor<SimpleType>
ctx
- the parse tree