public class JccParser extends java.lang.Object implements JccParserTreeConstants, JccParserConstants
Modifier and Type | Field and Description |
---|---|
Token |
jj_nt
Next token.
|
protected JJTJccParserState |
jjtree |
Token |
token
Current token.
|
JccParserTokenManager |
token_source
Generated Token Manager.
|
JJTCONSTANT, JJTFUNNODE, jjtNodeName, JJTOPNODE, 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 |
---|
JccParser(CharStream stream)
Constructor with user supplied CharStream.
|
JccParser(JccParserTokenManager tm)
Constructor with generated Token Manager.
|
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-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(CharStream stream,
Jep jep,
java.util.ArrayList<java.lang.String> errorList) |
void |
PowerExpression() |
java.lang.Object |
RealConstant() |
void |
ReInit(CharStream stream)
Reinitialise.
|
void |
ReInit(JccParserTokenManager tm)
Reinitialise.
|
void |
RelationalExpression() |
void |
restart(CharStream 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() |
protected JJTJccParserState jjtree
public JccParserTokenManager token_source
public Token token
public Token jj_nt
public JccParser(CharStream stream)
public JccParser(JccParserTokenManager tm)
public Node parseStream(CharStream stream, Jep jep, java.util.ArrayList<java.lang.String> errorList) throws ParseException
ParseException
public void restart(CharStream 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(CharStream 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()
Copyright © 2018 Singular Systems http://www.singularsys.com/jep