public final class PlusTerm extends BinaryTerm
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
operator |
static int |
precedence |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ASTVisitor visitor)
Accept visitor for a visit.
|
void |
accept(ASTVisitorOld visitor)
Accept visitor for a visit.
|
static PlusTerm |
construct(Term first,
Term second)
Construct a sum term.
|
java.lang.String |
getOperator()
Get textual representation of operator.
|
int |
getPrecedence()
Get precedence value of the term operator
(higher precedence value means higher binding power)
|
boolean |
isRightAssociative()
True if "e1 op (e2 op e3)" can be printed as "e1 op e2 op e3"
|
getFirst, getSecond, getType, isAssociative, setTypeacceptChildrengetPosition, isLeftAssociative, setPositionaccept, accept, print, printCore, toString, toStringCoreequals, getClass, hashCode, notify, notifyAll, wait, wait, waitisLeftAssociativegetPosition, setPositionacceptChildren, print, printCore, toString, toStringCorepublic static final int precedence
public static final java.lang.String operator
public static PlusTerm construct(Term first, Term second)
first - the first (left) part.second - the right (second) part.public int getPrecedence()
getPrecedence in interface ExpressiongetPrecedence in class ExpressionBasepublic java.lang.String getOperator()
getOperator in class BinaryExpressionpublic boolean isRightAssociative()
isRightAssociative in interface ExpressionisRightAssociative in class ExpressionBasepublic void accept(ASTVisitorOld visitor)
accept in interface ASTaccept in class BinaryTermvisitor - the visitor who is accepted by this node.public void accept(ASTVisitor visitor)
accept in interface ASTaccept in class BinaryTermvisitor - the visitor who is accepted by this node.