|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.singularsys.jep.parser.JccParser
public class JccParser
Field Summary | |
---|---|
Token |
jj_nt
Next token. |
protected JJTJccParserState |
jjtree
|
Token |
token
Current token. |
JccParserTokenManager |
token_source
Generated Token Manager. |
Fields inherited from interface com.singularsys.jep.parser.JccParserTreeConstants |
---|
JJTCONSTANT, JJTFUNNODE, jjtNodeName, JJTOPNODE, JJTSTART, JJTVARNODE, JJTVOID |
Fields inherited from interface com.singularsys.jep.parser.JccParserConstants |
---|
AND, ASSIGN, COLON, COMMA, CROSS, DECIMAL_LITERAL, DEFAULT, DIGIT1, DIGIT2, DIV, DOT, EOF, EQ, EXPONENT, FLOATING_POINT_LITERAL, GE, GT, INDENTIFIER1, INDENTIFIER2, INTEGER_LITERAL, LE, LETTER1, LETTER2, LRND, LSQ, LT, MINUS, MOD, MUL, NE, NO_DOT_IN_IDENTIFIERS, NOT, OR, PLUS, POWER, RRND, RSQ, SEMI, STRING_LITERAL, tokenImage |
Constructor Summary | |
---|---|
JccParser(java.io.InputStream stream)
Constructor with InputStream. |
|
JccParser(java.io.InputStream stream,
java.lang.String encoding)
Constructor with InputStream and supplied encoding |
|
JccParser(JccParserTokenManager tm)
Constructor with generated Token Manager. |
|
JccParser(java.io.Reader stream)
Constructor. |
Method Summary | |
---|---|
void |
AdditiveExpression()
|
void |
AndExpression()
|
void |
AnyConstant()
|
void |
ArgumentList(int reqArguments,
java.lang.String functionName)
|
void |
ArrayAccess()
|
void |
AssignExpression()
|
Node |
continueParse()
Continue parsing without re-initializing the stream. |
void |
disable_tracing()
Disable tracing. |
void |
enable_tracing()
Enable tracing. |
void |
EqualExpression()
|
void |
Expression()
|
void |
Function()
|
ParseException |
generateParseException()
Generate ParseException. |
Token |
getNextToken()
Get the next Token. |
Token |
getToken(int index)
Get the specific Token. |
java.lang.String |
Identifier()
|
void |
ListExpression()
|
void |
LValue()
|
void |
MultiplicativeExpression()
|
void |
OrExpression()
|
Node |
parseStream(java.io.Reader stream,
Jep jep,
java.util.ArrayList<java.lang.String> errorList)
|
void |
PowerExpression()
|
java.lang.Object |
RealConstant()
|
void |
ReInit(java.io.InputStream stream)
Reinitialise. |
void |
ReInit(java.io.InputStream stream,
java.lang.String encoding)
Reinitialise. |
void |
ReInit(JccParserTokenManager tm)
Reinitialise. |
void |
ReInit(java.io.Reader stream)
Reinitialise. |
void |
RelationalExpression()
|
void |
restart(java.io.Reader stream,
Jep jep,
java.util.ArrayList<java.lang.String> errorList)
Restart the parse with the given stream. |
void |
RightExpression()
|
void |
setInitialTokenManagerState(int state)
Sets the initial state that the token manager is in. |
ASTStart |
Start()
GRAMMAR START |
void |
UnaryExpression()
|
void |
UnaryExpressionNotPlusMinus()
|
void |
Variable()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected JJTJccParserState jjtree
public JccParserTokenManager token_source
public Token token
public Token jj_nt
Constructor Detail |
---|
public JccParser(java.io.InputStream stream)
public JccParser(java.io.InputStream stream, java.lang.String encoding)
public JccParser(java.io.Reader stream)
public JccParser(JccParserTokenManager tm)
Method Detail |
---|
public Node parseStream(java.io.Reader stream, Jep jep, java.util.ArrayList<java.lang.String> errorList) throws ParseException
ParseException
public void restart(java.io.Reader stream, Jep jep, java.util.ArrayList<java.lang.String> errorList)
public Node continueParse() throws ParseException
XJep j = new XJep(); Parser parse = j.getParse(); StringReader sr = new StringReader("x=1; y=2; z=3;"); parse.restart(sr,j); Node node; try { while((node = j.continueParse())!=null) { j.println(node); } }catch(ParseException e) {}Empty expressions, such as the middle one in "x=1;;y=2" are returned as an ASTStart node, the end of file is returned as null.
ParseException
public void setInitialTokenManagerState(int state)
state
- the state to be in. Currently the only legal values are DEFAULT and NO_DOT_IN_IDENTIFIERpublic final ASTStart Start() throws ParseException
ParseException
public final void Expression() throws ParseException
ParseException
public final void AssignExpression() throws ParseException
ParseException
public final void RightExpression() throws ParseException
ParseException
public final void OrExpression() throws ParseException
ParseException
public final void AndExpression() throws ParseException
ParseException
public final void EqualExpression() throws ParseException
ParseException
public final void RelationalExpression() throws ParseException
ParseException
public final void AdditiveExpression() throws ParseException
ParseException
public final void MultiplicativeExpression() throws ParseException
ParseException
public final void UnaryExpression() throws ParseException
ParseException
public final void PowerExpression() throws ParseException
ParseException
public final void UnaryExpressionNotPlusMinus() throws ParseException
ParseException
public final void ListExpression() throws ParseException
ParseException
public final void LValue() throws ParseException
ParseException
public final void ArrayAccess() throws ParseException
ParseException
public final void Variable() throws ParseException
ParseException
public final void Function() throws ParseException
ParseException
public final void ArgumentList(int reqArguments, java.lang.String functionName) throws ParseException
ParseException
public final java.lang.String Identifier() throws ParseException
ParseException
public final void AnyConstant() throws ParseException
ParseException
public final java.lang.Object RealConstant() 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(JccParserTokenManager 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 |