tip.phases
Class CodeGeneration

java.lang.Object
  extended by tip.analysis.AnalysisAdapter
      extended by tip.analysis.DepthFirstAdapter
          extended by tip.phases.CodeGeneration
All Implemented Interfaces:
Analysis

public class CodeGeneration
extends DepthFirstAdapter


Constructor Summary
CodeGeneration()
           
 
Method Summary
 void caseABinopExp(ABinopExp node)
          Calls DepthFirstAdapter.inABinopExp(ABinopExp), traverses the children of ABinopExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outABinopExp(ABinopExp).
 void caseADerefExp(ADerefExp node)
          Calls DepthFirstAdapter.inADerefExp(ADerefExp), traverses the children of ADerefExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outADerefExp(ADerefExp).
 void caseAFunctionPtrCallExp(AFunctionPtrCallExp node)
          Calls DepthFirstAdapter.inAFunctionPtrCallExp(AFunctionPtrCallExp), traverses the children of AFunctionPtrCallExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAFunctionPtrCallExp(AFunctionPtrCallExp).
 void caseAIfThenElseStm(AIfThenElseStm node)
          Calls DepthFirstAdapter.inAIfThenElseStm(AIfThenElseStm), traverses the children of AIfThenElseStm in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAIfThenElseStm(AIfThenElseStm).
 void caseAIfThenStm(AIfThenStm node)
          Calls DepthFirstAdapter.inAIfThenStm(AIfThenStm), traverses the children of AIfThenStm in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAIfThenStm(AIfThenStm).
 void caseAInputExp(AInputExp node)
          Calls DepthFirstAdapter.inAInputExp(AInputExp), traverses the children of AInputExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAInputExp(AInputExp).
 void caseAIntConstExp(AIntConstExp node)
          Calls DepthFirstAdapter.inAIntConstExp(AIntConstExp), traverses the children of AIntConstExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAIntConstExp(AIntConstExp).
 void caseAMallocExp(AMallocExp node)
          Calls DepthFirstAdapter.inAMallocExp(AMallocExp), traverses the children of AMallocExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAMallocExp(AMallocExp).
 void caseANullExp(ANullExp node)
          Calls DepthFirstAdapter.inANullExp(ANullExp), traverses the children of ANullExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outANullExp(ANullExp).
 void caseAOutputStm(AOutputStm node)
          Calls DepthFirstAdapter.inAOutputStm(AOutputStm), traverses the children of AOutputStm in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAOutputStm(AOutputStm).
 void caseAPointerExp(APointerExp node)
          Calls DepthFirstAdapter.inAPointerExp(APointerExp), traverses the children of APointerExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAPointerExp(APointerExp).
 void caseAReturnStm(AReturnStm node)
          Calls DepthFirstAdapter.inAReturnStm(AReturnStm), traverses the children of AReturnStm in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAReturnStm(AReturnStm).
 void caseAVarExp(AVarExp node)
          Calls DepthFirstAdapter.inAVarExp(AVarExp), traverses the children of AVarExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAVarExp(AVarExp).
 void caseAWhileStm(AWhileStm node)
          Calls DepthFirstAdapter.inAWhileStm(AWhileStm), traverses the children of AWhileStm in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAWhileStm(AWhileStm).
 void caseAAssignPtrStm(AAssignPtrStm node)
          Calls DepthFirstAdapter.inAAssignPtrStm(AAssignPtrStm), traverses the children of AAssignPtrStm in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAAssignPtrStm(AAssignPtrStm).
 void caseAAssignVarStm(AAssignVarStm node)
          Calls DepthFirstAdapter.inAAssignVarStm(AAssignVarStm), traverses the children of AAssignVarStm in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAAssignVarStm(AAssignVarStm).
 void inABody(ABody body)
          Called by DepthFirstAdapter.caseABody(ABody) before traversing the children of ABody.
 void outAFunctionCallExp(AFunctionCallExp node)
          Called by DepthFirstAdapter.caseAFunctionCallExp(AFunctionCallExp) after traversing the children of AFunctionCallExp.
 
