Class ExpressionParser<T,R>
- java.lang.Object
-
- org.apache.qpid.server.query.engine.parsing.ExpressionParser<T,R>
-
- All Implemented Interfaces:
ExpressionParserConstants
public class ExpressionParser<T,R> extends Object implements ExpressionParserConstants
Simplified SQL parser generated by JavaCC Do not edit this .java file directly - it is autogenerated from ExpressionParser.jj
-
-
Field Summary
Fields Modifier and Type Field Description Tokenjj_ntNext token.TokentokenCurrent token.ExpressionParserTokenManagertoken_sourceGenerated Token Manager.-
Fields inherited from interface org.apache.qpid.server.query.engine.parsing.ExpressionParserConstants
ABS, ALL, AND, AS, ASC, ASTERIX, AVG, BETWEEN, BLOCK_COMMENT, CASE, COALESCE, COMMA, CONCAT, COUNT, CURRENT_TIMESTAMP, DATE, DATEADD, DATEDIFF, DAY, DECIMAL_LITERAL, DEFAULT, DESC, DISTINCT, ELSE, END, EOF, ESCAPE, EXCEPT, EXPONENT, EXTRACT, FALSE, FLOATING_POINT_LITERAL, FROM, FUNCTIONNAME, GROUP_BY, HAVING, HEX_LITERAL, HOUR, ID, IN, INTERSECT, IS, JOIN, LBRACKET, LEN, LENGTH, LIKE, LIMIT, LINE_COMMENT, LOWER, LTRIM, MAX, MILLISECOND, MIN, MINUS, MINUTE, MONTH, NOT, NOT_EQUAL, NULL, OCTAL_LITERAL, OFFSET, ON, OR, ORDER_BY, POINT, POSITION, QUOTED_ID, RBRACKET, REPLACE, ROUND, RTRIM, SECOND, SELECT, STRING_LITERAL, SUBSTR, SUBSTRING, SUM, THEN, tokenImage, TRIM, TRUE, TRUNC, UNION, UPPER, WEEK, WHEN, WHERE, WITH, YEAR
-
-
Constructor Summary
Constructors Constructor Description ExpressionParser()ExpressionParser(InputStream stream, Charset encoding)Constructor with InputStream and supplied encodingExpressionParser(Reader stream)Constructor with InputStream.ExpressionParser(ExpressionParserTokenManager tm)Constructor with generated Token Manager.
-
Method Summary
-
-
-
Field Detail
-
token_source
public ExpressionParserTokenManager token_source
Generated Token Manager.
-
token
public Token token
Current token.
-
jj_nt
public Token jj_nt
Next token.
-
-
Constructor Detail
-
ExpressionParser
public ExpressionParser()
-
ExpressionParser
public ExpressionParser(InputStream stream, Charset encoding)
Constructor with InputStream and supplied encoding- Parameters:
stream- input streamencoding- charset to be used. May not benull.
-
ExpressionParser
public ExpressionParser(Reader stream)
Constructor with InputStream.- Parameters:
stream- char stream
-
ExpressionParser
public ExpressionParser(ExpressionParserTokenManager tm)
Constructor with generated Token Manager.- Parameters:
tm- Token manager to use
-
-
Method Detail
-
parseQuery
public QueryExpression<T,R> parseQuery(String sql) throws ParseException
- Throws:
ParseException
-
parseExpression
public Expression<T,R> parseExpression(String sql) throws ParseException
- Throws:
ParseException
-
query
public final QueryExpression<T,R> query() throws ParseException
- Throws:
ParseException
-
withItem
public final WithItem withItem() throws ParseException
- Throws:
ParseException
-
orderItem
public final OrderItem<T,R> orderItem() throws ParseException
- Throws:
ParseException
-
select
public final SelectExpression<T,R> select() throws ParseException
- Throws:
ParseException
-
projectItems
public final void projectItems(SelectExpression select) throws ParseException
- Throws:
ParseException
-
projectItem
public final void projectItem(SelectExpression<T,R> select) throws ParseException
- Throws:
ParseException
-
groupItem
public final ExpressionNode<T,R> groupItem(SelectExpression select) throws ParseException
- Throws:
ParseException
-
predicate
public final ExpressionNode<T,R> predicate() throws ParseException
- Throws:
ParseException
-
orExpression
public final ExpressionNode<T,R> orExpression() throws ParseException
- Throws:
ParseException
-
andExpression
public final ExpressionNode<T,R> andExpression() throws ParseException
- Throws:
ParseException
-
equalityExpression
public final ExpressionNode<T,R> equalityExpression() throws ParseException
- Throws:
ParseException
-
comparisonExpression
public final ExpressionNode<T,R> comparisonExpression() throws ParseException
- Throws:
ParseException
-
addExpression
public final ExpressionNode<T,R> addExpression() throws ParseException
- Throws:
ParseException
-
multExpr
public final ExpressionNode<T,R> multExpr() throws ParseException
- Throws:
ParseException
-
unaryExpr
public final ExpressionNode<T,R> unaryExpr() throws ParseException
- Throws:
ParseException
-
primaryExpr
public final ExpressionNode<T,R> primaryExpr() throws ParseException
- Throws:
ParseException
-
caseExpression
public final ExpressionNode<T,R> caseExpression() throws ParseException
- Throws:
ParseException
-
literal
public final ExpressionNode<T,R> literal() throws ParseException
- Throws:
ParseException
-
stringLiteral
public final String stringLiteral() throws ParseException
- Throws:
ParseException
-
chainedVariable
public final ExpressionNode<T,R> chainedVariable() throws ParseException
- Throws:
ParseException
-
variable
public final ExpressionNode<T,R> variable() throws ParseException
- Throws:
ParseException
-
functionExpression
public final ExpressionNode<T,R> functionExpression() throws ParseException
- Throws:
ParseException
-
functionDateAdd
public final ExpressionNode<T,R> functionDateAdd() throws ParseException
- Throws:
ParseException
-
functionDateDiff
public final ExpressionNode<T,R> functionDateDiff() throws ParseException
- Throws:
ParseException
-
functionExtract
public final ExpressionNode<T,R> functionExtract() throws ParseException
- Throws:
ParseException
-
datePart
public final ExpressionNode<T,R> datePart() throws ParseException
- Throws:
ParseException
-
functionPosition
public final ExpressionNode<T,R> functionPosition() throws ParseException
- Throws:
ParseException
-
identifier
public final String identifier() throws ParseException
- Throws:
ParseException
-
ReInit
public void ReInit(InputStream stream, Charset encoding)
Reinitialise- Parameters:
stream- input streamencoding- charset to be used. May not benull.
-
ReInit
public void ReInit(Reader stream)
Reinitialise- Parameters:
stream- char stream
-
ReInit
public void ReInit(ExpressionParserTokenManager tm)
Reinitialise- Parameters:
tm- Token manager to use
-
getNextToken
public final Token getNextToken()
- Returns:
- the next Token.
-
getToken
public final Token getToken(int index)
- Parameters:
index- index to be retrieved- Returns:
- the specific Token.
-
generateParseException
public ParseException generateParseException()
Generate ParseException.- Returns:
- new Exception object. Never
null
-
trace_enabled
public final boolean trace_enabled()
- Returns:
- Always
false.
-
enable_tracing
public final void enable_tracing()
Enable tracing.
-
disable_tracing
public final void disable_tracing()
Disable tracing.
-
-