public class Parser extends Object implements ParserTreeConstants, ParserConstants
| Modifier and Type | Field and Description |
|---|---|
Token |
jj_nt |
protected org.nfunk.jep.JJTParserState |
jjtree |
boolean |
lookingAhead |
Token |
token |
ParserTokenManager |
token_source |
JJTCONSTANT, JJTFUNNODE, jjtNodeName, JJTSTART, JJTVARNODE, JJTVOIDAND, 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 and Description |
|---|
Parser(InputStream stream) |
Parser(ParserTokenManager tm) |
Parser(Reader stream) |
protected org.nfunk.jep.JJTParserState jjtree
public ParserTokenManager token_source
public Token token
public Token jj_nt
public boolean lookingAhead
public Parser(InputStream stream)
public Parser(Reader stream)
public Parser(ParserTokenManager tm)
public Node parseStream(Reader stream, JEP jep_in) throws ParseException
ParseExceptionpublic void restart(Reader stream, JEP jep_in)
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) {}
ParseExceptionpublic 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
ParseExceptionpublic final void Expression()
throws ParseException
ParseExceptionpublic final void AssignExpression()
throws ParseException
ParseExceptionpublic final void RightExpression()
throws ParseException
ParseExceptionpublic final void OrExpression()
throws ParseException
ParseExceptionpublic final void AndExpression()
throws ParseException
ParseExceptionpublic final void EqualExpression()
throws ParseException
ParseExceptionpublic final void RelationalExpression()
throws ParseException
ParseExceptionpublic final void AdditiveExpression()
throws ParseException
ParseExceptionpublic final void MultiplicativeExpression()
throws ParseException
ParseExceptionpublic final void UnaryExpression()
throws ParseException
ParseExceptionpublic final void PowerExpression()
throws ParseException
ParseExceptionpublic final void UnaryExpressionNotPlusMinus()
throws ParseException
ParseExceptionpublic final void ListExpression()
throws ParseException
ParseExceptionpublic final void LValue()
throws ParseException
ParseExceptionpublic final void ArrayAccess()
throws ParseException
ParseExceptionpublic final void Variable()
throws ParseException
ParseExceptionpublic final void Function()
throws ParseException
ParseExceptionpublic final void ArgumentList(int reqArguments,
String functionName)
throws ParseException
ParseExceptionpublic final String Identifier() throws ParseException
ParseExceptionpublic final void AnyConstant()
throws ParseException
ParseExceptionpublic final Object RealConstant() throws ParseException
ParseExceptionpublic void ReInit(InputStream stream)
public void ReInit(Reader stream)
public void ReInit(ParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
Copyright © 2018. All rights reserved.