Methods inherited from class tip.analysis.DepthFirstAdapter
caseABlock, caseABlockStm, caseABody, caseADeclStm, caseADivideBinop, caseAEqBinop, caseAFuncDecl, caseAFunctionCallExp, caseAGtBinop, caseALocalDecl, caseAMinusBinop, caseAPlusBinop, caseAProgram, caseATimesBinop, caseStart, defaultIn, defaultInPBinop, defaultInPBlock, defaultInPBody, defaultInPDecl, defaultInPExp, defaultInPProgram, defaultInPStm, defaultOut, defaultOutPBinop, defaultOutPBlock, defaultOutPBody, defaultOutPDecl, defaultOutPExp, defaultOutPProgram, defaultOutPStm, defaultPBinop, defaultPBlock, defaultPBody, defaultPDecl, defaultPExp, defaultPProgram, defaultPStm, inABinopExp, inABlock, inABlockStm, inADeclStm, inADerefExp, inADivideBinop, inAEqBinop, inAFuncDecl, inAFunctionCallExp, inAFunctionPtrCallExp, inAGtBinop, inAIfThenElseStm, inAIfThenStm, inAInputExp, inAIntConstExp, inALocalDecl, inAMallocExp, inAMinusBinop, inANullExp, inAOutputStm, inAPlusBinop, inAPointerExp, inAProgram, inAReturnStm, inATimesBinop, inAVarExp, inAWhileStm, inStart, inAAssignPtrStm, inAAssignVarStm, outABinopExp, outABlock, outABlockStm, outABody, outADeclStm, outADerefExp, outADivideBinop, outAEqBinop, outAFuncDecl, outAFunctionPtrCallExp, outAGtBinop, outAIfThenElseStm, outAIfThenStm, outAInputExp, outAIntConstExp, outALocalDecl, outAMallocExp, outAMinusBinop, outANullExp, outAOutputStm, outAPlusBinop, outAPointerExp, outAProgram, outAReturnStm, outATimesBinop, outAVarExp, outAWhileStm, outStart, outAAssignPtrStm, outAAssignVarStm
 
Methods inherited from class tip.analysis.AnalysisAdapter
caseEOF, caseTAnd, caseTAssign, caseTComma, caseTCommentBlock, caseTCommentSingle, caseTDiv, caseTElse, caseTEq, caseTGt, caseTIdentifier, caseTIf, caseTInput, caseTIntegerConst, caseTLBrace, caseTLPar, caseTMalloc, caseTMinus, caseTNull, caseTOutput, caseTPlus, caseTRBrace, caseTReturn, caseTRPar, caseTSemicolon, caseTStar, caseTVar, caseTWhile, caseTWhiteSpace, defaultNode, defaultToken, getIn, getOut, setIn, setOut
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeGeneration

public CodeGeneration()
Method Detail

inABody

public void inABody(ABody body)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseABody(ABody) before traversing the children of ABody.

Overrides:
inABody in class DepthFirstAdapter
Parameters:
body - the visited ABody node

caseAIntConstExp

public void caseAIntConstExp(AIntConstExp node)
Description copied from class: DepthFirstAdapter
Calls DepthFirstAdapter.inAIntConstExp(AIntConstExp), traverses the children of AIntConstExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAIntConstExp(AIntConstExp).

Specified by:
caseAIntConstExp in interface Analysis
Overrides:
caseAIntConstExp in class DepthFirstAdapter
Parameters:
node - the visited AIntConstExp node

caseAMallocExp

public void caseAMallocExp(AMallocExp node)
Description copied from class: DepthFirstAdapter
Calls DepthFirstAdapter.inAMallocExp(AMallocExp), traverses the children of AMallocExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAMallocExp(AMallocExp).

Specified by:
caseAMallocExp in interface Analysis
Overrides:
caseAMallocExp in class DepthFirstAdapter
Parameters:
node - the visited AMallocExp node

caseANullExp

public void caseANullExp(ANullExp node)
Description copied from class: DepthFirstAdapter
Calls DepthFirstAdapter.inANullExp(ANullExp), traverses the children of ANullExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outANullExp(ANullExp).

Specified by:
caseANullExp in interface Analysis
Overrides:
caseANullExp in class DepthFirstAdapter
Parameters:
node - the visited ANullExp node

outAFunctionCallExp

