The syntax for assignments and expressions in the input string is:
statement: assignment | addExp
assignment: ident "=" addExp
addExp: term | term addOp addExp
term: unaryExpr | unaryExpr mulOp term
unaryExpr: factor | minus factor
factor: ident | number | "(" addExp ")"
Public Member Functions | ||||
String | parse (String exp, String topTag, String prefix, String nameSpace, String schemaLoc) throws ExpParseException | |||
Private Member Functions | ||||
Element | createElement (String xmlTag) | |||
Create an DOM Element object. | ||||
String | documentToString (Document doc) | |||
Node | factor () throws ExpParseException | |||
factor: ident | number | "(" expression ")"
| ||||
Node | unaryExpr () throws ExpParseException | |||
unaryExpr: factor | minus factor | ||||
Node | term () throws ExpParseException | |||
term: unaryExpr | unaryExpr addOp term
| ||||
Node | addExp () throws ExpParseException | |||
addExp: term | term addOp addExp
| ||||
Node | statement () throws ExpParseException | |||
statement: assign | expression assign: ident "=" expression;
| ||||
Private Attributes | ||||
Document | mDoc = null | |||
Scanner | mScan = null | |||
String | mNameSpace = null | |||
String | mPrefix = null |
|
addExp: term | term addOp addExp
|
|
Create an DOM Element object. If mNameSpace is set then create the Element with a name space, otherwise, create an unqualified Element.
|
|
|
|
factor: ident | number | "(" expression ")"
|
|
|
|
statement: assign | expression assign: ident "=" expression;
|
|
term: unaryExpr | unaryExpr addOp term
|
|
unaryExpr: factor | minus factor
|
|
|
|
|
|
|
|
|