fmrisc.AST
Class BinaryExpression
java.lang.Object
fmrisc.AST.ASTBase
fmrisc.AST.ExpressionBase
fmrisc.AST.BinaryExpression
- All Implemented Interfaces:
- AST, Expression
- Direct Known Subclasses:
- AndFormula, DividesTerm, EqualsFormula, GreaterEqualFormula, GreaterFormula, ImpliesFormula, LessEqualFormula, LessFormula, MinusTerm, NotEqualsFormula, OrFormula, PlusTerm, TimesTerm
- public abstract class BinaryExpression
- extends ExpressionBase
Abstract base class of binary expressions
Method Summary |
Expression |
getFirst()
Returns first subexpression |
Expression |
getSecond()
Returns second subexpression |
void |
printCore(java.io.PrintWriter out)
Prints text representation of tree on out (without new line termination). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BinaryExpression
public BinaryExpression(java.lang.String op,
Expression first,
Expression second)
- constructs binary expression from op, first, and second
- Parameters:
op
- the name of the operation used for printingfirst
- the first operandsecond
- the second operand
getFirst
public Expression getFirst()
- Returns first subexpression
- Returns:
- the first subexpression
getSecond
public Expression getSecond()
- Returns second subexpression
- Returns:
- the second subexpression
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