public void outAFunctionCallExp(AFunctionCallExp node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseAFunctionCallExp(AFunctionCallExp) after traversing the children of AFunctionCallExp.

Overrides:
outAFunctionCallExp in class DepthFirstAdapter
Parameters:
node - the visited AFunctionCallExp node

caseAInputExp

public void caseAInputExp(AInputExp node)
Description copied from class: DepthFirstAdapter
Calls DepthFirstAdapter.inAInputExp(AInputExp), traverses the children of AInputExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAInputExp(AInputExp).

Specified by:
caseAInputExp in interface Analysis
Overrides:
caseAInputExp in class DepthFirstAdapter
Parameters:
node - the visited AInputExp node

caseAOutputStm

public void caseAOutputStm(AOutputStm node)
Description copied from class: DepthFirstAdapter
Calls DepthFirstAdapter.inAOutputStm(AOutputStm), traverses the children of AOutputStm in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAOutputStm(AOutputStm).

Specified by:
caseAOutputStm in interface Analysis
Overrides:
caseAOutputStm in class DepthFirstAdapter
Parameters:
node - the visited AOutputStm node

caseAFunctionPtrCallExp

public void caseAFunctionPtrCallExp(AFunctionPtrCallExp node)
Description copied from class: DepthFirstAdapter
Calls DepthFirstAdapter.inAFunctionPtrCallExp(AFunctionPtrCallExp), traverses the children of AFunctionPtrCallExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAFunctionPtrCallExp(AFunctionPtrCallExp).

Specified by:
caseAFunctionPtrCallExp in interface Analysis
Overrides:
caseAFunctionPtrCallExp in class DepthFirstAdapter
Parameters:
node - the visited AFunctionPtrCallExp node

caseAIfThenStm

public void caseAIfThenStm(AIfThenStm node)
Description copied from class: DepthFirstAdapter
Calls DepthFirstAdapter.inAIfThenStm(AIfThenStm), traverses the children of AIfThenStm in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAIfThenStm(AIfThenStm).

Specified by:
caseAIfThenStm in interface Analysis
Overrides:
caseAIfThenStm in class DepthFirstAdapter
Parameters:
node - the visited AIfThenStm node

caseAIfThenElseStm

public void caseAIfThenElseStm(AIfThenElseStm node)
Description copied from class: DepthFirstAdapter
Calls DepthFirstAdapter.inAIfThenElseStm(AIfThenElseStm), traverses the children of AIfThenElseStm in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAIfThenElseStm(AIfThenElseStm).

Specified by:
caseAIfThenElseStm in interface Analysis
Overrides:
caseAIfThenElseStm in class DepthFirstAdapter
Parameters:
node - the visited AIfThenElseStm node

caseAWhileStm

public void caseAWhileStm(AWhileStm node)
Description copied from class: DepthFirstAdapter
Calls DepthFirstAdapter.inAWhileStm(AWhileStm), traverses the children of AWhileStm in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAWhileStm(AWhileStm).

Specified by:
caseAWhileStm in interface Analysis
Overrides:
caseAWhileStm in class DepthFirstAdapter
Parameters:
node - the visited AWhileStm node

caseAReturnStm

public void caseAReturnStm(AReturnStm node)
Description copied from class: DepthFirstAdapter
Calls DepthFirstAdapter.inAReturnStm(AReturnStm), traverses the children of AReturnStm in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAReturnStm(AReturnStm).

Specified by:
caseAReturnStm in interface Analysis
Overrides:
caseAReturnStm in class DepthFirstAdapter
Parameters:
node - the visited AReturnStm node

caseAVarExp

public void caseAVarExp(AVarExp node)
Description copied from class: DepthFirstAdapter
Calls DepthFirstAdapter.inAVarExp(AVarExp), traverses the children of AVarExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAVarExp(AVarExp).

Specified by:
caseAVarExp in interface Analysis
Overrides:
caseAVarExp in class DepthFirstAdapter
Parameters:
node - the visited AVarExp node

caseADerefExp

public void caseADerefExp(ADerefExp node)
Description copied from class: DepthFirstAdapter
Calls DepthFirstAdapter.inADerefExp(ADerefExp), traverses the children of ADerefExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outADerefExp(ADerefExp).

Specified by:
caseADerefExp in interface Analysis
Overrides:
caseADerefExp in class DepthFirstAdapter
Parameters:
node - the visited ADerefExp node

caseAPointerExp

public void caseAPointerExp(APointerExp node)
Description copied from class: DepthFirstAdapter
Calls DepthFirstAdapter.inAPointerExp(APointerExp), traverses the children of APointerExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAPointerExp(APointerExp).

Specified by:
caseAPointerExp in interface Analysis
Overrides:
caseAPointerExp in class DepthFirstAdapter
Parameters:
node - the visited APointerExp node

caseABinopExp

public void caseABinopExp(ABinopExp node)
Description copied from class: DepthFirstAdapter
Calls DepthFirstAdapter.inABinopExp(ABinopExp), traverses the children of ABinopExp in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outABinopExp(ABinopExp).

Specified by:
caseABinopExp in interface Analysis
Overrides:
caseABinopExp in class DepthFirstAdapter
Parameters:
node - the visited ABinopExp node

caseAAssignVarStm

public void caseAAssignVarStm(AAssignVarStm node)
Description copied from class: DepthFirstAdapter
Calls DepthFirstAdapter.inAAssignVarStm(AAssignVarStm), traverses the children of AAssignVarStm in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAAssignVarStm(AAssignVarStm).

Specified by:
caseAAssignVarStm in interface Analysis
Overrides:
caseAAssignVarStm in class DepthFirstAdapter
Parameters:
node - the visited AAssignVarStm node

caseAAssignPtrStm

public void caseAAssignPtrStm(AAssignPtrStm node)
Description copied from class: DepthFirstAdapter
Calls DepthFirstAdapter.inAAssignPtrStm(AAssignPtrStm), traverses the children of AAssignPtrStm in the order they are defined in the grammar, and finally calls DepthFirstAdapter.outAAssignPtrStm(AAssignPtrStm).

Specified by:
caseAAssignPtrStm in interface Analysis
Overrides:
caseAAssignPtrStm in class DepthFirstAdapter
Parameters:
node - the visited AAssignPtrStm node