|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfmrisc.AST.ASTBase
fmrisc.AST.Identifier
fmrisc.AST.Reference
Handling of identifiers used in declarations
Constructor Summary | |
Reference(java.lang.String name)
construct reference from name (entry is set to null) |
|
Reference(java.lang.String name,
SymbolTableEntry entry)
construct reference from name and symbol table entry |
Method Summary | |
SymbolTableEntry |
getEntry()
returns symbol table entry associated to reference |
java.lang.String |
getName()
returns name of identifier overrides Identifier method such that the name stored in the symbol table entry is returned (if it exists) |
Expression |
instantiate()
return copy of AST with value references instantiated by the substitutions set in the corresponding declaration identifiers |
Type |
instantiateType()
return copy of AST with value references instantiated by the substitutions set in the corresponding declaration identifiers |
void |
print(java.io.PrintWriter out)
Prints text representation on out (without new line termination). |
void |
printCore(java.io.PrintWriter out)
Prints text representation on out (without new line termination). |
void |
setEntry(SymbolTableEntry entry)
sets symbol table entry associated to reference |
Methods inherited from class fmrisc.AST.Identifier |
printPriority, setName |
Methods inherited from class fmrisc.AST.ASTBase |
printParens, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface fmrisc.AST.AST |
printParens, toString |
Methods inherited from interface fmrisc.AST.Expression |
printPriority |
Constructor Detail |
public Reference(java.lang.String name)
name
- the text representation of the referencepublic Reference(java.lang.String name, SymbolTableEntry entry)
name
- the text representation of the referenceentry
- the symbol table entry associated to the referenceMethod Detail |
public java.lang.String getName()
getName
in class Identifier
public SymbolTableEntry getEntry()
public void setEntry(SymbolTableEntry entry)
public Expression instantiate()
instantiate
in interface Expression
public Type instantiateType()
instantiateType
in interface Type
public void printCore(java.io.PrintWriter out)
printCore
in interface AST
printCore
in class Identifier
out
- the stream on which the text is writtenpublic void print(java.io.PrintWriter out)
print
in interface AST
print
in class Identifier
out
- the stream on which the text is written
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |