com.dandymadeproductions.expressionparser
Class ExprNode

java.lang.Object
  extended by com.dandymadeproductions.expressionparser.ExprNode

 class ExprNode
extends java.lang.Object

A reduced expression node in an operator-precedence parsing tree.

Version:
1.9 02/13/2012
Author:
David Wanqian Liu, Dana M. Proctor

Field Summary
(package private) static int EXPNODE_BINFUNC
           
(package private) static int EXPNODE_CONST
           
(package private) static int EXPNODE_EMPTY
           
(package private) static int EXPNODE_NODE
           
(package private) static int EXPNODE_UNARYFUNC
           
(package private) static int EXPNODE_VAR
           
 
Constructor Summary
protected ExprNode()
           
 
Method Summary
protected  Complex eval_Complex()
           
protected  double eval()
           
protected  void push(double i)
           
protected  void push(ExprNode n)
           
protected  void push(Function f)
           
protected  void push(Symbol sym)
           
protected  void push(Variable v)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EXPNODE_EMPTY

static final int EXPNODE_EMPTY
See Also:
Constant Field Values

EXPNODE_NODE

static final int EXPNODE_NODE
See Also:
Constant Field Values

EXPNODE_UNARYFUNC

static final int EXPNODE_UNARYFUNC
See Also:
Constant Field Values

EXPNODE_BINFUNC

static final int EXPNODE_BINFUNC
See Also:
Constant Field Values

EXPNODE_CONST

static final int EXPNODE_CONST
See Also:
Constant Field Values

EXPNODE_VAR

static final int EXPNODE_VAR
See Also:
Constant Field Values
Constructor Detail

ExprNode

protected ExprNode()
Method Detail

push

protected void push(Symbol sym)
             throws ExpressionParseException
Throws:
ExpressionParseException

push

protected void push(ExprNode n)
             throws ExpressionParseException
Throws:
ExpressionParseException

push

protected void push(Function f)
             throws ExpressionParseException
Throws:
ExpressionParseException

push

protected void push(double i)
             throws ExpressionParseException
Throws:
ExpressionParseException

push

protected void push(Variable v)
             throws ExpressionParseException
Throws:
ExpressionParseException

eval

protected double eval()
               throws ExpressionEvalException
Throws:
ExpressionEvalException

eval_Complex

protected Complex eval_Complex()
                        throws ExpressionEvalException
Throws:
ExpressionEvalException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object