public abstract class BinaryExpression extends ExpressionBase
Constructor and Description |
---|
BinaryExpression(java.lang.String op,
Expression first,
Expression second)
constructs binary expression from op, first, and second
|
Modifier and Type | Method and Description |
---|---|
AST |
accept(ASTVisitor visitor)
Accept visitor for a visit.
|
abstract BinaryExpression |
construct(Expression first,
Expression second)
Construct binary expression of the same kind as this expression.
|
Expression |
getFirst()
Returns first subexpression
|
Expression |
getSecond()
Returns second subexpression
|
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).
|
getPriority, printPriority
print, printParens, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
print, printParens, toString
public BinaryExpression(java.lang.String op, Expression first, Expression second)
op
- the name of the operation used for printingfirst
- the first operandsecond
- the second operandpublic Expression getFirst()
public Expression getSecond()
public void printCore(java.io.PrintWriter out)
public Expression instantiate()
public abstract BinaryExpression construct(Expression first, Expression second)
first
- an expression.second
- an expression.public AST accept(ASTVisitor visitor)
visitor
- the visitor who is accepted by this node.