fmrisc.Syntax
Class ExpressionBase

java.lang.Object
  extended by fmrisc.Syntax.ASTBase
      extended by fmrisc.Syntax.ExpressionBase
All Implemented Interfaces:
AST, Expression
Direct Known Subclasses:
ApplicationExpression, BinaryExpression, IfThenElseExpression, LetExpression, Logical, QuantifiedExpression, RecordTerm, SelectionTerm, TupleTerm, UnaryExpression, UpdateTerm

public abstract class ExpressionBase
extends ASTBase
implements Expression

Base class of all expressions (terms and formulas)


Constructor Summary
ExpressionBase()
           
 
Method Summary
abstract  int getPriority()
          get binding level for printing (lower numbers mean greater binding power)
 void printPriority(int treshold, java.io.PrintWriter out)
          print expression, use parentheses if priority is greater than treshold
 
Methods inherited from class fmrisc.Syntax.ASTBase
print, printCore, printParens, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface fmrisc.Syntax.Expression
instantiate
 
Methods inherited from interface fmrisc.Syntax.AST
accept, print, printCore, printParens, toString
 

Constructor Detail

ExpressionBase

public ExpressionBase()
Method Detail

getPriority

public abstract int getPriority()
get binding level for printing (lower numbers mean greater binding power)

Specified by:
getPriority in interface Expression
Returns:
the priority level

printPriority

public void printPriority(int treshold,
                          java.io.PrintWriter out)
print expression, use parentheses if priority is greater than treshold

Specified by:
printPriority in interface Expression
Parameters:
treshold - priority level of enclosing expression
out - writer to print expression on