|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--tracer.expression.ExprNode
A reduced expression node in an operator-precedence parsing tree.
| Field Summary | |
int |
etype
Expression node type. |
(package private) static int |
EXPNODE_BINFUNC
An expression node containing two expression nodes and a binary function applicable on them. |
(package private) static int |
EXPNODE_CONST
An expression node containing a constant number. |
(package private) static int |
EXPNODE_EMPTY
An empty expression node. |
(package private) static int |
EXPNODE_NODE
An expression node containing a single expression node. |
(package private) static int |
EXPNODE_UNARYFUNC
An expression node containing an expression node and a unary function applicable on it. |
(package private) static int |
EXPNODE_VAR
An expression node containing a variable. |
(package private) Function |
func
Function contained in the current expression node. |
(package private) double |
id
Constant contained in the current expression node. |
(package private) ExprNode |
node1
Expression node 1 contained in the current expression node. |
(package private) ExprNode |
node2
Expression node 2 contained in the current expression node. |
(package private) int |
numNodes
|
(package private) Variable |
variable
Variable contained in the current expression node. |
| Constructor Summary | |
ExprNode()
Create a default empty expression node. |
|
| Method Summary | |
double |
eval()
Evaluate the expression node. |
void |
push(double i)
Pushes a const into the expression node. |
void |
push(ExprNode n)
Pushes an expression node into the expression node. |
void |
push(Function f)
Pushes a function into the expression node. |
void |
push(Symbol sym)
Pushes a symbol into the expression node. |
void |
push(Variable v)
Pushes a variable into the expression node. |
java.lang.String |
toString()
Returns the string representation of the expression node. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
static final int EXPNODE_EMPTY
static final int EXPNODE_NODE
static final int EXPNODE_UNARYFUNC
static final int EXPNODE_BINFUNC
static final int EXPNODE_CONST
static final int EXPNODE_VAR
public int etype
int numNodes
ExprNode node1
ExprNode node2
Function func
double id
Variable variable
| Constructor Detail |
public ExprNode()
| Method Detail |
public void push(Symbol sym)
throws ExpressionParseException
public void push(ExprNode n)
throws ExpressionParseException
public void push(Function f)
throws ExpressionParseException
public void push(double i)
throws ExpressionParseException
public void push(Variable v)
throws ExpressionParseException
public double eval()
throws ExpressionEvalException
public java.lang.String toString()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||