|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttip.analysis.AnalysisAdapter
public class AnalysisAdapter
AnalysisAdapter
provides a basic implementation of Analysis
.
case
-methods for alternatives are forwarded to the defaultP
-method
of their production superclass. case
-methods for tokens are forwarded to
the defaultToken(Token)
method, and all default-
methods are
forwarded to defaultNode(Node)
.
Constructor Summary | |
---|---|
AnalysisAdapter()
|
Method Summary | |
---|---|
void |
caseABinopExp(ABinopExp node)
Called by the ABinopExp node from ABinopExp#apply(Switch) . |
void |
caseABlock(ABlock node)
Called by the ABlock node from ABlock#apply(Switch) . |
void |
caseABlockStm(ABlockStm node)
Called by the ABlockStm node from ABlockStm#apply(Switch) . |
void |
caseABody(ABody node)
Called by the ABody node from ABody#apply(Switch) . |
void |
caseADeclStm(ADeclStm node)
Called by the ADeclStm node from ADeclStm#apply(Switch) . |
void |
caseADerefExp(ADerefExp node)
Called by the ADerefExp node from ADerefExp#apply(Switch) . |
void |
caseADivideBinop(ADivideBinop node)
Called by the ADivideBinop node from ADivideBinop#apply(Switch) . |
void |
caseAEqBinop(AEqBinop node)
Called by the AEqBinop node from AEqBinop#apply(Switch) . |
void |
caseAFuncDecl(AFuncDecl node)
Called by the AFuncDecl node from AFuncDecl#apply(Switch) . |
void |
caseAFunctionCallExp(AFunctionCallExp node)
Called by the AFunctionCallExp node from AFunctionCallExp#apply(Switch) . |
void |
caseAFunctionPtrCallExp(AFunctionPtrCallExp node)
Called by the AFunctionPtrCallExp node from AFunctionPtrCallExp#apply(Switch) . |
void |
caseAGtBinop(AGtBinop node)
Called by the AGtBinop node from AGtBinop#apply(Switch) . |
void |
caseAIfThenElseStm(AIfThenElseStm node)
Called by the AIfThenElseStm node from AIfThenElseStm#apply(Switch) . |
void |
caseAIfThenStm(AIfThenStm node)
Called by the AIfThenStm node from AIfThenStm#apply(Switch) . |
void |
caseAInputExp(AInputExp node)
Called by the AInputExp node from AInputExp#apply(Switch) . |
void |
caseAIntConstExp(AIntConstExp node)
Called by the AIntConstExp node from AIntConstExp#apply(Switch) . |
void |
caseALocalDecl(ALocalDecl node)
Called by the ALocalDecl node from ALocalDecl#apply(Switch) . |
void |
caseAMallocExp(AMallocExp node)
Called by the AMallocExp node from AMallocExp#apply(Switch) . |
void |
caseAMinusBinop(AMinusBinop node)
Called by the AMinusBinop node from AMinusBinop#apply(Switch) . |
void |
caseANullExp(ANullExp node)
Called by the ANullExp node from ANullExp#apply(Switch) . |
void |
caseAOutputStm(AOutputStm node)
Called by the AOutputStm node from AOutputStm#apply(Switch) . |
void |
caseAPlusBinop(APlusBinop node)
Called by the APlusBinop node from APlusBinop#apply(Switch) . |
void |
caseAPointerExp(APointerExp node)
Called by the APointerExp node from APointerExp#apply(Switch) . |
void |
caseAProgram(AProgram node)
Called by the AProgram node from AProgram#apply(Switch) . |
void |
caseAReturnStm(AReturnStm node)
Called by the AReturnStm node from AReturnStm#apply(Switch) . |
void |
caseATimesBinop(ATimesBinop node)
Called by the ATimesBinop node from ATimesBinop#apply(Switch) . |
void |
caseAVarExp(AVarExp node)
Called by the AVarExp node from AVarExp#apply(Switch) . |
void |
caseAWhileStm(AWhileStm node)
Called by the AWhileStm node from AWhileStm#apply(Switch) . |
void |
caseEOF(EOF token)
Called by the EOF node from EOF#apply(Switch) . |
void |
caseStart(Start node)
Called by the Start node from Start#apply(Switch) . |
void |
caseTAnd(TAnd node)
Called by the TAnd node from TAnd#apply(Switch) . |
void |
caseTAssign(TAssign node)
Called by the TAssign node from TAssign#apply(Switch) . |
void |
caseTComma(TComma node)
Called by the TComma node from TComma#apply(Switch) . |
void |
caseTCommentBlock(TCommentBlock node)
Called by the TCommentBlock node from TCommentBlock#apply(Switch) . |
void |
caseTCommentSingle(TCommentSingle node)
Called by the TCommentSingle node from TCommentSingle#apply(Switch) . |
void |
caseTDiv(TDiv node)
Called by the TDiv node from TDiv#apply(Switch) . |
void |
caseTElse(TElse node)
Called by the TElse node from TElse#apply(Switch) . |
void |
caseTEq(TEq node)
Called by the TEq node from TEq#apply(Switch) . |
void |
caseTGt(TGt node)
Called by the TGt node from TGt#apply(Switch) . |
void |
caseTIdentifier(TIdentifier node)
Called by the TIdentifier node from TIdentifier#apply(Switch) . |
void |
caseTIf(TIf node)
Called by the TIf node from TIf#apply(Switch) . |
void |
caseTInput(TInput node)
Called by the TInput node from TInput#apply(Switch) . |
void |
caseTIntegerConst(TIntegerConst node)
Called by the TIntegerConst node from TIntegerConst#apply(Switch) . |
void |
caseTLBrace(TLBrace node)
Called by the TLBrace node from TLBrace#apply(Switch) . |
void |
caseTLPar(TLPar node)
Called by the TLPar node from TLPar#apply(Switch) . |
void |
caseTMalloc(TMalloc node)
Called by the TMalloc node from TMalloc#apply(Switch) . |
void |
caseTMinus(TMinus node)
Called by the TMinus node from TMinus#apply(Switch) . |
void |
caseTNull(TNull node)
Called by the TNull node from TNull#apply(Switch) . |
void |
caseTOutput(TOutput node)
Called by the TOutput node from TOutput#apply(Switch) . |
void |
caseTPlus(TPlus node)
Called by the TPlus node from TPlus#apply(Switch) . |
void |
caseTRBrace(TRBrace node)
Called by the TRBrace node from TRBrace#apply(Switch) . |
void |
caseTReturn(TReturn node)
Called by the TReturn node from TReturn#apply(Switch) . |
void |
caseTRPar(TRPar node)
Called by the TRPar node from TRPar#apply(Switch) . |
void |
caseTSemicolon(TSemicolon node)
Called by the TSemicolon node from TSemicolon#apply(Switch) . |
void |
caseTStar(TStar node)
Called by the TStar node from TStar#apply(Switch) . |
void |
caseTVar(TVar node)
Called by the TVar node from TVar#apply(Switch) . |
void |
caseTWhile(TWhile node)
Called by the TWhile node from TWhile#apply(Switch) . |
void |
caseTWhiteSpace(TWhiteSpace node)
Called by the TWhiteSpace node from TWhiteSpace#apply(Switch) . |
void |
caseAAssignPtrStm(AAssignPtrStm node)
Called by the AAssignPtrStm node from AAssignPtrStm#apply(Switch) . |
void |
caseAAssignVarStm(AAssignVarStm node)
Called by the AAssignVarStm node from AAssignVarStm#apply(Switch) . |
void |
defaultNode(Node node)
Base case for all nodes. |
void |
defaultPBinop(PBinop node)
Base case for all PBinop nodes. |
void |
defaultPBlock(PBlock node)
Base case for all PBlock nodes. |
void |
defaultPBody(PBody node)
Base case for all PBody nodes. |
void |
defaultPDecl(PDecl node)
Base case for all PDecl nodes. |
void |
defaultPExp(PExp node)
Base case for all PExp nodes. |
void |
defaultPProgram(PProgram node)
Base case for all PProgram nodes. |
void |
defaultPStm(PStm node)
Base case for all PStm nodes. |
void |
defaultToken(Token token)
Base case for all tokens. |
Object |
getIn(Node node)
Returns the Object associated with the Node node in the in map. |
Object |
getOut(Node node)
Returns the Object associated with the Node node in the out map. |
void |
setIn(Node node,
Object o)
Sets the Object o to be a associated with the Node node in the in map. |
void |
setOut(Node node,
Object o)
Sets the Object o to be a associated with the Node node in the out map. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnalysisAdapter()
Method Detail |
---|
public Object getIn(Node node)
Object
associated with the Node
node
in the in
map.
getIn
in interface Analysis
Object
associated with the Node
node
in the in
mappublic void setIn(Node node, Object o)
Object
o
to be a associated with the Node
node
in the in
map.
If o
is null
the associated object for node
is removed.
setIn
in interface Analysis
node
- the Node
to which Object
o
is to be associated.o
- the Object
to be associated with the Node
node
in the in
mappublic Object getOut(Node node)
Object
associated with the Node
node
in the out
map.
getOut
in interface Analysis
Object
associated with the Node
node
in the out
mappublic void setOut(Node node, Object o)
Object
o
to be a associated with the Node
node
in the out
map.
If o
is null
the associated object for node
is removed.
setOut
in interface Analysis
node
- the Node
to which Object
o
is to be associated.o
- the Object
to be associated with the Node
node
in the out
mappublic void caseStart(Start node)
Start
node from Start#apply(Switch)
.
caseStart
in interface Analysis
node
- the calling Start
nodepublic void caseAProgram(AProgram node)
AProgram
node from AProgram#apply(Switch)
.
caseAProgram
in interface Analysis
node
- the calling AProgram
nodepublic void caseAFuncDecl(AFuncDecl node)
AFuncDecl
node from AFuncDecl#apply(Switch)
.
caseAFuncDecl
in interface Analysis
node
- the calling AFuncDecl
nodepublic void caseALocalDecl(ALocalDecl node)
ALocalDecl
node from ALocalDecl#apply(Switch)
.
caseALocalDecl
in interface Analysis
node
- the calling ALocalDecl
nodepublic void caseABody(ABody node)
ABody
node from ABody#apply(Switch)
.
caseABody
in interface Analysis
node
- the calling ABody
nodepublic void caseABlock(ABlock node)
ABlock
node from ABlock#apply(Switch)
.
caseABlock
in interface Analysis
node
- the calling ABlock
nodepublic void caseAPlusBinop(APlusBinop node)
APlusBinop
node from APlusBinop#apply(Switch)
.
caseAPlusBinop
in interface Analysis
node
- the calling APlusBinop
nodepublic void caseAMinusBinop(AMinusBinop node)
AMinusBinop
node from AMinusBinop#apply(Switch)
.
caseAMinusBinop
in interface Analysis
node
- the calling AMinusBinop
nodepublic void caseATimesBinop(ATimesBinop node)
ATimesBinop
node from ATimesBinop#apply(Switch)
.
caseATimesBinop
in interface Analysis
node
- the calling ATimesBinop
nodepublic void caseADivideBinop(ADivideBinop node)
ADivideBinop
node from ADivideBinop#apply(Switch)
.
caseADivideBinop
in interface Analysis
node
- the calling ADivideBinop
nodepublic void caseAEqBinop(AEqBinop node)
AEqBinop
node from AEqBinop#apply(Switch)
.
caseAEqBinop
in interface Analysis
node
- the calling AEqBinop
nodepublic void caseAGtBinop(AGtBinop node)
AGtBinop
node from AGtBinop#apply(Switch)
.
caseAGtBinop
in interface Analysis
node
- the calling AGtBinop
nodepublic void caseABinopExp(ABinopExp node)
ABinopExp
node from ABinopExp#apply(Switch)
.
caseABinopExp
in interface Analysis
node
- the calling ABinopExp
nodepublic void caseAPointerExp(APointerExp node)
APointerExp
node from APointerExp#apply(Switch)
.
caseAPointerExp
in interface Analysis
node
- the calling APointerExp
nodepublic void caseADerefExp(ADerefExp node)
ADerefExp
node from ADerefExp#apply(Switch)
.
caseADerefExp
in interface Analysis
node
- the calling ADerefExp
nodepublic void caseAIntConstExp(AIntConstExp node)
AIntConstExp
node from AIntConstExp#apply(Switch)
.
caseAIntConstExp
in interface Analysis
node
- the calling AIntConstExp
nodepublic void caseAFunctionCallExp(AFunctionCallExp node)
AFunctionCallExp
node from AFunctionCallExp#apply(Switch)
.
caseAFunctionCallExp
in interface Analysis
node
- the calling AFunctionCallExp
nodepublic void caseAFunctionPtrCallExp(AFunctionPtrCallExp node)
AFunctionPtrCallExp
node from AFunctionPtrCallExp#apply(Switch)
.
caseAFunctionPtrCallExp
in interface Analysis
node
- the calling AFunctionPtrCallExp
nodepublic void caseAVarExp(AVarExp node)
AVarExp
node from AVarExp#apply(Switch)
.
caseAVarExp
in interface Analysis
node
- the calling AVarExp
nodepublic void caseAInputExp(AInputExp node)
AInputExp
node from AInputExp#apply(Switch)
.
caseAInputExp
in interface Analysis
node
- the calling AInputExp
nodepublic void caseAMallocExp(AMallocExp node)
AMallocExp
node from AMallocExp#apply(Switch)
.
caseAMallocExp
in interface Analysis
node
- the calling AMallocExp
nodepublic void caseANullExp(ANullExp node)
ANullExp
node from ANullExp#apply(Switch)
.
caseANullExp
in interface Analysis
node
- the calling ANullExp
nodepublic void caseAIfThenStm(AIfThenStm node)
AIfThenStm
node from AIfThenStm#apply(Switch)
.
caseAIfThenStm
in interface Analysis
node
- the calling AIfThenStm
nodepublic void caseAIfThenElseStm(AIfThenElseStm node)
AIfThenElseStm
node from AIfThenElseStm#apply(Switch)
.
caseAIfThenElseStm
in interface Analysis
node
- the calling AIfThenElseStm
nodepublic void caseAWhileStm(AWhileStm node)
AWhileStm
node from AWhileStm#apply(Switch)
.
caseAWhileStm
in interface Analysis
node
- the calling AWhileStm
nodepublic void caseADeclStm(ADeclStm node)
ADeclStm
node from ADeclStm#apply(Switch)
.
caseADeclStm
in interface Analysis
node
- the calling ADeclStm
nodepublic void caseAReturnStm(AReturnStm node)
AReturnStm
node from AReturnStm#apply(Switch)
.
caseAReturnStm
in interface Analysis
node
- the calling AReturnStm
nodepublic void caseAOutputStm(AOutputStm node)
AOutputStm
node from AOutputStm#apply(Switch)
.
caseAOutputStm
in interface Analysis
node
- the calling AOutputStm
nodepublic void caseAAssignVarStm(AAssignVarStm node)
AAssignVarStm
node from AAssignVarStm#apply(Switch)
.
caseAAssignVarStm
in interface Analysis
node
- the calling AAssignVarStm
nodepublic void caseAAssignPtrStm(AAssignPtrStm node)
AAssignPtrStm
node from AAssignPtrStm#apply(Switch)
.
caseAAssignPtrStm
in interface Analysis
node
- the calling AAssignPtrStm
nodepublic void caseABlockStm(ABlockStm node)
ABlockStm
node from ABlockStm#apply(Switch)
.
caseABlockStm
in interface Analysis
node
- the calling ABlockStm
nodepublic void defaultPProgram(PProgram node)
PProgram
nodes.
node
- the calling PProgram
nodepublic void defaultPDecl(PDecl node)
PDecl
nodes.
node
- the calling PDecl
nodepublic void defaultPBody(PBody node)
PBody
nodes.
node
- the calling PBody
nodepublic void defaultPBlock(PBlock node)
PBlock
nodes.
node
- the calling PBlock
nodepublic void defaultPBinop(PBinop node)
PBinop
nodes.
node
- the calling PBinop
nodepublic void defaultPExp(PExp node)
PExp
nodes.
node
- the calling PExp
nodepublic void defaultPStm(PStm node)
PStm
nodes.
node
- the calling PStm
nodepublic void caseTWhiteSpace(TWhiteSpace node)
TWhiteSpace
node from TWhiteSpace#apply(Switch)
.
caseTWhiteSpace
in interface Analysis
node
- the calling TWhiteSpace
nodepublic void caseTCommentSingle(TCommentSingle node)
TCommentSingle
node from TCommentSingle#apply(Switch)
.
caseTCommentSingle
in interface Analysis
node
- the calling TCommentSingle
nodepublic void caseTCommentBlock(TCommentBlock node)
TCommentBlock
node from TCommentBlock#apply(Switch)
.
caseTCommentBlock
in interface Analysis
node
- the calling TCommentBlock
nodepublic void caseTVar(TVar node)
TVar
node from TVar#apply(Switch)
.
caseTVar
in interface Analysis
node
- the calling TVar
nodepublic void caseTInput(TInput node)
TInput
node from TInput#apply(Switch)
.
caseTInput
in interface Analysis
node
- the calling TInput
nodepublic void caseTOutput(TOutput node)
TOutput
node from TOutput#apply(Switch)
.
caseTOutput
in interface Analysis
node
- the calling TOutput
nodepublic void caseTIf(TIf node)
TIf
node from TIf#apply(Switch)
.
caseTIf
in interface Analysis
node
- the calling TIf
nodepublic void caseTElse(TElse node)
TElse
node from TElse#apply(Switch)
.
caseTElse
in interface Analysis
node
- the calling TElse
nodepublic void caseTWhile(TWhile node)
TWhile
node from TWhile#apply(Switch)
.
caseTWhile
in interface Analysis
node
- the calling TWhile
nodepublic void caseTReturn(TReturn node)
TReturn
node from TReturn#apply(Switch)
.
caseTReturn
in interface Analysis
node
- the calling TReturn
nodepublic void caseTMalloc(TMalloc node)
TMalloc
node from TMalloc#apply(Switch)
.
caseTMalloc
in interface Analysis
node
- the calling TMalloc
nodepublic void caseTNull(TNull node)
TNull
node from TNull#apply(Switch)
.
caseTNull
in interface Analysis
node
- the calling TNull
nodepublic void caseTLPar(TLPar node)
TLPar
node from TLPar#apply(Switch)
.
caseTLPar
in interface Analysis
node
- the calling TLPar
nodepublic void caseTRPar(TRPar node)
TRPar
node from TRPar#apply(Switch)
.
caseTRPar
in interface Analysis
node
- the calling TRPar
nodepublic void caseTLBrace(TLBrace node)
TLBrace
node from TLBrace#apply(Switch)
.
caseTLBrace
in interface Analysis
node
- the calling TLBrace
nodepublic void caseTRBrace(TRBrace node)
TRBrace
node from TRBrace#apply(Switch)
.
caseTRBrace
in interface Analysis
node
- the calling TRBrace
nodepublic void caseTSemicolon(TSemicolon node)
TSemicolon
node from TSemicolon#apply(Switch)
.
caseTSemicolon
in interface Analysis
node
- the calling TSemicolon
nodepublic void caseTComma(TComma node)
TComma
node from TComma#apply(Switch)
.
caseTComma
in interface Analysis
node
- the calling TComma
nodepublic void caseTAssign(TAssign node)
TAssign
node from TAssign#apply(Switch)
.
caseTAssign
in interface Analysis
node
- the calling TAssign
nodepublic void caseTPlus(TPlus node)
TPlus
node from TPlus#apply(Switch)
.
caseTPlus
in interface Analysis
node
- the calling TPlus
nodepublic void caseTMinus(TMinus node)
TMinus
node from TMinus#apply(Switch)
.
caseTMinus
in interface Analysis
node
- the calling TMinus
nodepublic void caseTStar(TStar node)
TStar
node from TStar#apply(Switch)
.
caseTStar
in interface Analysis
node
- the calling TStar
nodepublic void caseTDiv(TDiv node)
TDiv
node from TDiv#apply(Switch)
.
caseTDiv
in interface Analysis
node
- the calling TDiv
nodepublic void caseTAnd(TAnd node)
TAnd
node from TAnd#apply(Switch)
.
caseTAnd
in interface Analysis
node
- the calling TAnd
nodepublic void caseTGt(TGt node)
TGt
node from TGt#apply(Switch)
.
caseTGt
in interface Analysis
node
- the calling TGt
nodepublic void caseTEq(TEq node)
TEq
node from TEq#apply(Switch)
.
caseTEq
in interface Analysis
node
- the calling TEq
nodepublic void caseTIntegerConst(TIntegerConst node)
TIntegerConst
node from TIntegerConst#apply(Switch)
.
caseTIntegerConst
in interface Analysis
node
- the calling TIntegerConst
nodepublic void caseTIdentifier(TIdentifier node)
TIdentifier
node from TIdentifier#apply(Switch)
.
caseTIdentifier
in interface Analysis
node
- the calling TIdentifier
nodepublic void caseEOF(EOF token)
EOF
node from EOF#apply(Switch)
.
caseEOF
in interface Analysis
token
- the calling EOF
tokenpublic void defaultToken(Token token)
token
- the calling Token
tokenpublic void defaultNode(Node node)
node
- the calling Node
node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |