|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--elan.parser.ExpressionParser
This is a recursive descent parser for parsing expressions using the standard grammar for expressions
expression ::= term
::= term + expression
::= term - expression
term ::= factor
::= factor * term
::= factor / term
factor ::= number
::= - factor
::= ( expression )
| Method Summary | |
static ExpressionParser |
getInstance()
Retuns the initialized instance of this class. |
GrammarElement |
parse(ElanParser ep)
|
protected Expression |
parseExpression()
|
protected Expression |
parseFactor()
Determines the nature of the current token on the StreamTokenizer. |
protected Expression |
parseTerm()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static ExpressionParser getInstance()
public GrammarElement parse(ElanParser ep)
parse in interface Parserprotected Expression parseExpression()
protected Expression parseTerm()
protected Expression parseFactor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||