fmrisc.AST
Class LetExpression

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

public final class LetExpression
extends ExpressionBase

Handling of terms with local bindings.


Constructor Summary
LetExpression(ValueDeclaration[] declarations, Expression base)
          construct let expressions of declarations and base expressions
 
Method Summary
 Expression getBase()
          get base expression
 ValueDeclaration[] getDeclarations()
          get declarations
 Expression instantiate()
          return copy of AST with value references instantiated by the substitutions set in the corresponding declaration identifiers
 void printCore(java.io.PrintWriter out)
          Prints text representation of tree on out (without new line termination).
 
Methods inherited from class fmrisc.AST.ExpressionBase
printPriority
 
Methods inherited from class fmrisc.AST.ASTBase
print, printParens, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface fmrisc.AST.AST
print, printParens, toString
 

Constructor Detail

LetExpression

public LetExpression(ValueDeclaration[] declarations,
                     Expression base)
construct let expressions of declarations and base expressions

Parameters:
declarations - the local bindings in the expressions
base - the base expressions
Method Detail

getDeclarations

public ValueDeclaration[] getDeclarations()
get declarations

Returns:
the declaration sequence

getBase

public Expression getBase()
get 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

printCore

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

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