public class Parser extends java.lang.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, JJTVOID
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 and Description |
---|
Parser(java.io.InputStream stream) |
Parser(ParserTokenManager tm) |
Parser(java.io.Reader stream) |
Modifier and Type | Method and Description |
---|---|
void |
AdditiveExpression() |
void |
AndExpression() |
void |
AnyConstant() |
void |
ArgumentList(int reqArguments,
java.lang.String functionName) |
void |
ArrayAccess() |
void |
AssignExpression() |
Node |
continueParse()
Continue parsing without re-initilising stream.
|
void |
disable_tracing() |
void |
enable_tracing() |
void |
EqualExpression() |
void |
Expression() |
void |
Function() |
ParseException |
generateParseException() |
Token |
getNextToken() |
Token |
getToken(int index) |
java.lang.String |
Identifier() |
void |
ListExpression() |
void |
LValue() |
void |
MultiplicativeExpression() |
void |
OrExpression() |
Node |
parseStream(java.io.Reader stream,
JEP jep_in) |
void |
PowerExpression() |
java.lang.Object |
RealConstant() |
void |
ReInit(java.io.InputStream stream) |
void |
ReInit(ParserTokenManager tm) |
void |
ReInit(java.io.Reader stream) |
void |
RelationalExpression() |
void |
restart(java.io.Reader stream,
JEP jep_in)
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() |
protected org.nfunk.jep.JJTParserState jjtree
public ParserTokenManager token_source
public Token token
public Token jj_nt
public boolean lookingAhead
public Parser(java.io.InputStream stream)
public Parser(java.io.Reader stream)
public Parser(ParserTokenManager tm)
public Node parseStream(java.io.Reader stream, JEP jep_in) throws ParseException
ParseException
public void restart(java.io.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) {}
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.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()
http://www.singularsys.com/jep Copyright © 2007 Singular Systems