Class Python3BaseVisitor<T>
- Type Parameters:
T- The return type of the visit operation. UseVoidfor operations with no return type.
- All Implemented Interfaces:
Python3Visitor<T>,org.antlr.v4.runtime.tree.ParseTreeVisitor<T>
Python3Visitor,
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 theadditiveExprlabeled alternative inPython3Parser.expr().Visit a parse tree produced by theandExprlabeled alternative inPython3Parser.expr().Visit a parse tree produced byPython3Parser.arguments().Visit a parse tree produced byPython3Parser.array().Visit a parse tree produced by thearrayExprlabeled alternative inPython3Parser.expr().Visit a parse tree produced byPython3Parser.assignment_stmt().Visit a parse tree produced byPython3Parser.atom_expr().Visit a parse tree produced by theatomExpExprlabeled alternative inPython3Parser.expr().Visit a parse tree produced by theatomExprlabeled alternative inPython3Parser.expr().Visit a parse tree produced byPython3Parser.block().Visit a parse tree produced by thebooleanAtomlabeled alternative inPython3Parser.atom().Visit a parse tree produced byPython3Parser.break_stmt().Visit a parse tree produced byPython3Parser.compound_stmt().Visit a parse tree produced byPython3Parser.continue_stmt().Visit a parse tree produced byPython3Parser.dotted_as_name().Visit a parse tree produced byPython3Parser.dotted_as_names().Visit a parse tree produced byPython3Parser.dotted_name().Visit a parse tree produced by theequalityExprlabeled alternative inPython3Parser.expr().Visit a parse tree produced byPython3Parser.flow_stmt().Visit a parse tree produced byPython3Parser.funcCall().Visit a parse tree produced by thefuncExprlabeled alternative inPython3Parser.expr().Visit a parse tree produced byPython3Parser.if_stmt().Visit a parse tree produced byPython3Parser.import_as_name().Visit a parse tree produced byPython3Parser.import_as_names().Visit a parse tree produced byPython3Parser.import_from().Visit a parse tree produced byPython3Parser.import_name().Visit a parse tree produced byPython3Parser.import_stmt().Visit a parse tree produced by themultiplicationExprlabeled alternative inPython3Parser.expr().Visit a parse tree produced by thenameAtomlabeled alternative inPython3Parser.atom().Visit a parse tree produced by thenilAtomlabeled alternative inPython3Parser.atom().Visit a parse tree produced by thenotExprlabeled alternative inPython3Parser.expr().Visit a parse tree produced by thenumberAtomlabeled alternative inPython3Parser.atom().Visit a parse tree produced by theorExprlabeled alternative inPython3Parser.expr().Visit a parse tree produced by theparExprlabeled alternative inPython3Parser.atom().Visit a parse tree produced by thepowExprlabeled alternative inPython3Parser.expr().Visit a parse tree produced byPython3Parser.print_stmt().Visit a parse tree produced by therelationalExprlabeled alternative inPython3Parser.expr().Visit a parse tree produced byPython3Parser.return_stmt().Visit a parse tree produced byPython3Parser.simple_stmt().Visit a parse tree produced byPython3Parser.sliceop().Visit a parse tree produced byPython3Parser.small_stmt().Visit a parse tree produced byPython3Parser.source().Visit a parse tree produced byPython3Parser.stmt().Visit a parse tree produced by thestringAtomlabeled alternative inPython3Parser.atom().Visit a parse tree produced byPython3Parser.subscript_().Visit a parse tree produced byPython3Parser.subscriptlist().Visit a parse tree produced byPython3Parser.test().Visit a parse tree produced byPython3Parser.test_block().Visit a parse tree produced by theunaryMinusExprlabeled alternative inPython3Parser.expr().Visit a parse tree produced byPython3Parser.while_stmt().Methods inherited from class org.antlr.v4.runtime.tree.AbstractParseTreeVisitor
aggregateResult, defaultResult, shouldVisitNextChild, visit, visitChildren, visitErrorNode, visitTerminalMethods inherited from class java.lang.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
-
Python3BaseVisitor
public Python3BaseVisitor()
-
-
Method Details
-
visitSource
Visit a parse tree produced byPython3Parser.source().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitSourcein interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitStmt
Visit a parse tree produced byPython3Parser.stmt().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitStmtin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitSimple_stmt
Visit a parse tree produced byPython3Parser.simple_stmt().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitSimple_stmtin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitSmall_stmt
Visit a parse tree produced byPython3Parser.small_stmt().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitSmall_stmtin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitAssignment_stmt
Visit a parse tree produced byPython3Parser.assignment_stmt().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitAssignment_stmtin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFlow_stmt
Visit a parse tree produced byPython3Parser.flow_stmt().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitFlow_stmtin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitBreak_stmt
Visit a parse tree produced byPython3Parser.break_stmt().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitBreak_stmtin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitContinue_stmt
Visit a parse tree produced byPython3Parser.continue_stmt().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitContinue_stmtin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitCompound_stmt
Visit a parse tree produced byPython3Parser.compound_stmt().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitCompound_stmtin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitImport_stmt
Visit a parse tree produced byPython3Parser.import_stmt().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitImport_stmtin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitImport_name
Visit a parse tree produced byPython3Parser.import_name().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitImport_namein interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitImport_from
Visit a parse tree produced byPython3Parser.import_from().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitImport_fromin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitImport_as_name
Visit a parse tree produced byPython3Parser.import_as_name().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitImport_as_namein interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitDotted_as_name
Visit a parse tree produced byPython3Parser.dotted_as_name().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitDotted_as_namein interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitImport_as_names
Visit a parse tree produced byPython3Parser.import_as_names().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitImport_as_namesin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitDotted_as_names
Visit a parse tree produced byPython3Parser.dotted_as_names().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitDotted_as_namesin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitDotted_name
Visit a parse tree produced byPython3Parser.dotted_name().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitDotted_namein interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitAtom_expr
Visit a parse tree produced byPython3Parser.atom_expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitAtom_exprin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitArray
Visit a parse tree produced byPython3Parser.array().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitArrayin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitSubscriptlist
Visit a parse tree produced byPython3Parser.subscriptlist().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitSubscriptlistin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitSubscript_
Visit a parse tree produced byPython3Parser.subscript_().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitSubscript_in interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitSliceop
Visit a parse tree produced byPython3Parser.sliceop().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitSliceopin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitTest
Visit a parse tree produced byPython3Parser.test().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitTestin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitIf_stmt
Visit a parse tree produced byPython3Parser.if_stmt().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitIf_stmtin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitTest_block
Visit a parse tree produced byPython3Parser.test_block().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitTest_blockin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitWhile_stmt
Visit a parse tree produced byPython3Parser.while_stmt().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitWhile_stmtin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitBlock
Visit a parse tree produced byPython3Parser.block().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitBlockin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitPrint_stmt
Visit a parse tree produced byPython3Parser.print_stmt().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitPrint_stmtin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFuncCall
Visit a parse tree produced byPython3Parser.funcCall().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitFuncCallin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitArguments
Visit a parse tree produced byPython3Parser.arguments().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitArgumentsin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitReturn_stmt
Visit a parse tree produced byPython3Parser.return_stmt().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitReturn_stmtin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFuncExpr
Visit a parse tree produced by thefuncExprlabeled alternative inPython3Parser.expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitFuncExprin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitArrayExpr
Visit a parse tree produced by thearrayExprlabeled alternative inPython3Parser.expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitArrayExprin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitAtomExpr
Visit a parse tree produced by theatomExprlabeled alternative inPython3Parser.expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitAtomExprin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitOrExpr
Visit a parse tree produced by theorExprlabeled alternative inPython3Parser.expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitOrExprin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitAdditiveExpr
Visit a parse tree produced by theadditiveExprlabeled alternative inPython3Parser.expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitAdditiveExprin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitRelationalExpr
Visit a parse tree produced by therelationalExprlabeled alternative inPython3Parser.expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitRelationalExprin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitNotExpr
Visit a parse tree produced by thenotExprlabeled alternative inPython3Parser.expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitNotExprin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitUnaryMinusExpr
Visit a parse tree produced by theunaryMinusExprlabeled alternative inPython3Parser.expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitUnaryMinusExprin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitMultiplicationExpr
Visit a parse tree produced by themultiplicationExprlabeled alternative inPython3Parser.expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitMultiplicationExprin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitAtomExpExpr
Visit a parse tree produced by theatomExpExprlabeled alternative inPython3Parser.expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitAtomExpExprin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitPowExpr
Visit a parse tree produced by thepowExprlabeled alternative inPython3Parser.expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitPowExprin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitEqualityExpr
Visit a parse tree produced by theequalityExprlabeled alternative inPython3Parser.expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitEqualityExprin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitAndExpr
Visit a parse tree produced by theandExprlabeled alternative inPython3Parser.expr().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitAndExprin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitParExpr
Visit a parse tree produced by theparExprlabeled alternative inPython3Parser.atom().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitParExprin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitNumberAtom
Visit a parse tree produced by thenumberAtomlabeled alternative inPython3Parser.atom().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitNumberAtomin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitBooleanAtom
Visit a parse tree produced by thebooleanAtomlabeled alternative inPython3Parser.atom().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitBooleanAtomin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitNameAtom
Visit a parse tree produced by thenameAtomlabeled alternative inPython3Parser.atom().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitNameAtomin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitStringAtom
Visit a parse tree produced by thestringAtomlabeled alternative inPython3Parser.atom().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitStringAtomin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitNilAtom
Visit a parse tree produced by thenilAtomlabeled alternative inPython3Parser.atom().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitNilAtomin interfacePython3Visitor<T>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-