Class JDOQLCodeGeneration
- java.lang.Object
-
- antlr.TreeParser
-
- com.sun.jdo.spi.persistence.support.ejb.ejbqlc.JDOQLCodeGeneration
-
- All Implemented Interfaces:
JDOQLCodeGenerationTokenTypes
public class JDOQLCodeGeneration extends antlr.TreeParser implements JDOQLCodeGenerationTokenTypes
This class defines the semantic analysis of the EJBQL compiler. Input of this pass is the AST as produced by the parser, that consists of EJBQLAST nodes. The result is a typed EJBQLAST tree.- Author:
- Michael Bouschen, Shing Wai Chan
-
-
Field Summary
Fields Modifier and Type Field Description static String[]_tokenNamesstatic antlr.collections.impl.BitSet_tokenSet_0static antlr.collections.impl.BitSet_tokenSet_1protected static ResourceBundlemsgsI18N support.protected ParameterSupportparamSupportParameter helper.protected TypeSupporttypeSupportType helper.-
Fields inherited from class antlr.TreeParser
_retTree, astFactory, ASTNULL, inputState, returnAST, tokenNames, traceDepth
-
Fields inherited from interface com.sun.jdo.spi.persistence.support.ejb.ejbqlc.JDOQLCodeGenerationTokenTypes
ABS, ABSTRACT_SCHEMA_NAME, AND, AS, ASC, AVG, BETWEEN, BY, CMP_FIELD, CMP_FIELD_ACCESS, COLLECTION_CMR_FIELD, COLLECTION_CMR_FIELD_ACCESS, COMMA, CONCAT, COUNT, DESC, DISTINCT, DIV, DOT, DOUBLE_LITERAL, EMPTY, EOF, EQUAL, ESC, ESCAPE, EXPONENT, FALSE, FLOAT_LITERAL, FLOAT_SUFFIX, FLOATINGPOINT_SUFFIX, FROM, GE, GT, HEX_DIGIT, IDENT, IDENTIFICATION_VAR, IDENTIFICATION_VAR_DECL, IN, INPUT_PARAMETER, INT_LITERAL, IS, LE, LENGTH, LIKE, LOCATE, LONG_LITERAL, LPAREN, LT, MAX, MEMBER, MIN, MINUS, MOD, NEWLINE, NOT, NOT_BETWEEN, NOT_EMPTY, NOT_EQUAL, NOT_IN, NOT_LIKE, NOT_MEMBER, NOT_NULL, NULL, NULL_TREE_LOOKAHEAD, OBJECT, OF, OR, ORDER, PLUS, QUERY, RANGE, RPAREN, SELECT, SINGLE_CMR_FIELD, SINGLE_CMR_FIELD_ACCESS, SQRT, STAR, STRING_LITERAL, SUBSTRING, SUM, TRUE, UNARY_MINUS, UNARY_PLUS, UNICODE_DIGIT, UNICODE_ESCAPE, UNICODE_STR, UNKNOWN, WHERE, WS
-
-
Constructor Summary
Constructors Constructor Description JDOQLCodeGeneration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabs(antlr.collections.AST _t, StringBuffer buf)voidaggregateDistinct(antlr.collections.AST _t, StringBuffer buf)voidbetweenExpr(antlr.collections.AST _t, StringBuffer buf)voidbinaryArithmeticExpr(antlr.collections.AST _t, StringBuffer buf)voidcollectionMemberDecl(antlr.collections.AST _t)voidcollectionMemberExpr(antlr.collections.AST _t, StringBuffer buf)voidconcat(antlr.collections.AST _t, StringBuffer buf)voidconditionalExpr(antlr.collections.AST _t, StringBuffer buf)voiddistinct(antlr.collections.AST _t, StringBuffer buf)voidemptyCollectionComparisonExpr(antlr.collections.AST _t, StringBuffer buf)voidescape(antlr.collections.AST _t, StringBuffer buf)voidexpression(antlr.collections.AST _t, StringBuffer buf)EJBQLASTextractIdentificationVariable(antlr.collections.AST _t)voidfield(antlr.collections.AST _t)voidfromClause(antlr.collections.AST _t)voidfunction(antlr.collections.AST _t, StringBuffer buf)JDOQLElementsgetJDOQLElements()Returns the result of an EJBQL compile process.voididentificationVarDecl(antlr.collections.AST _t)voidinExpr(antlr.collections.AST _t, StringBuffer buf)voidinit(TypeSupport typeSupport, ParameterSupport paramSupport)voidlength(antlr.collections.AST _t, StringBuffer buf)voidlikeExpr(antlr.collections.AST _t, StringBuffer buf)voidliteral(antlr.collections.AST _t, StringBuffer buf)voidlocate(antlr.collections.AST _t, StringBuffer buf)voidlocateStartPos(antlr.collections.AST _t, StringBuffer buf)voidmod(antlr.collections.AST _t, StringBuffer buf)voidnullComparisonExpr(antlr.collections.AST _t, StringBuffer buf)voidorderbyClause(antlr.collections.AST _t)voidparameter(antlr.collections.AST _t, StringBuffer buf)voidpathExpr(antlr.collections.AST _t, StringBuffer buf)voidprimary(antlr.collections.AST _t, StringBuffer buf)voidprojection(antlr.collections.AST _t, StringBuffer buf)voidquery(antlr.collections.AST _t)voidrangeVarDecl(antlr.collections.AST _t)voidrelationalExpr(antlr.collections.AST _t, StringBuffer buf)voidreportError(antlr.RecognitionException ex)voidreportError(String s)voidselectClause(antlr.collections.AST _t)voidsingleCharStringLiteral(antlr.collections.AST _t, StringBuffer buf)voidsqrt(antlr.collections.AST _t, StringBuffer buf)voidstringLiteral(antlr.collections.AST _t, StringBuffer buf)voidsubstring(antlr.collections.AST _t, StringBuffer buf)voidunaryExpr(antlr.collections.AST _t, StringBuffer buf)voidwhereClause(antlr.collections.AST _t)
-
-
-
Field Detail
-
typeSupport
protected TypeSupport typeSupport
Type helper.
-
paramSupport
protected ParameterSupport paramSupport
Parameter helper.
-
msgs
protected static final ResourceBundle msgs
I18N support.
-
_tokenNames
public static final String[] _tokenNames
-
_tokenSet_0
public static final antlr.collections.impl.BitSet _tokenSet_0
-
_tokenSet_1
public static final antlr.collections.impl.BitSet _tokenSet_1
-
-
Method Detail
-
init
public void init(TypeSupport typeSupport, ParameterSupport paramSupport)
-
reportError
public void reportError(antlr.RecognitionException ex)
- Overrides:
reportErrorin classantlr.TreeParser
-
reportError
public void reportError(String s)
- Overrides:
reportErrorin classantlr.TreeParser
-
getJDOQLElements
public JDOQLElements getJDOQLElements()
Returns the result of an EJBQL compile process. A JDOQLElements instances represents all the necessary information to create a JDOQL query instance that corresponds to the EJBQL query.- Returns:
- JDOQLElements instance representing the JDOQL query.
-
query
public final void query(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
fromClause
public final void fromClause(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
selectClause
public final void selectClause(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
whereClause
public final void whereClause(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
orderbyClause
public final void orderbyClause(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
extractIdentificationVariable
public final EJBQLAST extractIdentificationVariable(antlr.collections.AST _t) throws antlr.RecognitionException
- Throws:
antlr.RecognitionException
-
identificationVarDecl
public final void identificationVarDecl(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
collectionMemberDecl
public final void collectionMemberDecl(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
rangeVarDecl
public final void rangeVarDecl(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
pathExpr
public final void pathExpr(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
distinct
public final void distinct(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
projection
public final void projection(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
aggregateDistinct
public final void aggregateDistinct(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
expression
public final void expression(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
conditionalExpr
public final void conditionalExpr(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
relationalExpr
public final void relationalExpr(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
binaryArithmeticExpr
public final void binaryArithmeticExpr(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
unaryExpr
public final void unaryExpr(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
betweenExpr
public final void betweenExpr(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
likeExpr
public final void likeExpr(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
inExpr
public final void inExpr(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
nullComparisonExpr
public final void nullComparisonExpr(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
emptyCollectionComparisonExpr
public final void emptyCollectionComparisonExpr(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
collectionMemberExpr
public final void collectionMemberExpr(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
function
public final void function(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
primary
public final void primary(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
stringLiteral
public final void stringLiteral(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
parameter
public final void parameter(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
escape
public final void escape(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
singleCharStringLiteral
public final void singleCharStringLiteral(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
concat
public final void concat(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
substring
public final void substring(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
length
public final void length(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
locate
public final void locate(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
abs
public final void abs(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
sqrt
public final void sqrt(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
mod
public final void mod(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
locateStartPos
public final void locateStartPos(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
literal
public final void literal(antlr.collections.AST _t, StringBuffer buf) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
field
public final void field(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
-