tip.phases
Class TypeChecking

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

public class TypeChecking
extends DepthFirstAdapter


Constructor Summary
TypeChecking()
           
 
Method Summary
 void caseTIdentifier(TIdentifier name)
          Called by the TIdentifier node from TIdentifier#apply(Switch).
 void inAProgram(AProgram node)
          Called by DepthFirstAdapter.caseAProgram(AProgram) before traversing the children of AProgram.
 void outABinopExp(ABinopExp node)
          Called by DepthFirstAdapter.caseABinopExp(ABinopExp) after traversing the children of ABinopExp.
 void outADerefExp(ADerefExp node)
          Called by DepthFirstAdapter.caseADerefExp(ADerefExp) after traversing the children of ADerefExp.
 void outAFuncDecl(AFuncDecl node)
          Called by DepthFirstAdapter.caseAFuncDecl(AFuncDecl) after traversing the children of AFuncDecl.
 void outAFunctionCallExp(AFunctionCallExp node)
          Called by DepthFirstAdapter.caseAFunctionCallExp(AFunctionCallExp) after traversing the children of AFunctionCallExp.
 void outAFunctionPtrCallExp(AFunctionPtrCallExp node)
          Called by DepthFirstAdapter.caseAFunctionPtrCallExp(AFunctionPtrCallExp) after traversing the children of AFunctionPtrCallExp.
 void outAIfThenElseStm(AIfThenElseStm node)
          Called by DepthFirstAdapter.caseAIfThenElseStm(AIfThenElseStm) after traversing the children of AIfThenElseStm.
 void outAIfThenStm(AIfThenStm node)
          Called by DepthFirstAdapter.caseAIfThenStm(AIfThenStm) after traversing the children of AIfThenStm.
 void outAInputExp(AInputExp node)
          Called by DepthFirstAdapter.caseAInputExp(AInputExp) after traversing the children of AInputExp.
 void outAIntConstExp(AIntConstExp node)
          Called by DepthFirstAdapter.caseAIntConstExp(AIntConstExp) after traversing the children of AIntConstExp.
 void outAMallocExp(AMallocExp node)
          Called by DepthFirstAdapter.caseAMallocExp(AMallocExp) after traversing the children of AMallocExp.
 void outANullExp(ANullExp node)
          Called by DepthFirstAdapter.caseANullExp(ANullExp) after traversing the children of ANullExp.
 void outAOutputStm(AOutputStm node)
          Called by DepthFirstAdapter.caseAOutputStm(AOutputStm) after traversing the children of AOutputStm.
 void outAPointerExp(APointerExp node)
          Called by DepthFirstAdapter.caseAPointerExp(APointerExp) after traversing the children of APointerExp.
 void outAProgram(AProgram node)
          Called by DepthFirstAdapter.caseAProgram(AProgram) after traversing the children of AProgram.
 void outAVarExp(AVarExp node)
          Called by DepthFirstAdapter.caseAVarExp(AVarExp) after traversing the children of AVarExp.
 void outAWhileStm(AWhileStm node)
          Called by DepthFirstAdapter.caseAWhileStm(AWhileStm) after traversing the children of AWhileStm.
 void outAAssignPtrStm(AAssignPtrStm node)
          Called by DepthFirstAdapter.caseAAssignPtrStm(AAssignPtrStm) after traversing the children of AAssignPtrStm.
 void outAAssignVarStm(AAssignVarStm node)
          Called by DepthFirstAdapter.caseAAssignVarStm(AAssignVarStm) after traversing the children of AAssignVarStm.
 
Methods inherited from class tip.analysis.DepthFirstAdapter
caseABinopExp, caseABlock, caseABlockStm, caseABody, caseADeclStm, caseADerefExp, caseADivideBinop, caseAEqBinop, caseAFuncDecl, caseAFunctionCallExp, caseAFunctionPtrCallExp, caseAGtBinop, caseAIfThenElseStm, caseAIfThenStm, caseAInputExp, caseAIntConstExp, caseALocalDecl, caseAMallocExp, caseAMinusBinop, caseANullExp, caseAOutputStm, caseAPlusBinop, caseAPointerExp, caseAProgram, caseAReturnStm, caseATimesBinop, caseAVarExp, caseAWhileStm, caseStart, caseAAssignPtrStm, caseAAssignVarStm, 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, inABody, inADeclStm, inADerefExp, inADivideBinop, inAEqBinop, inAFuncDecl, inAFunctionCallExp, inAFunctionPtrCallExp, inAGtBinop, inAIfThenElseStm, inAIfThenStm, inAInputExp, inAIntConstExp, inALocalDecl, inAMallocExp, inAMinusBinop, inANullExp, inAOutputStm, inAPlusBinop, inAPointerExp, inAReturnStm, inATimesBinop, inAVarExp, inAWhileStm, inStart, inAAssignPtrStm, inAAssignVarStm, outABlock, outABlockStm, outABody, outADeclStm, outADivideBinop, outAEqBinop, outAGtBinop, outALocalDecl, outAMinusBinop, outAPlusBinop, outAReturnStm, outATimesBinop, outStart
 
Methods inherited from class tip.analysis.AnalysisAdapter
caseEOF, caseTAnd, caseTAssign, caseTComma, caseTCommentBlock, caseTCommentSingle, caseTDiv, caseTElse, caseTEq, caseTGt, 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

TypeChecking

public TypeChecking()
Method Detail

caseTIdentifier

public void caseTIdentifier(TIdentifier name)
Description copied from class: AnalysisAdapter
Called by the TIdentifier node from TIdentifier#apply(Switch).

Specified by:
caseTIdentifier in interface Analysis
Overrides:
caseTIdentifier in class AnalysisAdapter
Parameters:
name - the calling TIdentifier node

outAVarExp

public void outAVarExp(AVarExp node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseAVarExp(AVarExp) after traversing the children of AVarExp.

Overrides:
outAVarExp in class DepthFirstAdapter
Parameters:
node - the visited AVarExp node

outADerefExp

public void outADerefExp(ADerefExp node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseADerefExp(ADerefExp) after traversing the children of ADerefExp.

Overrides:
outADerefExp in class DepthFirstAdapter
Parameters:
node - the visited ADerefExp node

outAPointerExp

public void outAPointerExp(APointerExp node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseAPointerExp(APointerExp) after traversing the children of APointerExp.

Overrides:
outAPointerExp in class DepthFirstAdapter
Parameters:
node - the visited APointerExp node

outABinopExp

public void outABinopExp(ABinopExp node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseABinopExp(ABinopExp) after traversing the children of ABinopExp.

Overrides:
outABinopExp in class DepthFirstAdapter
Parameters:
node - the visited ABinopExp node

outAAssignVarStm

public void outAAssignVarStm(AAssignVarStm node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseAAssignVarStm(AAssignVarStm) after traversing the children of AAssignVarStm.

Overrides:
outAAssignVarStm in class DepthFirstAdapter
Parameters:
node - the visited AAssignVarStm node

outAAssignPtrStm

public void outAAssignPtrStm(AAssignPtrStm node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseAAssignPtrStm(AAssignPtrStm) after traversing the children of AAssignPtrStm.

Overrides:
outAAssignPtrStm in class DepthFirstAdapter
Parameters:
node - the visited AAssignPtrStm node

outAIntConstExp

public void outAIntConstExp(AIntConstExp node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseAIntConstExp(AIntConstExp) after traversing the children of AIntConstExp.

Overrides:
outAIntConstExp in class DepthFirstAdapter
Parameters:
node - the visited AIntConstExp node

outAMallocExp

public void outAMallocExp(AMallocExp node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseAMallocExp(AMallocExp) after traversing the children of AMallocExp.

Overrides:
outAMallocExp in class DepthFirstAdapter
Parameters:
node - the visited AMallocExp node

outANullExp

public void outANullExp(ANullExp node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseANullExp(ANullExp) after traversing the children of ANullExp.

Overrides:
outANullExp in class DepthFirstAdapter
Parameters:
node - the visited ANullExp node

outAInputExp

public void outAInputExp(AInputExp node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseAInputExp(AInputExp) after traversing the children of AInputExp.

Overrides:
outAInputExp in class DepthFirstAdapter
Parameters:
node - the visited AInputExp 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

outAFunctionPtrCallExp

public void outAFunctionPtrCallExp(AFunctionPtrCallExp node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseAFunctionPtrCallExp(AFunctionPtrCallExp) after traversing the children of AFunctionPtrCallExp.

Overrides:
outAFunctionPtrCallExp in class DepthFirstAdapter
Parameters:
node - the visited AFunctionPtrCallExp node

outAFuncDecl

public void outAFuncDecl(AFuncDecl node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseAFuncDecl(AFuncDecl) after traversing the children of AFuncDecl.

Overrides:
outAFuncDecl in class DepthFirstAdapter
Parameters:
node - the visited AFuncDecl node

outAIfThenStm

public void outAIfThenStm(AIfThenStm node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseAIfThenStm(AIfThenStm) after traversing the children of AIfThenStm.

Overrides:
outAIfThenStm in class DepthFirstAdapter
Parameters:
node - the visited AIfThenStm node

outAIfThenElseStm

public void outAIfThenElseStm(AIfThenElseStm node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseAIfThenElseStm(AIfThenElseStm) after traversing the children of AIfThenElseStm.

Overrides:
outAIfThenElseStm in class DepthFirstAdapter
Parameters:
node - the visited AIfThenElseStm node

outAWhileStm

public void outAWhileStm(AWhileStm node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseAWhileStm(AWhileStm) after traversing the children of AWhileStm.

Overrides:
outAWhileStm in class DepthFirstAdapter
Parameters:
node - the visited AWhileStm node

outAOutputStm

public void outAOutputStm(AOutputStm node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseAOutputStm(AOutputStm) after traversing the children of AOutputStm.

Overrides:
outAOutputStm in class DepthFirstAdapter
Parameters:
node - the visited AOutputStm node

inAProgram

public void inAProgram(AProgram node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseAProgram(AProgram) before traversing the children of AProgram.

Overrides:
inAProgram in class DepthFirstAdapter
Parameters:
node - the visited AProgram node

outAProgram

public void outAProgram(AProgram node)
Description copied from class: DepthFirstAdapter
Called by DepthFirstAdapter.caseAProgram(AProgram) after traversing the children of AProgram.

Overrides:
outAProgram in class DepthFirstAdapter
Parameters:
node - the visited AProgram node