|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fmrisc.Syntax.ASTBase fmrisc.Syntax.Identifier fmrisc.Syntax.Reference
public final class Reference
Handling of identifiers used in declarations
Constructor Summary | |
---|---|
Reference(java.lang.String name)
construct reference from name (symbol is set to null) |
|
Reference(java.lang.String name,
Symbol symbol)
construct reference from name and symbol |
Method Summary | |
---|---|
AST |
accept(ASTVisitor visitor)
Accept visitor for a visit. |
int |
getPriority()
get binding level for printing (lower numbers mean greater binding power) |
Symbol |
getSymbol()
returns symbol associated to reference |
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 |
setSymbol(Symbol symbol)
sets symbol associated to reference |
Methods inherited from class fmrisc.Syntax.Identifier |
---|
getName, printPriority, setName |
Methods inherited from class fmrisc.Syntax.ASTBase |
---|
printParens, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface fmrisc.Syntax.Expression |
---|
printPriority |
Methods inherited from interface fmrisc.Syntax.AST |
---|
printParens, toString |
Constructor Detail |
---|
public Reference(java.lang.String name)
name
- the text representation of the referencepublic Reference(java.lang.String name, Symbol symbol)
name
- the text representation of the referencesymbol
- the symbol associated to the referenceMethod Detail |
---|
public Symbol getSymbol()
public void setSymbol(Symbol symbol)
symbol
- the symbolpublic int getPriority()
getPriority
in interface Expression
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 writtenpublic AST accept(ASTVisitor visitor)
accept
in interface AST
visitor
- the visitor who is accepted by this node.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |