org.apache.commons.jexl3.parser
Class Parser

java.lang.Object
  extended by org.apache.commons.jexl3.parser.StringParser
      extended by org.apache.commons.jexl3.parser.JexlParser
          extended by org.apache.commons.jexl3.parser.Parser
All Implemented Interfaces:
ParserConstants, ParserTreeConstants

public class Parser
extends JexlParser
implements ParserTreeConstants, ParserConstants


Field Summary
 boolean ALLOW_REGISTERS
           
 Token jj_nt
          Next token.
protected  JJTParserState jjtree
           
 Token token
          Current token.
 ParserTokenManager token_source
          Generated Token Manager.
 
Fields inherited from class org.apache.commons.jexl3.parser.JexlParser
frame
 
Fields inherited from interface org.apache.commons.jexl3.parser.ParserTreeConstants
JJTADDITIVENODE, JJTADDITIVEOPERATOR, JJTAMBIGUOUS, JJTANDNODE, JJTARRAYACCESS, JJTARRAYLITERAL, JJTASSIGNMENT, JJTBITWISEANDNODE, JJTBITWISECOMPLNODE, JJTBITWISEORNODE, JJTBITWISEXORNODE, JJTBLOCK, JJTCONSTRUCTORNODE, JJTDIVNODE, JJTEMPTYFUNCTION, JJTEQNODE, JJTERNODE, JJTFALSENODE, JJTFOREACHSTATEMENT, JJTFUNCTIONNODE, JJTGENODE, JJTGTNODE, JJTIDENTIFIER, JJTIFSTATEMENT, JJTJEXLSCRIPT, JJTLENODE, JJTLTNODE, JJTMAPENTRY, JJTMAPLITERAL, JJTMETHODNODE, JJTMODNODE, JJTMULNODE, JJTNENODE, jjtNodeName, JJTNOTNODE, JJTNRNODE, JJTNULLLITERAL, JJTNUMBERLITERAL, JJTORNODE, JJTREFERENCE, JJTREFERENCEEXPRESSION, JJTRETURNSTATEMENT, JJTSIZEFUNCTION, JJTSIZEMETHOD, JJTSTRINGLITERAL, JJTTERNARYNODE, JJTTRUENODE, JJTUNARYMINUSNODE, JJTVAR, JJTVOID, JJTWHILESTATEMENT
 
Fields inherited from interface org.apache.commons.jexl3.parser.ParserConstants
and, AND, assign, COLON, COMMA, DEFAULT, DIGIT, div, DOT, ELSE, ELVIS, EMPTY, EOF, eq, FALSE, FLOAT_LITERAL, FOR, FOR_EACH_IN, FOREACH, ge, gt, IDENTIFIER, IF, IN, INTEGER_LITERAL, LBRACKET, LCURLY, le, LETTER, LPAREN, lt, minus, mod, mult, ne, NEW, not, NULL, or, OR, plus, QMARK, RBRACKET, RCURLY, REGISTER, REGISTERS, req, RETURN, rne, RPAREN, SEMICOL, SIZE, STRING_LITERAL, tilda, tokenImage, TRUE, VAR, WHILE, xor
 
Constructor Summary
Parser(InputStream stream)
          Constructor with InputStream.
Parser(InputStream stream, String encoding)
          Constructor with InputStream and supplied encoding
Parser(ParserTokenManager tm)
          Constructor with generated Token Manager.
Parser(Reader stream)
          Constructor.
 
Method Summary
 void AdditiveExpression()
          Arithmetic
 void AdditiveOperator()
           
 void AndExpression()
           
 void AnyMethod()
           
 void ArrayAccess()
           
 void ArrayLiteral()
           
 void Assignment()
           
 void Block()
           
 void BooleanLiteral()
           
 void ConditionalAndExpression()
           
 void ConditionalExpression()
          Conditional & relational
 void ConditionalOrExpression()
           
 void Constructor()
           
 void DeclareVar()
           
 void disable_tracing()
          Disable tracing.
 void DotReference()
           
 void EmptyFunction()
          Functions & Methods
 void enable_tracing()
          Enable tracing.
 void EqualityExpression()
           
 void ExclusiveOrExpression()
           
 void Expression()
          Expression syntax
 void ExpressionStatement()
           
 void FloatLiteral()
           
 void ForeachStatement()
           
 void Function()
           
 ParseException generateParseException()
          Generate ParseException.
 Token getNextToken()
          Get the next Token.
 Token getToken(int index)
          Get the specific Token.
 void Identifier(boolean top)
          Identifier & Literals
 void IfStatement()
           
 void InclusiveOrExpression()
           
 void IntegerLiteral()
           
 ASTJexlScript JexlScript()
          Statements
 void Literal()
           
 void LValueVar()
           
 void MapEntry()
           
 void MapLiteral()
           
 void Method()
           
 void MultiplicativeExpression()
           
 void NullLiteral()
           
 ASTJexlScript parse(Reader reader, JexlInfo info)
           
 void PrimaryExpression()
          References
 void Reference()
           
 void ReferenceExpression()
          ReferenceExpression is a subclass of ArrayAccess
 void ReInit(InputStream stream)
          Reinitialise.
 void ReInit(InputStream stream, String encoding)
          Reinitialise.
 void ReInit(ParserTokenManager tm)
          Reinitialise.
 void ReInit(Reader stream)
          Reinitialise.
 void RelationalExpression()
           
 void ReturnStatement()
           
 void SizeFunction()
           
 void SizeMethod()
           
 void Statement()
           
 void StringIdentifier()
           
 void StringLiteral()
           
 void UnaryExpression()
           
 void Var()
           
 void WhileStatement()
           
 
Methods inherited from class org.apache.commons.jexl3.parser.JexlParser
checkVariable, declareVariable, getFrame, Identifier, setFrame
 
Methods inherited from class org.apache.commons.jexl3.parser.StringParser
buildString, escapeString, readString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jjtree

protected JJTParserState jjtree

ALLOW_REGISTERS

public boolean ALLOW_REGISTERS

token_source

public ParserTokenManager token_source
Generated Token Manager.


token

public Token token
Current token.


jj_nt

public Token jj_nt
Next token.

Constructor Detail

Parser

public Parser(InputStream stream)
Constructor with InputStream.


Parser

public Parser(InputStream stream,
              String encoding)
Constructor with InputStream and supplied encoding


Parser

public Parser(Reader stream)
Constructor.


Parser

public Parser(ParserTokenManager tm)
Constructor with generated Token Manager.

Method Detail

parse

public ASTJexlScript parse(Reader reader,
                           JexlInfo info)
                    throws ParseException
Throws:
ParseException

JexlScript

public final ASTJexlScript JexlScript()
                               throws ParseException
Statements

Throws:
ParseException

Statement

public final void Statement()
                     throws ParseException
Throws:
ParseException

Block

public final void Block()
                 throws ParseException
Throws:
ParseException

ExpressionStatement

public final void ExpressionStatement()
                               throws ParseException
Throws:
ParseException

IfStatement

public final void IfStatement()
                       throws ParseException
Throws:
ParseException

WhileStatement

public final void WhileStatement()
                          throws ParseException
Throws:
ParseException

ForeachStatement

public final void ForeachStatement()
                            throws ParseException
Throws:
ParseException

ReturnStatement

public final void ReturnStatement()
                           throws ParseException
Throws:
ParseException

Expression

public final void Expression()
                      throws ParseException
Expression syntax

Throws:
ParseException

Assignment

public final void Assignment()
                      throws ParseException
Throws:
ParseException

Var

public final void Var()
               throws ParseException
Throws:
ParseException

DeclareVar

public final void DeclareVar()
                      throws ParseException
Throws:
ParseException

LValueVar

public final void LValueVar()
                     throws ParseException
Throws:
ParseException

ConditionalExpression

public final void ConditionalExpression()
                                 throws ParseException
Conditional & relational

Throws:
ParseException

ConditionalOrExpression

public final void ConditionalOrExpression()
                                   throws ParseException
Throws:
ParseException

ConditionalAndExpression

