Class JCRSQLParser
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.query.sql.JCRSQLParser
-
- All Implemented Interfaces:
JCRSQLParserConstants
,JCRSQLParserTreeConstants
public class JCRSQLParser extends Object implements JCRSQLParserTreeConstants, JCRSQLParserConstants
-
-
Field Summary
Fields Modifier and Type Field Description Token
jj_nt
protected org.apache.jackrabbit.spi.commons.query.sql.JJTJCRSQLParserState
jjtree
Token
token
JCRSQLParserTokenManager
token_source
-
Fields inherited from interface org.apache.jackrabbit.spi.commons.query.sql.JCRSQLParserConstants
AMPERSAND, AND, APPROXIMATE_NUMERIC_LITERAL, ASC, ASTERISK, BASE_CHAR, BETWEEN, BY, CHAR_REPRESENTATION, CHAR_STRING_LITERAL, COLON, COMMA, COMMENT, COMMENT_CHAR, COMMENT_INTRO, CONCAT_OPERATOR, CONTAINS, DATE_LITERAL, DATE_STRING, DATE_VALUE, DATETIME_LITERAL, DATETIME_VALUE, DAYS_VALUE, DEFAULT, DELIMITED_IDENTIFIER, DELIMITED_IDENTIFIER_BODY, DELIMITED_IDENTIFIER_PART, DESC, DIGIT, DOUBLE_PERIOD, DOUBLE_QUOTE, DOUBLE_QUOTE_SYMBOL, EOF, EQ_OPERATOR, ESCAPE, EXACT_NUMERIC_LITERAL, EXCERPT, EXPONENT, FROM, GE_OPERATOR, GT_OPERATOR, HOURS_VALUE, IDENTIFIER_BODY, IDENTIFIER_PART, IDENTIFIER_START, IDEOGRAPHIC, IN, IS, LE_OPERATOR, LEFT_BRACKET, LEFT_PAREN, LETTER, LIKE, LOWER, LT_OPERATOR, MANTISSA, MINUS_SIGN, MINUTES_VALUE, MONTHS_VALUE, NE_OPERATOR, NON_DOUBLE_QUOTE_CHAR, NON_QUOTE_CHAR, NOT, NULL, OR, ORDER, PERCENT, PERIOD, PLUS_SIGN, QUESTION_MARK, QUOTE, QUOTE_SYMBOL, REGULAR_IDENTIFIER, RIGHT_BRACKET, RIGHT_PAREN, SECONDS_FRACTION, SECONDS_INTEGER_VALUE, SECONDS_VALUE, SELECT, SEMICOLON, SIGN, SIGNED_INTEGER, SIMILAR, SIMPLE_LATIN_LETTER, SIMPLE_LATIN_LOWER_CASE_LETTER, SIMPLE_LATIN_UPPER_CASE_LETTER, SOLIDUS, SPELLCHECK, TIME_VALUE, TIME_ZONE_INTERVAL, TIMESTAMP_LITERAL, TIMESTAMP_STRING, tokenImage, UNDERSCORE, UNSIGNED_INTEGER, UPPER, VERTICAL_BAR, WHERE, YEARS_VALUE
-
Fields inherited from interface org.apache.jackrabbit.spi.commons.query.sql.JCRSQLParserTreeConstants
JJTANDEXPRESSION, JJTASCENDINGORDERSPEC, JJTBRACKETEXPRESSION, JJTCONTAINSEXPRESSION, JJTDESCENDINGORDERSPEC, JJTEXCERPTFUNCTION, JJTFROMCLAUSE, JJTIDENTIFIER, JJTLITERAL, JJTLOWERFUNCTION, jjtNodeName, JJTNOTEXPRESSION, JJTORDERBYCLAUSE, JJTORDERSPEC, JJTOREXPRESSION, JJTPREDICATE, JJTQUERY, JJTSELECTLIST, JJTUPPERFUNCTION, JJTVOID, JJTWHERECLAUSE
-
-
Constructor Summary
Constructors Constructor Description JCRSQLParser(InputStream stream)
JCRSQLParser(InputStream stream, String encoding)
JCRSQLParser(Reader stream)
JCRSQLParser(JCRSQLParserTokenManager tm)
-
Method Summary
-
-
-
Field Detail
-
jjtree
protected org.apache.jackrabbit.spi.commons.query.sql.JJTJCRSQLParserState jjtree
-
token_source
public JCRSQLParserTokenManager token_source
-
token
public Token token
-
jj_nt
public Token jj_nt
-
-
Constructor Detail
-
JCRSQLParser
public JCRSQLParser(InputStream stream)
-
JCRSQLParser
public JCRSQLParser(InputStream stream, String encoding)
-
JCRSQLParser
public JCRSQLParser(Reader stream)
-
JCRSQLParser
public JCRSQLParser(JCRSQLParserTokenManager tm)
-
-
Method Detail
-
main
public static void main(String[] args) throws ParseException
- Throws:
ParseException
-
parse
public static ASTQuery parse(String statement, NameResolver resolver) throws ParseException
- Throws:
ParseException
-
Query
public final ASTQuery Query() throws ParseException
- Throws:
ParseException
-
SelectList
public final void SelectList() throws ParseException
- Throws:
ParseException
-
SelectItem
public final void SelectItem() throws ParseException
- Throws:
ParseException
-
TableExpression
public final void TableExpression() throws ParseException
- Throws:
ParseException
-
FromClause
public final void FromClause() throws ParseException
- Throws:
ParseException
-
WhereClause
public final void WhereClause() throws ParseException
- Throws:
ParseException
-
Predicate
public final void Predicate() throws ParseException
- Throws:
ParseException
-
PropertyFunction
public final Name PropertyFunction() throws ParseException
- Throws:
ParseException
-
LowerFunction
public final Name LowerFunction() throws ParseException
- Throws:
ParseException
-
UpperFunction
public final Name UpperFunction() throws ParseException
- Throws:
ParseException
-
ComparisonOperation
public final int ComparisonOperation() throws ParseException
- Throws:
ParseException
-
SearchCondition
public final void SearchCondition() throws ParseException
- Throws:
ParseException
-
OrExpression
public final void OrExpression() throws ParseException
- Throws:
ParseException
-
AndExpression
public final void AndExpression() throws ParseException
- Throws:
ParseException
-
UnaryExpression
public final void UnaryExpression() throws ParseException
- Throws:
ParseException
-
PrimaryExpression
public final void PrimaryExpression() throws ParseException
- Throws:
ParseException
-
BracketExpression
public final void BracketExpression() throws ParseException
- Throws:
ParseException
-
ContainsExpression
public final void ContainsExpression() throws ParseException
- Throws:
ParseException
-
Literal
public final void Literal() throws ParseException
- Throws:
ParseException
-
CharStringLiteral
public final String CharStringLiteral() throws ParseException
- Throws:
ParseException
-
Identifier
public final Name Identifier() throws ParseException
- Throws:
ParseException
-
ExcerptFunction
public final Name ExcerptFunction() throws ParseException
- Throws:
ParseException
-
OrderByClause
public final void OrderByClause() throws ParseException
- Throws:
ParseException
-
OrderSpec
public final void OrderSpec() throws ParseException
- Throws:
ParseException
-
AscendingOrderSpec
public final void AscendingOrderSpec() throws ParseException
- Throws:
ParseException
-
DescendingOrderSpec
public final void DescendingOrderSpec() throws ParseException
- Throws:
ParseException
-
ReInit
public void ReInit(InputStream stream)
-
ReInit
public void ReInit(InputStream stream, String encoding)
-
ReInit
public void ReInit(Reader stream)
-
ReInit
public void ReInit(JCRSQLParserTokenManager tm)
-
getNextToken
public final Token getNextToken()
-
getToken
public final Token getToken(int index)
-
generateParseException
public ParseException generateParseException()
-
enable_tracing
public final void enable_tracing()
-
disable_tracing
public final void disable_tracing()
-
-