coins.ir.hir
Class HirVisitorModel1

java.lang.Object
  extended bycoins.ir.hir.HirVisitorModel1
All Implemented Interfaces:
HirVisitor
Direct Known Subclasses:
PrintStmtVisitor

public class HirVisitorModel1
extends java.lang.Object
implements HirVisitor

HirVisitorModel1 Visitor model for processing HIR nodes where visiting procedure is written in the method visit of this class and each method of the form atXxx called from acceptor of HIR class does a processing without writing traverse procedure. (This visitor model does not call visitChildren that is called from HirVisitorModel2.) User may extends this class to do their own processing by overriding visit method to visit nodes in concern and overriding some methods of the form atXxx in concern. Example of the extension of HirVisitorModel1: PrintStmtVisitor.java See HirVisitorModel2.


Field Summary
protected  int fDbgLevel
           
 HirRoot hirRoot
           
 IoRoot ioRoot
           
 SymRoot symRoot
           
 
Constructor Summary
HirVisitorModel1(HirRoot pHirRoot)
           
 
Method Summary
 void atAsmStmt(AsmStmt p)
           
 void atAssignStmt(AssignStmt p)
           
 void atBlockStmt(BlockStmt p)
           
 void atConstNode(ConstNode p)
           
 void atElemNode(ElemNode p)
           
 void atExp(Exp p)
           
 void atExpStmt(ExpStmt p)
           
 void atForStmt(ForStmt p)
           
 void atFunctionExp(FunctionExp p)
           
 void atHirList(HirList p)
           
 void atHirSeq(HirSeq p)
           
 void atIfStmt(IfStmt p)
           
 void atIndexedLoopStmt(IndexedLoopStmt p)
           
 void atInfNode(InfNode p)
           
 void atInfStmt(InfStmt p)
           
 void atIrList(IrList p)
           
 void atJumpStmt(JumpStmt p)
           
 void atLabelDef(LabelDef p)
           
 void atLabeledStmt(LabeledStmt p)
           
 void atLabelNode(LabelNode p)
           
 void atLoopStmt(LoopStmt p)
           
 void atNullNode(NullNode p)
           
 void atPhiExp(PhiExp p)
           
 void atPointedExp(PointedExp p)
           
 void atProgram(Program p)
           
 void atQualifiedExp(QualifiedExp p)
           
 void atRepeatStmt(RepeatStmt p)
           
 void atReturnStmt(ReturnStmt p)
           
 void atSubpDefinition(SubpDefinition p)
           
 void atSubpNode(SubpNode p)
           
 void atSubscriptedExp(SubscriptedExp p)
           
 void atSwitchStmt(SwitchStmt p)
           
 void atSymNode(SymNode p)
           
 void atTypeNode(TypeNode p)
           
 void atUntilStmt(UntilStmt p)
           
 void atVarNode(VarNode p)
           
 void atWhileStmt(WhileStmt p)
           
 void visit(HIR pHir)
          visit Procedure to visit nodes of pHir.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hirRoot

public final HirRoot hirRoot

symRoot

public final SymRoot symRoot

ioRoot

public final IoRoot ioRoot

fDbgLevel

protected final int fDbgLevel
Constructor Detail

HirVisitorModel1

public HirVisitorModel1(HirRoot pHirRoot)
Method Detail

visit

public void visit(HIR pHir)
visit Procedure to visit nodes of pHir. You may override this method to selectively visit nodes in concern. If there is a probability of setting programRoot as pHir, Program node should be selected as a node to be accepted because, elements of subprogram definition list is not traversed by HirIterator.

Parameters:
pHir - root of subtree whose nodes are to be visited.

atProgram

public void atProgram(Program p)
Specified by:
atProgram in interface HirVisitor

atSubpDefinition

public void atSubpDefinition(SubpDefinition p)
Specified by:
atSubpDefinition 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

atBlockStmt

public void atBlockStmt(BlockStmt p)
Specified by:
atBlockStmt 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