public final void ConditionalAndExpression()
                                    throws ParseException
Throws:
ParseException

InclusiveOrExpression

public final void InclusiveOrExpression()
                                 throws ParseException
Throws:
ParseException

ExclusiveOrExpression

public final void ExclusiveOrExpression()
                                 throws ParseException
Throws:
ParseException

AndExpression

public final void AndExpression()
                         throws ParseException
Throws:
ParseException

EqualityExpression

public final void EqualityExpression()
                              throws ParseException
Throws:
ParseException

RelationalExpression

public final void RelationalExpression()
                                throws ParseException
Throws:
ParseException

AdditiveExpression

public final void AdditiveExpression()
                              throws ParseException
Arithmetic

Throws:
ParseException

AdditiveOperator

public final void AdditiveOperator()
                            throws ParseException
Throws:
ParseException

MultiplicativeExpression

public final void MultiplicativeExpression()
                                    throws ParseException
Throws:
ParseException

UnaryExpression

public final void UnaryExpression()
                           throws ParseException
Throws:
ParseException

Identifier

public final void Identifier(boolean top)
                      throws ParseException
Identifier & Literals

Overrides:
Identifier in class JexlParser
Parameters:
top - whether the identifier is beginning an l/r value
Throws:
ParseException - subclasses may throw this

StringIdentifier

public final void StringIdentifier()
                            throws ParseException
Throws:
ParseException

Literal

public final void Literal()
                   throws ParseException
Throws:
ParseException

NullLiteral

public final void NullLiteral()
                       throws ParseException
Throws:
ParseException

BooleanLiteral

public final void BooleanLiteral()
                          throws ParseException
Throws:
ParseException

IntegerLiteral

public final void IntegerLiteral()
                          throws ParseException
Throws:
ParseException

FloatLiteral

public final void FloatLiteral()
                        throws ParseException
Throws:
ParseException

StringLiteral

public final void StringLiteral()
                         throws ParseException
Throws:
ParseException

ArrayLiteral

public final void ArrayLiteral()
                        throws ParseException
Throws:
ParseException

MapLiteral

public final void MapLiteral()
                      throws ParseException
Throws:
ParseException

MapEntry

public final void MapEntry()
                    throws ParseException
Throws:
ParseException

EmptyFunction

public final void EmptyFunction()
                         throws ParseException
Functions & Methods

Throws:
ParseException

SizeFunction

public final void SizeFunction()
                        throws ParseException
Throws:
ParseException

Function

public final void Function()
                    throws ParseException
Throws:
ParseException

Method

public final void Method()
                  throws ParseException
Throws:
ParseException

AnyMethod

public final void AnyMethod()
                     throws ParseException
Throws:
ParseException

SizeMethod

public final void SizeMethod()
                      throws ParseException
Throws:
ParseException

Constructor

public final void Constructor()
                       throws ParseException
Throws:
ParseException

PrimaryExpression

public final void PrimaryExpression()
                             throws ParseException
References

Throws:
ParseException

ArrayAccess

public final void ArrayAccess()
                       throws ParseException
Throws:
ParseException

DotReference

public final void DotReference()
                        throws ParseException
Throws:
ParseException

Reference

public final void Reference()
                     throws ParseException
Throws:
ParseException

ReferenceExpression

public final void ReferenceExpression()
                               throws ParseException
ReferenceExpression is a subclass of ArrayAccess

Throws:
ParseException

ReInit

public void ReInit(InputStream stream)
Reinitialise.


ReInit

public void ReInit(InputStream stream,
                   String encoding)
Reinitialise.


ReInit

public void ReInit(Reader stream)
Reinitialise.


ReInit

public void ReInit(ParserTokenManager tm)
Reinitialise.


getNextToken

public final Token getNextToken()
Get the next Token.


getToken

public final Token getToken(int index)
Get the specific Token.

Overrides:
getToken in class JexlParser

generateParseException

public ParseException generateParseException()
Generate ParseException.


enable_tracing

public final void enable_tracing()
Enable tracing.


disable_tracing

public final void disable_tracing()
Disable tracing.



Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.