coins.ir.hir
Class PrintStmtVisitor
java.lang.Object
coins.ir.hir.HirVisitorModel1
coins.ir.hir.PrintStmtVisitor
- All Implemented Interfaces:
- HirVisitor
- public class PrintStmtVisitor
- extends HirVisitorModel1
PrintStmtVisitor
Example of the use of Visitor for printing HIR statement
(Extends HirVisitorModel1.)
| Methods inherited from class coins.ir.hir.HirVisitorModel1 |
atAsmStmt, atConstNode, atElemNode, atExp, atFunctionExp, atHirList, atHirSeq, atIndexedLoopStmt, atInfNode, atIrList, atLabelDef, atLabelNode, atLoopStmt, atNullNode, atPhiExp, atPointedExp, atProgram, atQualifiedExp, atRepeatStmt, atSubpNode, atSubscriptedExp, atSymNode, atTypeNode, atVarNode |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrintStmtVisitor
public PrintStmtVisitor(HirRoot pHirRoot)
visit
public void visit(HIR pHir)
- Description copied from class:
HirVisitorModel1
- 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.
- Overrides:
visit in class HirVisitorModel1
- Parameters:
pHir - root of subtree whose nodes are to be visited.
atSubpDefinition
public void atSubpDefinition(SubpDefinition p)
- Specified by:
atSubpDefinition in interface HirVisitor- Overrides:
atSubpDefinition in class HirVisitorModel1
atInfStmt
public void atInfStmt(InfStmt p)
- Specified by:
atInfStmt in interface HirVisitor- Overrides:
atInfStmt in class HirVisitorModel1
atAssignStmt
public void atAssignStmt(AssignStmt p)
- Specified by:
atAssignStmt in interface HirVisitor- Overrides:
atAssignStmt in class HirVisitorModel1
atIfStmt
public void atIfStmt(IfStmt p)
- Specified by:
atIfStmt in interface HirVisitor- Overrides:
atIfStmt in class HirVisitorModel1
atWhileStmt
public void atWhileStmt(WhileStmt p)
- Specified by:
atWhileStmt in interface HirVisitor- Overrides:
atWhileStmt in class HirVisitorModel1
atForStmt
public void atForStmt(ForStmt p)
- Specified by:
atForStmt in interface HirVisitor- Overrides:
atForStmt in class HirVisitorModel1
atUntilStmt
public void atUntilStmt(UntilStmt p)
- Specified by:
atUntilStmt in interface HirVisitor- Overrides:
atUntilStmt in class HirVisitorModel1
atLabeledStmt
public void atLabeledStmt(LabeledStmt p)
- Specified by:
atLabeledStmt in interface HirVisitor- Overrides:
atLabeledStmt in class HirVisitorModel1
atBlockStmt
public void atBlockStmt(BlockStmt p)
- Specified by:
atBlockStmt in interface HirVisitor- Overrides:
atBlockStmt in class HirVisitorModel1
atReturnStmt
public void atReturnStmt(ReturnStmt p)
- Specified by:
atReturnStmt in interface HirVisitor- Overrides:
atReturnStmt in class HirVisitorModel1
atJumpStmt
public void atJumpStmt(JumpStmt p)
- Specified by:
atJumpStmt in interface HirVisitor- Overrides:
atJumpStmt in class HirVisitorModel1
atSwitchStmt
public void atSwitchStmt(SwitchStmt p)
- Specified by:
atSwitchStmt in interface HirVisitor- Overrides:
atSwitchStmt in class HirVisitorModel1
atExpStmt
public void atExpStmt(ExpStmt p)
- Specified by:
atExpStmt in interface HirVisitor- Overrides:
atExpStmt in class HirVisitorModel1