jcaas.script_nodes
Class ArithmeticTerm
java.lang.Object
jcaas.script_nodes.AbstractInterpretable
jcaas.script_nodes.ArithmeticTerm
- All Implemented Interfaces:
- Interpretable
public class ArithmeticTerm
- extends AbstractInterpretable
This class represents an arithmetic_term node of a syntax tree.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NONE
public static final int NONE
- See Also:
- Constant Field Values
MULTIPLY
public static final int MULTIPLY
- See Also:
- Constant Field Values
DIVIDE
public static final int DIVIDE
- See Also:
- Constant Field Values
ArithmeticTerm
public ArithmeticTerm(ArithmeticTerm term,
ArithmeticFactor factor,
int operation)
- Constructor for when arithmetic_term ::= arithmetic_term op arithmetic_factor,
where op is MULTIPLY, for '*', or DIVIDE, for '/'.
- Parameters:
term
- the term to be multiplied or divided.factor
- the factor to divide or multiply by.operation
- the operation to perform.
ArithmeticTerm
public ArithmeticTerm(ArithmeticFactor factor)
- Constructor for when arithmetic_term ::= arithmetic_factor.
- Parameters:
factor
- the factor to drop down to in the syntax tree.
interpret
public void interpret(Context c)