fmrisc.AST
Class ValueDeclIdentifier

java.lang.Object
  extended byfmrisc.AST.ASTBase
      extended byfmrisc.AST.Identifier
          extended byfmrisc.AST.ValueDeclIdentifier
All Implemented Interfaces:
AST

public final class ValueDeclIdentifier
extends Identifier

Handling of identifiers used in value declarations


Constructor Summary
ValueDeclIdentifier(java.lang.String name)
          construct identifier from name
 
Method Summary
 ValueTableEntry getEntry()
          returns value table entry
 ValueDeclIdentifier getSubstitution()
          returns substitution identifier for instantiation
 java.lang.String getUniqueName()
          returns unique name of identifier
 ValueDeclIdentifier instantiate()
          returns instantiated copy of identifier
 void makeNameUnique()
          replace name of identifier by unique name; this change is automatically propagated to all references to this identifier
 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 resetSubstitution()
          reset substitution field
 void setSubstitution(ValueDeclIdentifier substitution)
          set substitution expression for instantiation
 
Methods inherited from class fmrisc.AST.Identifier
getName, 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
 

Constructor Detail

ValueDeclIdentifier

public ValueDeclIdentifier(java.lang.String name)
construct identifier from name

Parameters:
name - the text representation of the identifier
Method Detail

makeNameUnique

public void makeNameUnique()
replace name of identifier by unique name; this change is automatically propagated to all references to this identifier


getUniqueName

public java.lang.String getUniqueName()
returns unique name of identifier

Returns:
the unique name of the identifier

getEntry

public ValueTableEntry getEntry()
returns value table entry

Returns:
the value table entry

getSubstitution

public ValueDeclIdentifier getSubstitution()
returns substitution identifier for instantiation

Returns:
the substitution identifier

setSubstitution

public void setSubstitution(ValueDeclIdentifier substitution)
set substitution expression for instantiation

Parameters:
substitution - the substitution expression

resetSubstitution

public void resetSubstitution()
reset substitution field


instantiate

public ValueDeclIdentifier instantiate()
returns instantiated copy of identifier

Returns:
the copy of the identifier

printCore

public void printCore(java.io.PrintWriter out)
Prints text representation on out (without new line termination).

Specified by:
printCore in interface AST
Overrides:
printCore in class Identifier
Parameters:
out - the stream on which the text is written

print

public void print(java.io.PrintWriter out)
Prints text representation on out (without new line termination). Overrides ASTBase.print such that parentheses are never printed around the number.

Specified by:
print in interface AST
Overrides:
print in class Identifier
Parameters:
out - the stream on which the text is written