coins.ffront
Class LabeledDoStmt

java.lang.Object
  extended bycoins.ffront.FStmt
      extended bycoins.ffront.LabeledDoStmt
All Implemented Interfaces:
Node

public class LabeledDoStmt
extends FStmt

DO statement of the form DO 10 i = 1, 30 ... 10 ...


Field Summary
 
Fields inherited from class coins.ffront.FStmt
defLabel, fDeclMgr, fESMgr, fHir, fHirUtil, fLine, fSymTable, fTypeUtil, generatedStmts, hir, stmt
 
Constructor Summary
LabeledDoStmt(Token pLabel, Node pDoSpec, int line, FirToHir pfHir)
           
 
Method Summary
 java.lang.String getDoLabelString()
           
 Exp makeCondExp()
          Make Exp "i <= 30" from "DO 10 i = 1, 30"
 Stmt makeInitStmt()
          Make Stmt "i = 1" from "DO 10 i = 1, 30"
 Stmt makeStepStmt()
          Make Stmt "i = i + 5" from "DO 10 i = 1, 30, 5"
 void print(int level, java.lang.String spaces)
           
 void process()
          Mostly processed in a FirToHir.
 java.lang.String toString()
           
 
Methods inherited from class coins.ffront.FStmt
addGeneratedStmt, addGeneratedStmtFirst, addLabel, addResultTo, dp, getLabelString, getResult, hasNotLabel, makeArgAddr, makeExp, mergeSymTable, preprocess, setLineAndFileInfo, setSymTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LabeledDoStmt

public LabeledDoStmt(Token pLabel,
                     Node pDoSpec,
                     int line,
                     FirToHir pfHir)
Method Detail

print

public void print(int level,
                  java.lang.String spaces)
Specified by:
print in interface Node
Overrides:
print in class FStmt

toString

public java.lang.String toString()
Specified by:
toString in interface Node
Overrides:
toString in class FStmt

process

public void process()
Mostly processed in a FirToHir.

Overrides:
process in class FStmt

getDoLabelString

public java.lang.String getDoLabelString()

makeInitStmt

public Stmt makeInitStmt()
Make Stmt "i = 1" from "DO 10 i = 1, 30"

Returns:
loop init part.

makeCondExp

public Exp makeCondExp()
Make Exp "i <= 30" from "DO 10 i = 1, 30"

Returns:
condition Exp.

makeStepStmt

public Stmt makeStepStmt()
Make Stmt "i = i + 5" from "DO 10 i = 1, 30, 5"

Returns:
loop-step part.