fmrisc.Syntax
Class UnaryExpression

java.lang.Object
  extended by fmrisc.Syntax.ASTBase
      extended by fmrisc.Syntax.ExpressionBase
          extended by fmrisc.Syntax.UnaryExpression
All Implemented Interfaces:
AST, Expression
Direct Known Subclasses:
NegationTerm, NotFormula

public abstract class UnaryExpression
extends ExpressionBase

Abstract base class of unary expressions


Constructor Summary
UnaryExpression(java.lang.String op, Expression base)
          constructs binary expression from op and base
 
Method Summary
 AST accept(ASTVisitor visitor)
          Accept visitor for a visit.
 Expression getBase()
          Returns base expression
 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.Syntax.ExpressionBase
getPriority, printPriority
 
Methods inherited from class fmrisc.Syntax.ASTBase
print, printParens, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface fmrisc.Syntax.AST
print, printParens, toString
 

Constructor Detail

UnaryExpression

public UnaryExpression(java.lang.String op,
                       Expression base)
constructs binary expression from op and base

Parameters:
op - the name of the operation used for printing
base - the operand
Method Detail

getBase

public Expression getBase()
Returns base expression

Returns:
the base expression

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

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

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).