fmrisc.AST
Class ParenthesizedExpression

java.lang.Object
  extended byfmrisc.AST.ASTBase
      extended byfmrisc.AST.ExpressionBase
          extended byfmrisc.AST.ParenthesizedExpression
All Implemented Interfaces:
AST, Expression

public final class ParenthesizedExpression
extends ExpressionBase

Construct parenthesized expression (for printing purposes)


Constructor Summary
ParenthesizedExpression(Expression base)
          construct parenthesized expression from base expression (semantically the identitiy)
 
Method Summary
 Expression getBase()
          return base expression
 Expression instantiate()
          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).
 
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
 

Constructor Detail

ParenthesizedExpression

public ParenthesizedExpression(Expression base)
construct parenthesized expression from base expression (semantically the identitiy)

Parameters:
base - the base expression
Method Detail

getBase

public Expression getBase()
return base expression

Returns:
the base expression

instantiate

public Expression instantiate()
return copy of AST with value references instantiated by the substitutions set in the corresponding declaration identifiers

Returns:
the instantiated copy

print

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

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

printCore

public void printCore(java.io.PrintWriter out)
Prints text representation on out (without new line termination). Parentheses are printed around the expression

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