coins.ir.hir
Class HirVisitorModel2
java.lang.Object
coins.ir.hir.HirVisitorModel2
- All Implemented Interfaces:
- HirVisitor
- Direct Known Subclasses:
- MyExpIdAssigner, Prescan, PrintVisitor, TagTreeBuilder, TestHir2
- public class HirVisitorModel2
- extends java.lang.Object
- implements HirVisitor
HirVisitorModel2
Visitor model for processing HIR nodes where
each acceptor calls visitChildren method to traverse its children.
(This point differs from HirVisitorModel1.)
User may extends this class to do their own processing
by overriding some methods of the form atXxx in concern.
Example of the extension of HirVisitorModel2: PrintVisitor.java
- See Also:
HirVisitorModel1
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
hirRoot
public final HirRoot hirRoot
symRoot
public final SymRoot symRoot
ioRoot
public final IoRoot ioRoot
fDbgLevel
protected final int fDbgLevel
HirVisitorModel2
public HirVisitorModel2(HirRoot pHirRoot)
visit
public void visit(HIR pHir)
visitChildren
public void visitChildren(HIR pHir)
atProgram
public void atProgram(Program p)
- Specified by:
atProgram in interface HirVisitor
atSubpDefinition
public void atSubpDefinition(SubpDefinition p)
- Specified by:
atSubpDefinition in interface HirVisitor
atBlockStmt
public void atBlockStmt(BlockStmt p)
- Specified by:
atBlockStmt in interface HirVisitor
atHirList
public void atHirList(HirList p)
- Specified by:
atHirList in interface HirVisitor
atIrList
public void atIrList(IrList p)
- Specified by:
atIrList in interface HirVisitor
atHirSeq
public void atHirSeq(HirSeq p)
- Specified by:
atHirSeq in interface HirVisitor
atInfNode
public void atInfNode(InfNode p)
- Specified by:
atInfNode in interface HirVisitor
atInfStmt
public void atInfStmt(InfStmt p)
- Specified by:
atInfStmt in interface HirVisitor
atVarNode
public void atVarNode(VarNode p)
- Specified by:
atVarNode in interface HirVisitor
atElemNode
public void atElemNode(ElemNode p)
- Specified by:
atElemNode in interface HirVisitor
atSubpNode
public void atSubpNode(SubpNode p)
- Specified by:
atSubpNode in interface HirVisitor
atTypeNode
public void atTypeNode(TypeNode p)
- Specified by:
atTypeNode in interface HirVisitor
atConstNode
public void atConstNode(ConstNode p)
- Specified by:
atConstNode in interface HirVisitor
atLabelNode
public void atLabelNode(LabelNode p)
- Specified by:
atLabelNode in interface HirVisitor
atSymNode
public void atSymNode(SymNode p)
- Specified by:
atSymNode in interface HirVisitor
atNullNode
public void atNullNode(NullNode p)
- Specified by:
atNullNode in interface HirVisitor
atLabelDef
public void atLabelDef(LabelDef p)
- Specified by:
atLabelDef in interface HirVisitor
atExp
public void atExp(Exp p)
- Specified by:
atExp in interface HirVisitor
atSubscriptedExp
public void atSubscriptedExp(SubscriptedExp p)
- Specified by:
atSubscriptedExp in interface HirVisitor
atQualifiedExp
public void atQualifiedExp(QualifiedExp p)
- Specified by:
atQualifiedExp in interface HirVisitor
atPointedExp
public void atPointedExp(PointedExp p)
- Specified by:
atPointedExp in interface HirVisitor
atFunctionExp
public void atFunctionExp(FunctionExp p)
- Specified by:
atFunctionExp in interface HirVisitor
atAssignStmt
public void atAssignStmt(AssignStmt p)
- Specified by:
atAssignStmt in interface HirVisitor
atIfStmt
public void atIfStmt(IfStmt p)
- Specified by:
atIfStmt in interface HirVisitor
atWhileStmt
public void atWhileStmt(WhileStmt p)
- Specified by:
atWhileStmt in interface HirVisitor
atForStmt
public void atForStmt(ForStmt p)
- Specified by:
atForStmt in interface HirVisitor
atUntilStmt
public void atUntilStmt(UntilStmt p)
- Specified by:
atUntilStmt in interface HirVisitor
atRepeatStmt
public void atRepeatStmt(RepeatStmt p)
- Specified by:
atRepeatStmt in interface HirVisitor
atIndexedLoopStmt
public void atIndexedLoopStmt(IndexedLoopStmt p)
- Specified by:
atIndexedLoopStmt in interface HirVisitor
atLoopStmt
public void atLoopStmt(LoopStmt p)
- Specified by:
atLoopStmt in interface HirVisitor
atLabeledStmt
public void atLabeledStmt(LabeledStmt p)
- Specified by:
atLabeledStmt in interface HirVisitor
atReturnStmt
public void atReturnStmt(ReturnStmt p)
- Specified by:
atReturnStmt in interface HirVisitor
atJumpStmt
public void atJumpStmt(JumpStmt p)
- Specified by:
atJumpStmt in interface HirVisitor
atSwitchStmt
public void atSwitchStmt(SwitchStmt p)
- Specified by:
atSwitchStmt in interface HirVisitor
atExpStmt
public void atExpStmt(ExpStmt p)
- Specified by:
atExpStmt in interface HirVisitor
atPhiExp
public void atPhiExp(PhiExp p)
- Specified by:
atPhiExp in interface HirVisitor
atAsmStmt
public void atAsmStmt(AsmStmt p)
- Specified by:
atAsmStmt in interface HirVisitor