|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jstatcom.parser.CalcEngine
public class CalcEngine
Field Summary | |
---|---|
Token |
jj_nt
|
boolean |
lookingAhead
|
Token |
token
|
CalcEngineTokenManager |
token_source
|
Fields inherited from interface com.jstatcom.parser.CalcEngineConstants |
---|
CONSTANT, DEFAULT, DIGIT, DIVIDE, EOF, EOFEXP, EXP, FLOAT, FUNCNAME, INTEGER, LETTER, LHS, MINUS, MULTIPLY, PLUS, ROWAPPEND, tokenImage, VAR |
Constructor Summary | |
---|---|
CalcEngine()
Default constructor. |
|
CalcEngine(CalcEngineTokenManager tm)
|
|
CalcEngine(java.io.InputStream stream)
|
|
CalcEngine(java.io.InputStream stream,
java.lang.String encoding)
|
|
CalcEngine(java.io.Reader stream)
|
Method Summary | |
---|---|
void |
clearVariableMap()
Deletes all variables from the variableMap. |
void |
disable_tracing()
|
void |
element()
|
void |
enable_tracing()
|
void |
equation()
Expression of the form ( |
void |
exp()
|
void |
function()
|
ParseException |
generateParseException()
|
Token |
getNextToken()
|
java.lang.String |
getOutput()
Retrieves the contents of the output buffer of the last parser run. |
Token |
getToken(int index)
|
double[] |
getVariable(java.lang.String variableName)
Retrieves the underlying data for a variableName. |
java.lang.String[] |
getVariableNames()
Retrieves all keys that represent the variable names. |
static void |
main(java.lang.String[] args)
|
void |
parseString(java.lang.String inputString)
Reinitializes engine and parses an input String. |
void |
putVariable(java.lang.String keyName,
double[] dataArray)
Define the variables that can be used during the parsing. |
void |
ReInit(CalcEngineTokenManager tm)
|
void |
ReInit(java.io.InputStream stream)
|
void |
ReInit(java.io.InputStream stream,
java.lang.String encoding)
|
void |
ReInit(java.io.Reader stream)
|
void |
sum()
|
void |
term()
|
int |
toeval()
|
void |
unary()
|
void |
variable()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public CalcEngineTokenManager token_source
public Token token
public Token jj_nt
public boolean lookingAhead
Constructor Detail |
---|
public CalcEngine()
public CalcEngine(java.io.InputStream stream)
public CalcEngine(java.io.InputStream stream, java.lang.String encoding)
public CalcEngine(java.io.Reader stream)
public CalcEngine(CalcEngineTokenManager tm)
Method Detail |
---|
public static void main(java.lang.String[] args)
public void clearVariableMap()
public void putVariable(java.lang.String keyName, double[] dataArray)
keyName
- name of the variabledataArray
- is a (T x 1) array with the data
java.lang.IllegalArgumentException
- if (JSCConstants.isValidName(keyName) != null || dataArray ==
null)public java.lang.String[] getVariableNames()
public double[] getVariable(java.lang.String variableName)
variableName
- the name of the variable
public java.lang.String getOutput()
public void parseString(java.lang.String inputString) throws ParseException, TokenMgrError
inputString
- the String to parse
ParseException
- if parsing failed, contains error description
TokenMgrError
- if tokenizing failed, contains error descriptionpublic final int toeval() throws ParseException
ParseException
public final void equation() throws ParseException
ParseException
public final void sum() throws ParseException
ParseException
public final void term() throws ParseException
ParseException
public final void exp() throws ParseException
ParseException
public final void unary() throws ParseException
ParseException
public final void element() throws ParseException
ParseException
public final void variable() throws ParseException
ParseException
public final void function() throws ParseException
ParseException
public void ReInit(java.io.InputStream stream)
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
public void ReInit(java.io.Reader stream)
public void ReInit(CalcEngineTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |