fmrisc.Syntax
Class OrFormula

java.lang.Object
  extended by fmrisc.Syntax.ASTBase
      extended by fmrisc.Syntax.ExpressionBase
          extended by fmrisc.Syntax.BinaryExpression
              extended by fmrisc.Syntax.OrFormula
All Implemented Interfaces:
AST, Expression

public final class OrFormula
extends BinaryExpression

Handling of disjunctions.


Constructor Summary
OrFormula(Expression base1, Expression base2)
          construct disjunction with components base1 and base2
 
Method Summary
 BinaryExpression construct(Expression first, Expression second)
          Construct binary expression of the same kind as this expression.
 int getPriority()
          get binding level for printing (lower numbers mean greater binding power)
 
Methods inherited from class fmrisc.Syntax.BinaryExpression
accept, getFirst, getSecond, instantiate, printCore
 
Methods inherited from class fmrisc.Syntax.ExpressionBase
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

OrFormula

public OrFormula(Expression base1,
                 Expression base2)
construct disjunction with components base1 and base2

Parameters:
base1 - the first component
base2 - the second component
Method Detail

getPriority

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

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

construct

public BinaryExpression construct(Expression first,
                                  Expression second)
Construct binary expression of the same kind as this expression.

Specified by:
construct in class BinaryExpression
Parameters:
first - an expression.
second - an expression.
Returns:
a binary expression of the same kind as this expression with subexpressions first and second.