fmrisc.Syntax
Class TypeDeclIdentifier

java.lang.Object
  extended by fmrisc.Syntax.ASTBase
      extended by fmrisc.Syntax.Identifier
          extended by fmrisc.Syntax.TypeDeclIdentifier
All Implemented Interfaces:
AST

public final class TypeDeclIdentifier
extends Identifier

Handling of identifiers used in type declarations


Constructor Summary
TypeDeclIdentifier(java.lang.String name)
          construct identifier from name
 
Method Summary
 AST accept(ASTVisitor visitor)
          Accept visitor for a visit.
 TypeDeclIdentifier getSubstitution()
          returns substitution identifier for instantiation
 TypeSymbol getSymbol()
          returns type symbol
 TypeDeclIdentifier instantiate()
          returns instantiated copy of 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(TypeDeclIdentifier substitution)
          set substitution type for instantiation
 
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
 

Constructor Detail

TypeDeclIdentifier

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

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

getSymbol

public TypeSymbol getSymbol()
returns type symbol

Returns:
the type symbol

getSubstitution

public TypeDeclIdentifier getSubstitution()
returns substitution identifier for instantiation

Returns:
the substitution identifier

setSubstitution

public void setSubstitution(TypeDeclIdentifier substitution)
set substitution type for instantiation

Parameters:
substitution - the substitution type

resetSubstitution

public void resetSubstitution()
reset substitution field


instantiate

public TypeDeclIdentifier 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

accept

public AST accept(ASTVisitor visitor)
Accept visitor for a visit.

Parameters:
visitor - the visitor who is accepted by this node.
Returns:
the result of the visit (may be null).