|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object antlr.Parser antlr.LLkParser org.hibernate.hql.internal.antlr.HqlBaseParser
public class HqlBaseParser
Hibernate Query Language Grammar
This grammar parses the query language for Hibernate (an Open Source, Object-Relational
mapping library). A partial BNF grammar description is available for reference here:
http://www.hibernate.org/Documentation/HQLBNF
Text from the original reference BNF is prefixed with '//##'.
Field Summary | |
---|---|
static String[] |
_tokenNames
|
static antlr.collections.impl.BitSet |
_tokenSet_0
|
static antlr.collections.impl.BitSet |
_tokenSet_1
|
static antlr.collections.impl.BitSet |
_tokenSet_10
|
static antlr.collections.impl.BitSet |
_tokenSet_11
|
static antlr.collections.impl.BitSet |
_tokenSet_12
|
static antlr.collections.impl.BitSet |
_tokenSet_13
|
static antlr.collections.impl.BitSet |
_tokenSet_14
|
static antlr.collections.impl.BitSet |
_tokenSet_15
|
static antlr.collections.impl.BitSet |
_tokenSet_16
|
static antlr.collections.impl.BitSet |
_tokenSet_17
|
static antlr.collections.impl.BitSet |
_tokenSet_18
|
static antlr.collections.impl.BitSet |
_tokenSet_19
|
static antlr.collections.impl.BitSet |
_tokenSet_2
|
static antlr.collections.impl.BitSet |
_tokenSet_20
|
static antlr.collections.impl.BitSet |
_tokenSet_21
|
static antlr.collections.impl.BitSet |
_tokenSet_22
|
static antlr.collections.impl.BitSet |
_tokenSet_23
|
static antlr.collections.impl.BitSet |
_tokenSet_24
|
static antlr.collections.impl.BitSet |
_tokenSet_25
|
static antlr.collections.impl.BitSet |
_tokenSet_26
|
static antlr.collections.impl.BitSet |
_tokenSet_27
|
static antlr.collections.impl.BitSet |
_tokenSet_28
|
static antlr.collections.impl.BitSet |
_tokenSet_29
|
static antlr.collections.impl.BitSet |
_tokenSet_3
|
static antlr.collections.impl.BitSet |
_tokenSet_30
|
static antlr.collections.impl.BitSet |
_tokenSet_31
|
static antlr.collections.impl.BitSet |
_tokenSet_32
|
static antlr.collections.impl.BitSet |
_tokenSet_33
|
static antlr.collections.impl.BitSet |
_tokenSet_34
|
static antlr.collections.impl.BitSet |
_tokenSet_35
|
static antlr.collections.impl.BitSet |
_tokenSet_4
|
static antlr.collections.impl.BitSet |
_tokenSet_5
|
static antlr.collections.impl.BitSet |
_tokenSet_6
|
static antlr.collections.impl.BitSet |
_tokenSet_7
|
static antlr.collections.impl.BitSet |
_tokenSet_8
|
static antlr.collections.impl.BitSet |
_tokenSet_9
|
Fields inherited from class antlr.Parser |
---|
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth |
Constructor Summary | |
---|---|
|
HqlBaseParser(antlr.ParserSharedInputState state)
|
|
HqlBaseParser(antlr.TokenBuffer tokenBuf)
|
protected |
HqlBaseParser(antlr.TokenBuffer tokenBuf,
int k)
|
|
HqlBaseParser(antlr.TokenStream lexer)
|
protected |
HqlBaseParser(antlr.TokenStream lexer,
int k)
|
Method Summary | |
---|---|
void |
additiveExpression()
|
void |
aggregate()
|
void |
alias()
|
void |
aliasedExpression()
|
void |
altWhenClause()
|
void |
asAlias()
|
void |
ascendingOrDescending()
|
void |
assignment()
|
void |
atom()
|
void |
betweenList()
|
protected void |
buildTokenTypeASTClassMap()
|
void |
caseExpression()
|
void |
collectionExpr()
|
void |
compoundExpr()
|
void |
concatenation()
|
void |
constant()
|
void |
deleteStatement()
|
void |
elseClause()
|
void |
equalityExpression()
|
void |
expression()
|
void |
expressionOrVector()
|
void |
exprList()
|
void |
fromClassOrOuterQueryPath()
|
void |
fromClause()
|
void |
fromJoin()
|
void |
fromRange()
|
void |
groupByClause()
|
void |
handleDotIdent()
This method looks ahead and converts . |
antlr.collections.AST |
handleIdentifierError(antlr.Token token,
antlr.RecognitionException ex)
This method is overriden in the sub class in order to provide the 'keyword as identifier' hack. |
void |
havingClause()
|
void |
identifier()
|
void |
identPrimary()
|
void |
inClassDeclaration()
|
void |
inCollectionDeclaration()
|
void |
inCollectionElementsDeclaration()
|
void |
inList()
|
void |
insertablePropertySpec()
|
void |
insertStatement()
|
void |
intoClause()
|
boolean |
isFilter()
Returns true if this is a filter query, false if not. |
void |
likeEscape()
|
void |
logicalAndExpression()
|
void |
logicalExpression()
|
void |
logicalOrExpression()
|
void |
multiplyExpression()
|
void |
negatedExpression()
|
antlr.collections.AST |
negateNode(antlr.collections.AST x)
Returns the negated equivalent of the expression. |
void |
newExpression()
|
void |
newValue()
|
void |
optionalFromTokenFromClause()
|
void |
orderByClause()
|
void |
orderElement()
|
void |
parameter()
|
void |
path()
|
void |
primaryExpression()
|
antlr.collections.AST |
processEqualityExpression(antlr.collections.AST x)
Returns the 'cleaned up' version of a comparison operator sub-tree. |
void |
processMemberOf(antlr.Token n,
antlr.collections.AST p,
antlr.ASTPair currentAST)
|
void |
propertyFetch()
|
void |
quantifiedExpression()
|
void |
queryRule()
|
void |
relationalExpression()
|
void |
selectClause()
|
void |
selectedPropertiesList()
|
void |
selectFrom()
|
void |
selectObject()
|
void |
selectStatement()
|
void |
setClause()
|
void |
setFilter(boolean f)
Sets the filter flag. |
void |
stateField()
|
void |
statement()
|
void |
subQuery()
|
void |
unaryExpression()
|
void |
union()
|
void |
updateStatement()
|
void |
vectorExpr()
|
void |
weakKeywords()
|
void |
whenClause()
|
void |
whereClause()
|
void |
withClause()
|
Methods inherited from class antlr.LLkParser |
---|
consume, LA, LT, traceIn, traceOut |
Methods inherited from class antlr.Parser |
---|
addMessageListener, addParserListener, addParserMatchListener, addParserTokenListener, addSemanticPredicateListener, addSyntacticPredicateListener, addTraceListener, consumeUntil, consumeUntil, defaultDebuggingSetup, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, getTokenTypeToASTClassMap, isDebugMode, mark, match, match, matchNot, panic, recover, removeMessageListener, removeParserListener, removeParserMatchListener, removeParserTokenListener, removeSemanticPredicateListener, removeSyntacticPredicateListener, removeTraceListener, reportError, reportError, reportWarning, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setDebugMode, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] _tokenNames
public static final antlr.collections.impl.BitSet _tokenSet_0
public static final antlr.collections.impl.BitSet _tokenSet_1
public static final antlr.collections.impl.BitSet _tokenSet_2
public static final antlr.collections.impl.BitSet _tokenSet_3
public static final antlr.collections.impl.BitSet _tokenSet_4
public static final antlr.collections.impl.BitSet _tokenSet_5
public static final antlr.collections.impl.BitSet _tokenSet_6
public static final antlr.collections.impl.BitSet _tokenSet_7
public static final antlr.collections.impl.BitSet _tokenSet_8
public static final antlr.collections.impl.BitSet _tokenSet_9
public static final antlr.collections.impl.BitSet _tokenSet_10
public static final antlr.collections.impl.BitSet _tokenSet_11
public static final antlr.collections.impl.BitSet _tokenSet_12
public static final antlr.collections.impl.BitSet _tokenSet_13
public static final antlr.collections.impl.BitSet _tokenSet_14
public static final antlr.collections.impl.BitSet _tokenSet_15
public static final antlr.collections.impl.BitSet _tokenSet_16
public static final antlr.collections.impl.BitSet _tokenSet_17
public static final antlr.collections.impl.BitSet _tokenSet_18
public static final antlr.collections.impl.BitSet _tokenSet_19
public static final antlr.collections.impl.BitSet _tokenSet_20
public static final antlr.collections.impl.BitSet _tokenSet_21
public static final antlr.collections.impl.BitSet _tokenSet_22
public static final antlr.collections.impl.BitSet _tokenSet_23
public static final antlr.collections.impl.BitSet _tokenSet_24
public static final antlr.collections.impl.BitSet _tokenSet_25
public static final antlr.collections.impl.BitSet _tokenSet_26
public static final antlr.collections.impl.BitSet _tokenSet_27
public static final antlr.collections.impl.BitSet _tokenSet_28
public static final antlr.collections.impl.BitSet _tokenSet_29
public static final antlr.collections.impl.BitSet _tokenSet_30
public static final antlr.collections.impl.BitSet _tokenSet_31
public static final antlr.collections.impl.BitSet _tokenSet_32
public static final antlr.collections.impl.BitSet _tokenSet_33
public static final antlr.collections.impl.BitSet _tokenSet_34
public static final antlr.collections.impl.BitSet _tokenSet_35
Constructor Detail |
---|
protected HqlBaseParser(antlr.TokenBuffer tokenBuf, int k)
public HqlBaseParser(antlr.TokenBuffer tokenBuf)
protected HqlBaseParser(antlr.TokenStream lexer, int k)
public HqlBaseParser(antlr.TokenStream lexer)
public HqlBaseParser(antlr.ParserSharedInputState state)
Method Detail |
---|
public void setFilter(boolean f)
f
- True for a filter query, false for a normal query.public boolean isFilter()
public antlr.collections.AST handleIdentifierError(antlr.Token token, antlr.RecognitionException ex) throws antlr.RecognitionException, antlr.TokenStreamException
token
- The token to retry as an identifier.ex
- The exception to throw if it cannot be retried as an identifier.
antlr.RecognitionException
antlr.TokenStreamException
public void handleDotIdent() throws antlr.TokenStreamException
antlr.TokenStreamException
public antlr.collections.AST negateNode(antlr.collections.AST x)
x
- The expression to negate.public antlr.collections.AST processEqualityExpression(antlr.collections.AST x) throws antlr.RecognitionException
x
- The comparison operator to clean up.
antlr.RecognitionException
public void weakKeywords() throws antlr.TokenStreamException
antlr.TokenStreamException
public void processMemberOf(antlr.Token n, antlr.collections.AST p, antlr.ASTPair currentAST)
public final void statement() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void updateStatement() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void deleteStatement() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void selectStatement() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void insertStatement() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void optionalFromTokenFromClause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void setClause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void whereClause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void assignment() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void stateField() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void newValue() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void path() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void concatenation() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void asAlias() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void queryRule() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void intoClause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void insertablePropertySpec() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void primaryExpression() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void union() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void selectFrom() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void groupByClause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void orderByClause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void selectClause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void fromClause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void selectedPropertiesList() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void newExpression() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void selectObject() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void identifier() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void fromRange() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void fromJoin() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void propertyFetch() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void withClause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void logicalExpression() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void fromClassOrOuterQueryPath() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void inClassDeclaration() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void inCollectionDeclaration() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void inCollectionElementsDeclaration() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void alias() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void expression() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void havingClause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void orderElement() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void ascendingOrDescending() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void aliasedExpression() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void logicalOrExpression() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void logicalAndExpression() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void negatedExpression() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void equalityExpression() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void relationalExpression() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void additiveExpression() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void inList() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void betweenList() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void likeEscape() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void compoundExpr() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void multiplyExpression() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void unaryExpression() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void caseExpression() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void quantifiedExpression() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void atom() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void whenClause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void elseClause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void altWhenClause() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void collectionExpr() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void subQuery() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void exprList() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void identPrimary() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void constant() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void parameter() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void expressionOrVector() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void vectorExpr() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
public final void aggregate() throws antlr.RecognitionException, antlr.TokenStreamException
antlr.RecognitionException
antlr.TokenStreamException
protected void buildTokenTypeASTClassMap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |