org.lsmp.djep.xjep
Class XOperatorSet

java.lang.Object
  extended by org.nfunk.jep.OperatorSet
      extended by org.lsmp.djep.xjep.XOperatorSet
Direct Known Subclasses:
MatrixOperatorSet

public class XOperatorSet
extends OperatorSet

An OperatorSet where the operators have information about their commutativity etc.

Author:
Rich Morris Created on 26-Jul-2003
See Also:
XOperator

Field Summary
 
Fields inherited from class org.nfunk.jep.OperatorSet
OP_ADD, OP_AND, OP_ASSIGN, OP_CROSS, OP_DIVIDE, OP_DOT, OP_ELEMENT, OP_EQ, OP_GE, OP_GT, OP_LE, OP_LIST, OP_LT, OP_MOD, OP_MULTIPLY, OP_NE, OP_NOT, OP_OR, OP_POWER, OP_SUBTRACT, OP_UDIVIDE, OP_UMINUS
 
Constructor Summary
XOperatorSet()
          Create the standard set of operators.
XOperatorSet(OperatorSet opSet)
          Creates the operator set from a given set.
 
Method Summary
 void printOperators()
          Prints all the operators, with verbose representations of each operators properties.
static void setPrecedenceTable(Operator[][] precArray)
          Sets the precedences of the operators according to order in the supplied array.
 
Methods inherited from class org.nfunk.jep.OperatorSet
getAdd, getAnd, getAssign, getCross, getDivide, getDot, getElement, getEQ, getGE, getGT, getLE, getList, getLT, getMod, getMultiply, getNE, getNot, getOperators, getOr, getPower, getSubtract, getUMinus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XOperatorSet

public XOperatorSet(OperatorSet opSet)
Creates the operator set from a given set. Will use the names and pfmc's but adds info about the operators properties. Note changes pfmc for = from Assign to XAssign


XOperatorSet

public XOperatorSet()
Create the standard set of operators.

Method Detail

setPrecedenceTable

public static final void setPrecedenceTable(Operator[][] precArray)
Sets the precedences of the operators according to order in the supplied array. For example
                setPrecedenceTable(new Operator[][] 
                {       {OP_UMINUS},
                        {OP_NOT},
                        {OP_MUL,OP_DIV,OP_MOD},
                        {OP_PLUS,OP_MINUS},
                        {OP_LT,OP_LE},
                        {OP_GT,OP_GE},
                        {OP_EQ},
                        {OP_NE},
                        {OP_AND},
                        {OP_OR},
                        });
 


printOperators

public void printOperators()
Prints all the operators, with verbose representations of each operators properties.

Overrides:
printOperators in class OperatorSet


http://www.singularsys.com/jep Copyright © 2007 Singular Systems