|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjmathlib.core.interpreter.LexicalAnalyser
public class LexicalAnalyser
class for turning a string expression into a vector of tokens. All public methods are static so there is no need to instantiate it. it creates an instance of itself when the analyseExpression function is called.
| Field Summary |
|---|
| Fields inherited from interface jmathlib.core.constants.TokenConstants |
|---|
ADDSUB_PRIORITY, AND_PRIORITY, ANDAND_PRIORITY, ASSIGN_PRIORITY, BRACKET_PRIORITY, COMPARE_PRIORITY, CONCAT, MATRIX, MULDIV_PRIORITY, OR_PRIORITY, OROR_PRIORITY, PARAMETER, POWER_PRIORITY, RELATION_PRIORITY, SINGLE, ttDelimiter, ttNotSet, ttOperand, ttOperator |
| Fields inherited from interface jmathlib.core.constants.ErrorCodes |
|---|
ERR_BRACKET_OPEN, ERR_BRACKET_ORDER, ERR_FUNCTION_NOT_FOUND, ERR_FUNCTION_NOT_IMPLEMENTED, ERR_INSUFFICIENT_PARAMETERS, ERR_INVALID_PARAMETER, ERR_LVALUE_REQUIRED, ERR_MATRIX_SINGULAR, ERR_NOT_SQUARE_MATRIX, ERR_OPNOTSUPPORTED, ERR_TOO_MANY_PARAMETERS, ERR_USER_ERROR, ERR_VARIABLE_NOTDEFINED, OK, OK_FUNCTION_PROCESS |
| Constructor Summary | |
|---|---|
LexicalAnalyser()
default constructor - creates the lexical analyser object with an empty string |
|
| Method Summary | |
|---|---|
void |
analyseExpression(java.lang.String expression)
Interface function used to analyse an expression |
boolean |
EOChars()
return true if no more characters are available for parsing |
Token |
getNextToken(int type)
|
java.lang.String |
getScannedLineOfCode()
return string of currently scanned line of code for error message |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LexicalAnalyser()
| Method Detail |
|---|
public void analyseExpression(java.lang.String expression)
expression - - expression to be analysedpublic Token getNextToken(int type)
public java.lang.String getScannedLineOfCode()
public boolean EOChars()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||