public class CalculatorBaseListener extends Object implements CalculatorListener
CalculatorListener,
which can be extended to create a listener which only needs to handle a subset
of the available methods.| Constructor and Description |
|---|
CalculatorBaseListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
enterAddSub(CalculatorParser.AddSubContext ctx)
Enter a parse tree produced by the
AddSub
labeled alternative in CalculatorParser.expr(). |
void |
enterAssign(CalculatorParser.AssignContext ctx)
Enter a parse tree produced by the
assign
labeled alternative in CalculatorParser.statement(). |
void |
enterBlank(CalculatorParser.BlankContext ctx)
Enter a parse tree produced by the
blank
labeled alternative in CalculatorParser.statement(). |
void |
enterEveryRule(org.antlr.v4.runtime.ParserRuleContext ctx)
The default implementation does nothing.
|
void |
enterId(CalculatorParser.IdContext ctx)
Enter a parse tree produced by the
id
labeled alternative in CalculatorParser.expr(). |
void |
enterInt(CalculatorParser.IntContext ctx)
Enter a parse tree produced by the
int
labeled alternative in CalculatorParser.expr(). |
void |
enterMulDiv(CalculatorParser.MulDivContext ctx)
Enter a parse tree produced by the
MulDiv
labeled alternative in CalculatorParser.expr(). |
void |
enterParenthese(CalculatorParser.ParentheseContext ctx)
Enter a parse tree produced by the
parenthese
labeled alternative in CalculatorParser.expr(). |
void |
enterPrint(CalculatorParser.PrintContext ctx)
Enter a parse tree produced by the
print
labeled alternative in CalculatorParser.statement(). |
void |
enterProgram(CalculatorParser.ProgramContext ctx)
Enter a parse tree produced by
CalculatorParser.program(). |
void |
exitAddSub(CalculatorParser.AddSubContext ctx)
Exit a parse tree produced by the
AddSub
labeled alternative in CalculatorParser.expr(). |
void |
exitAssign(CalculatorParser.AssignContext ctx)
Exit a parse tree produced by the
assign
labeled alternative in CalculatorParser.statement(). |
void |
exitBlank(CalculatorParser.BlankContext ctx)
Exit a parse tree produced by the
blank
labeled alternative in CalculatorParser.statement(). |
void |
exitEveryRule(org.antlr.v4.runtime.ParserRuleContext ctx)
The default implementation does nothing.
|
void |
exitId(CalculatorParser.IdContext ctx)
Exit a parse tree produced by the
id
labeled alternative in CalculatorParser.expr(). |
void |
exitInt(CalculatorParser.IntContext ctx)
Exit a parse tree produced by the
int
labeled alternative in CalculatorParser.expr(). |
void |
exitMulDiv(CalculatorParser.MulDivContext ctx)
Exit a parse tree produced by the
MulDiv
labeled alternative in CalculatorParser.expr(). |
void |
exitParenthese(CalculatorParser.ParentheseContext ctx)
Exit a parse tree produced by the
parenthese
labeled alternative in CalculatorParser.expr(). |
void |
exitPrint(CalculatorParser.PrintContext ctx)
Exit a parse tree produced by the
print
labeled alternative in CalculatorParser.statement(). |
void |
exitProgram(CalculatorParser.ProgramContext ctx)
Exit a parse tree produced by
CalculatorParser.program(). |
void |
visitErrorNode(org.antlr.v4.runtime.tree.ErrorNode node)
The default implementation does nothing.
|
void |
visitTerminal(org.antlr.v4.runtime.tree.TerminalNode node)
The default implementation does nothing.
|
public void enterProgram(CalculatorParser.ProgramContext ctx)
CalculatorParser.program().
The default implementation does nothing.
enterProgram in interface CalculatorListenerctx - the parse treepublic void exitProgram(CalculatorParser.ProgramContext ctx)
CalculatorParser.program().
The default implementation does nothing.
exitProgram in interface CalculatorListenerctx - the parse treepublic void enterPrint(CalculatorParser.PrintContext ctx)
print
labeled alternative in CalculatorParser.statement().
The default implementation does nothing.
enterPrint in interface CalculatorListenerctx - the parse treepublic void exitPrint(CalculatorParser.PrintContext ctx)
print
labeled alternative in CalculatorParser.statement().
The default implementation does nothing.
exitPrint in interface CalculatorListenerctx - the parse treepublic void enterAssign(CalculatorParser.AssignContext ctx)
assign
labeled alternative in CalculatorParser.statement().
The default implementation does nothing.
enterAssign in interface CalculatorListenerctx - the parse treepublic void exitAssign(CalculatorParser.AssignContext ctx)
assign
labeled alternative in CalculatorParser.statement().
The default implementation does nothing.
exitAssign in interface CalculatorListenerctx - the parse treepublic void enterBlank(CalculatorParser.BlankContext ctx)
blank
labeled alternative in CalculatorParser.statement().
The default implementation does nothing.
enterBlank in interface CalculatorListenerctx - the parse treepublic void exitBlank(CalculatorParser.BlankContext ctx)
blank
labeled alternative in CalculatorParser.statement().
The default implementation does nothing.
exitBlank in interface CalculatorListenerctx - the parse treepublic void enterMulDiv(CalculatorParser.MulDivContext ctx)
MulDiv
labeled alternative in CalculatorParser.expr().
The default implementation does nothing.
enterMulDiv in interface CalculatorListenerctx - the parse treepublic void exitMulDiv(CalculatorParser.MulDivContext ctx)
MulDiv
labeled alternative in CalculatorParser.expr().
The default implementation does nothing.
exitMulDiv in interface CalculatorListenerctx - the parse treepublic void enterAddSub(CalculatorParser.AddSubContext ctx)
AddSub
labeled alternative in CalculatorParser.expr().
The default implementation does nothing.
enterAddSub in interface CalculatorListenerctx - the parse treepublic void exitAddSub(CalculatorParser.AddSubContext ctx)
AddSub
labeled alternative in CalculatorParser.expr().
The default implementation does nothing.
exitAddSub in interface CalculatorListenerctx - the parse treepublic void enterParenthese(CalculatorParser.ParentheseContext ctx)
parenthese
labeled alternative in CalculatorParser.expr().
The default implementation does nothing.
enterParenthese in interface CalculatorListenerctx - the parse treepublic void exitParenthese(CalculatorParser.ParentheseContext ctx)
parenthese
labeled alternative in CalculatorParser.expr().
The default implementation does nothing.
exitParenthese in interface CalculatorListenerctx - the parse treepublic void enterId(CalculatorParser.IdContext ctx)
id
labeled alternative in CalculatorParser.expr().
The default implementation does nothing.
enterId in interface CalculatorListenerctx - the parse treepublic void exitId(CalculatorParser.IdContext ctx)
id
labeled alternative in CalculatorParser.expr().
The default implementation does nothing.
exitId in interface CalculatorListenerctx - the parse treepublic void enterInt(CalculatorParser.IntContext ctx)
int
labeled alternative in CalculatorParser.expr().
The default implementation does nothing.
enterInt in interface CalculatorListenerctx - the parse treepublic void exitInt(CalculatorParser.IntContext ctx)
int
labeled alternative in CalculatorParser.expr().
The default implementation does nothing.
exitInt in interface CalculatorListenerctx - the parse treepublic void enterEveryRule(org.antlr.v4.runtime.ParserRuleContext ctx)
The default implementation does nothing.
enterEveryRule in interface org.antlr.v4.runtime.tree.ParseTreeListenerpublic void exitEveryRule(org.antlr.v4.runtime.ParserRuleContext ctx)
The default implementation does nothing.
exitEveryRule in interface org.antlr.v4.runtime.tree.ParseTreeListenerpublic void visitTerminal(org.antlr.v4.runtime.tree.TerminalNode node)
The default implementation does nothing.
visitTerminal in interface org.antlr.v4.runtime.tree.ParseTreeListenerpublic void visitErrorNode(org.antlr.v4.runtime.tree.ErrorNode node)
The default implementation does nothing.
visitErrorNode in interface org.antlr.v4.runtime.tree.ParseTreeListenerCopyright © 2025. All rights reserved.