Class Semantic
- java.lang.Object
-
- antlr.TreeParser
-
- com.sun.jdo.spi.persistence.support.ejb.ejbqlc.Semantic
-
- All Implemented Interfaces:
SemanticTokenTypes
public class Semantic extends antlr.TreeParser implements SemanticTokenTypes
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 StringDISABLE_ORDERBY_VALIDATION_PROPERTYName of the property to disable order by validation.protected StringejbNameThe ejb-name.protected booleanfinderNotSelectorFlag indicating finder or selector.protected booleanisAggregateFlag indicating have aggregate function or not.protected MethodmethodThe Method instance of the finder/selector method.protected static ResourceBundlemsgsI18N support.protected ParameterSupportparamSupportParameter info helper.protected intresultTypeMappingresult-type-mapping element from the DD.protected SymbolTablesymtabSymbol table handling names of variables and parameters.protected TypeSupporttypeSupportType info access 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.SemanticTokenTypes
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 Semantic()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabs(antlr.collections.AST _t)voidbetweenExpr(antlr.collections.AST _t)voidbinaryArithmeticExpr(antlr.collections.AST _t)voidcmpPathExpression(antlr.collections.AST _t)voidcollectionMemberDecl(antlr.collections.AST _t)voidcollectionMemberExpr(antlr.collections.AST _t)voidcollectionValuedPathExpression(antlr.collections.AST _t)voidconcat(antlr.collections.AST _t)voidconditionalExpr(antlr.collections.AST _t)voidcountExpr(antlr.collections.AST _t)voiddistinct(antlr.collections.AST _t)voidemptyCollectionComparisonExpr(antlr.collections.AST _t)voidescape(antlr.collections.AST _t)voidescapeCharacter(antlr.collections.AST _t)voidexpression(antlr.collections.AST _t)voidfromClause(antlr.collections.AST _t)voidfunction(antlr.collections.AST _t)voididentificationVarDecl(antlr.collections.AST _t)voididentificationVariable(antlr.collections.AST _t)voidinCollection(antlr.collections.AST _t, Object valueExprTypeInfo)voidinCollectionElement(antlr.collections.AST _t, Object valueExprTypeInfo)voidinExpr(antlr.collections.AST _t)voidinit(TypeSupport typeSupport, ParameterSupport paramSupport, Method method, int resultTypeMapping, boolean finderNotSelector, String ejbName)Initializes the semantic analysis.voidinputParameter(antlr.collections.AST _t)voidlength(antlr.collections.AST _t)voidlikeExpr(antlr.collections.AST _t)voidliteral(antlr.collections.AST _t)voidlocate(antlr.collections.AST _t)voidmember(antlr.collections.AST _t)voidmod(antlr.collections.AST _t)voidnullComparisonExpr(antlr.collections.AST _t)voidobjectDenoter(antlr.collections.AST _t)voidorderbyClause(antlr.collections.AST _t)voidorderbyItem(antlr.collections.AST _t)voidpathExpression(antlr.collections.AST _t)voidpattern(antlr.collections.AST _t)voidprimary(antlr.collections.AST _t)voidprojection(antlr.collections.AST _t)voidquery(antlr.collections.AST _t)voidrangeVarDecl(antlr.collections.AST _t)voidrelationalExpr(antlr.collections.AST _t)voidreportError(antlr.RecognitionException ex)voidreportError(String s)voidselectClause(antlr.collections.AST _t)voidsingleValuedCmrPathExpression(antlr.collections.AST _t)voidsingleValuedPathExpression(antlr.collections.AST _t)voidsqrt(antlr.collections.AST _t)voidsubstring(antlr.collections.AST _t)voidunaryExpr(antlr.collections.AST _t)voidwhereClause(antlr.collections.AST _t)
-
-
-
Field Detail
-
DISABLE_ORDERBY_VALIDATION_PROPERTY
public static final String DISABLE_ORDERBY_VALIDATION_PROPERTY
Name of the property to disable order by validation.- See Also:
- Constant Field Values
-
symtab
protected SymbolTable symtab
Symbol table handling names of variables and parameters.
-
typeSupport
protected TypeSupport typeSupport
Type info access helper.
-
paramSupport
protected ParameterSupport paramSupport
Parameter info helper.
-
method
protected Method method
The Method instance of the finder/selector method.
-
resultTypeMapping
protected int resultTypeMapping
result-type-mapping element from the DD.
-
finderNotSelector
protected boolean finderNotSelector
Flag indicating finder or selector.
-
isAggregate
protected boolean isAggregate
Flag indicating have aggregate function or not.
-
ejbName
protected String ejbName
The ejb-name.
-
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
-
-
Method Detail
-
init
public void init(TypeSupport typeSupport, ParameterSupport paramSupport, Method method, int resultTypeMapping, boolean finderNotSelector, String ejbName)
Initializes the semantic analysis.- Parameters:
typeSupport- type info access helper.paramSupport- parameter info helper.method- method instance of the finder/selector method.resultTypeMapping- result-type-mapping element from the DDfinderNotSelector-truefor finder;falsefor selectorejbName- the ejb name of the finder/selector method.
-
reportError
public void reportError(antlr.RecognitionException ex)
- Overrides:
reportErrorin classantlr.TreeParser
-
reportError
public void reportError(String s)
- Overrides:
reportErrorin classantlr.TreeParser
-
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
-
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
-
collectionValuedPathExpression
public final void collectionValuedPathExpression(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
distinct
public final void distinct(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
projection
public final void projection(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
singleValuedPathExpression
public final void singleValuedPathExpression(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
cmpPathExpression
public final void cmpPathExpression(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
countExpr
public final void countExpr(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
expression
public final void expression(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
orderbyItem
public final void orderbyItem(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
conditionalExpr
public final void conditionalExpr(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
relationalExpr
public final void relationalExpr(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
binaryArithmeticExpr
public final void binaryArithmeticExpr(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
unaryExpr
public final void unaryExpr(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
betweenExpr
public final void betweenExpr(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
likeExpr
public final void likeExpr(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
inExpr
public final void inExpr(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
nullComparisonExpr
public final void nullComparisonExpr(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
emptyCollectionComparisonExpr
public final void emptyCollectionComparisonExpr(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
collectionMemberExpr
public final void collectionMemberExpr(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
function
public final void function(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
primary
public final void primary(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
pattern
public final void pattern(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
escape
public final void escape(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
inputParameter
public final void inputParameter(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
escapeCharacter
public final void escapeCharacter(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
inCollection
public final void inCollection(antlr.collections.AST _t, Object valueExprTypeInfo) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
member
public final void member(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
identificationVariable
public final void identificationVariable(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
singleValuedCmrPathExpression
public final void singleValuedCmrPathExpression(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
concat
public final void concat(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
substring
public final void substring(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
length
public final void length(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
locate
public final void locate(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
abs
public final void abs(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
sqrt
public final void sqrt(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
mod
public final void mod(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
literal
public final void literal(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
pathExpression
public final void pathExpression(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
objectDenoter
public final void objectDenoter(antlr.collections.AST _t) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
inCollectionElement
public final void inCollectionElement(antlr.collections.AST _t, Object valueExprTypeInfo) throws antlr.RecognitionException- Throws:
antlr.RecognitionException
-
-