|
ElegantJ Data Tables Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.elegantj.data.parser.Parser
The Parser class parses the buffer string.
This is the recursive decent parser for mathematical expressions and functions.
It will also parses the database related expressions and functions.
It uses the scanner class to recognize tokens and
creates a tree of the parsed expression/functions out of nodes.
Results a value from the parsed tree
| Field Summary | |
static int |
stError
A constant used for representing the scanning error status |
static int |
stOk
A constant used for representing the scanning ok status |
static int |
stQuit
A constant used for representing the scanning quit status |
static int |
tAnd
A constant used for representing the logical and operation |
static int |
tAssign
A constant used for representing the assigning operation |
static int |
tCharacter
A constant used for representing the character |
static int |
tCom
A constant used for representing the arguments in the symbolic operation |
static int |
tDivide
A constant used for representing the dividing operation |
static int |
tDouble
A constant used for representing the double |
static int |
tEnd
A constant used for representing the scanning end status |
static int |
tEqual
A constant used for representing the equal to operator in the comparing operation |
static int |
tError
A constant used for representing the scanning error status |
static int |
tGreater
A constant used for representing the greater then operator in the comparing operation |
static int |
tGreaterEqual
A constant used for representing the greater then or equals to operator in the comparing operation |
static int |
tIdent
A constant used for representing the symbolic operation |
static int |
tInteger
A constant used for representing the integer |
static int |
tLess
A constant used for representing the less then operator in the comparing operation |
static int |
tLessEqual
A constant used for representing the less then or equal to operator in the comparing operation |
static int |
tLParen
A constant used for representing the left parenthesis |
static int |
tMinus
A constant used for representing the substracting operation |
static int |
tMult
A constant used for representing the multiplying operation |
static int |
tNotEqual
A constant used for representing the not equal to operator in the comparing operation |
static int |
tOr
A constant used for representing the logical or operation |
static int |
tPlus
A constant used for representing the adding operation |
static int |
tPow
A constant used for representing the powering operation |
static int |
tRParen
A constant used for representing the right parenthesis |
static int |
tStart
A constant used for representing the scanning start status |
static int |
tString
A constant used for representing the string |
| Constructor Summary | |
Parser(Scanner scanner_in,
SymbolTable symTab_in,
FunctionTable funTab_in)
Creates a Parser with specified scanned, symbol table and function table. |
|
| Method Summary | |
java.lang.String |
getOutputString()
Returns the output string representing scanned buffer |
java.lang.Object |
getResult()
Returns the result from the tree of the parsed expressions and functions out of nodes |
java.lang.String |
getStatus()
Returns the current scanning status |
void |
parse()
Starts the parsing and sets tree equal to the top of the created tree |
void |
reset()
Resets the buffer to be parsed |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int stOk
public static final int stQuit
public static final int stError
public static final int tStart
public static final int tEnd
public static final int tError
public static final int tPlus
public static final int tMult
public static final int tDivide
public static final int tMinus
public static final int tLParen
public static final int tRParen
public static final int tAssign
public static final int tPow
public static final int tIdent
public static final int tCom
public static final int tAnd
public static final int tOr
public static final int tLess
public static final int tGreater
public static final int tLessEqual
public static final int tGreaterEqual
public static final int tNotEqual
public static final int tEqual
public static final int tInteger
public static final int tDouble
public static final int tCharacter
public static final int tString
| Constructor Detail |
public Parser(Scanner scanner_in,
SymbolTable symTab_in,
FunctionTable funTab_in)
scanner_in - the scanner used for parsing the buffer, default ScannersymTab_in - the symbol table containing the set of symbol's names, default emptyfunTab_in - the function table containing the set of function's definations, default empty| Method Detail |
public void reset()
public java.lang.String getOutputString()
public java.lang.String getStatus()
public java.lang.Object getResult()
throws ParserException
ParserException
public void parse()
throws ParserException
ParserException
|
ElegantJ Data Tables Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||