类 GeneratedOrderByFragmentParser
- java.lang.Object
-
- antlr.Parser
-
- antlr.LLkParser
-
- org.hibernate.sql.ordering.antlr.GeneratedOrderByFragmentParser
-
- 所有已实现的接口:
OrderByTemplateTokenTypes
- 直接已知子类:
OrderByFragmentParser
public class GeneratedOrderByFragmentParser extends antlr.LLkParser implements OrderByTemplateTokenTypes
Antlr grammar for dealing with order-by mapping fragments.- 作者:
- Steve Ebersole
-
-
字段概要
字段 修饰符和类型 字段 说明 static String[]_tokenNamesstatic antlr.collections.impl.BitSet_tokenSet_0static antlr.collections.impl.BitSet_tokenSet_1static antlr.collections.impl.BitSet_tokenSet_2static antlr.collections.impl.BitSet_tokenSet_3static antlr.collections.impl.BitSet_tokenSet_4static antlr.collections.impl.BitSet_tokenSet_5static antlr.collections.impl.BitSet_tokenSet_6static antlr.collections.impl.BitSet_tokenSet_7static antlr.collections.impl.BitSet_tokenSet_8static antlr.collections.impl.BitSet_tokenSet_9-
从类继承的字段 antlr.Parser
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth
-
从接口继承的字段 org.hibernate.sql.ordering.antlr.OrderByTemplateTokenTypes
ASCENDING, CLOSE_PAREN, COLLATE, COLUMN_REF, COMMA, DESCENDING, DOT, EOF, ESCqs, EXPONENT, EXPR_LIST, FIRST, FLOAT_SUFFIX, HARD_QUOTE, HEX_DIGIT, ID_LETTER, ID_START_LETTER, IDENT, IDENT_LIST, LAST, LITERAL_ascending, LITERAL_descending, NULL_ORDER, NULL_TREE_LOOKAHEAD, NULLS, NUM_DOUBLE, NUM_FLOAT, NUM_INT, NUM_LONG, OPEN_PAREN, ORDER_BY, ORDER_SPEC, QUOTED_STRING, SORT_KEY, SORT_SPEC, WS
-
-
构造器概要
构造器 限定符 构造器 说明 GeneratedOrderByFragmentParser(antlr.ParserSharedInputState state)GeneratedOrderByFragmentParser(antlr.TokenBuffer tokenBuf)protectedGeneratedOrderByFragmentParser(antlr.TokenBuffer tokenBuf, int k)GeneratedOrderByFragmentParser(antlr.TokenStream lexer)protectedGeneratedOrderByFragmentParser(antlr.TokenStream lexer, int k)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected voidbuildTokenTypeASTClassMap()voidcollationName()The collation name wrtcollationSpecification().voidcollationSpecification()Recognition rule for what ANSI SQL terms the collation specification used to allow specifying that sorting for the givensortSpecification()be treated within a specific character-set.voidexpression()Recognition rule what this grammar recognizes as valid sort key.protected StringextractText(antlr.collections.AST ast)Extract a node's text.voidfunctionCall()Recognition rule for a function callvoidfunctionCallCheck()Intended for use as a syntactic predicate to determine whether an IDENT represents a known SQL function name.voidfunctionName()A function-name is an IDENT followed by zero or more (DOT IDENT) sequencesvoidfunctionParameter()Recognized function parameters.voidfunctionParameterList()Recognition rule used to "wrap" all function parameters into an EXPR_LIST nodeprotected booleanisFunctionName(antlr.collections.AST ast)A check to see if the text of the given node represents a known function name.voidnullOrdering()Recognition rule for what SQL-2003 terms the null ordering; NULLS FIRST or NULLS LAST.voidnullPrecedence()voidorderByFragment()Main recognition rule for this grammarvoidorderingSpecification()Recognition rule for what ANSI SQL terms the ordering specification; ASCENDING or DESCENDING.protected antlr.collections.ASTpostProcessSortSpecification(antlr.collections.AST sortSpec)Allow post processing of each sort specificationprotected antlr.collections.ASTquotedIdentifier(antlr.collections.AST ident)Process the given node as a quote identifier.protected antlr.collections.ASTquotedString(antlr.collections.AST ident)Process the given node as a quote string.protected antlr.collections.ASTresolveFunction(antlr.collections.AST ast)Process the given node as a function.protected antlr.collections.ASTresolveIdent(antlr.collections.AST ident)Process the given node as an IDENT.voidsimplePropertyPath()A simple-property-path is an IDENT followed by one or more (DOT IDENT) sequencesvoidsortKey()Recognition rule for what ANSI SQL terms the sort key which is the expression (column, function, etc) upon which to base the sorting.voidsortSpecification()Recognition rule for what ANSI SQL terms the sort specification, which is essentially each thing upon which the results should be sorted.protected voidtrace(String msg)Method for logging execution trace information.-
从类继承的方法 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
-
-
-
-
字段详细资料
-
_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
-
_tokenSet_2
public static final antlr.collections.impl.BitSet _tokenSet_2
-
_tokenSet_3
public static final antlr.collections.impl.BitSet _tokenSet_3
-
_tokenSet_4
public static final antlr.collections.impl.BitSet _tokenSet_4
-
_tokenSet_5
public static final antlr.collections.impl.BitSet _tokenSet_5
-
_tokenSet_6
public static final antlr.collections.impl.BitSet _tokenSet_6
-
_tokenSet_7
public static final antlr.collections.impl.BitSet _tokenSet_7
-
_tokenSet_8
public static final antlr.collections.impl.BitSet _tokenSet_8
-
_tokenSet_9
public static final antlr.collections.impl.BitSet _tokenSet_9
-
-
构造器详细资料
-
GeneratedOrderByFragmentParser
protected GeneratedOrderByFragmentParser(antlr.TokenBuffer tokenBuf, int k)
-
GeneratedOrderByFragmentParser
public GeneratedOrderByFragmentParser(antlr.TokenBuffer tokenBuf)
-
GeneratedOrderByFragmentParser
protected GeneratedOrderByFragmentParser(antlr.TokenStream lexer, int k)
-
GeneratedOrderByFragmentParser
public GeneratedOrderByFragmentParser(antlr.TokenStream lexer)
-
GeneratedOrderByFragmentParser
public GeneratedOrderByFragmentParser(antlr.ParserSharedInputState state)
-
-
方法详细资料
-
trace
protected void trace(String msg)
Method for logging execution trace information.- 参数:
msg- The trace message.
-
extractText
protected final String extractText(antlr.collections.AST ast)
Extract a node's text.- 参数:
ast- The node- 返回:
- The text.
-
quotedIdentifier
protected antlr.collections.AST quotedIdentifier(antlr.collections.AST ident)
Process the given node as a quote identifier. These need to be quoted in the dialect-specific way.- 参数:
ident- The quoted-identifier node.- 返回:
- The processed node.
- 另请参阅:
Dialect.quote(java.lang.String)
-
quotedString
protected antlr.collections.AST quotedString(antlr.collections.AST ident)
Process the given node as a quote string.- 参数:
ident- The quoted string. This is used from within function param recognition, and represents a SQL-quoted string.- 返回:
- The processed node.
-
isFunctionName
protected boolean isFunctionName(antlr.collections.AST ast)
A check to see if the text of the given node represents a known function name.- 参数:
ast- The node whose text we want to check.- 返回:
- True if the node's text is a known function name, false otherwise.
- 另请参阅:
SQLFunctionRegistry
-
resolveFunction
protected antlr.collections.AST resolveFunction(antlr.collections.AST ast)
Process the given node as a function.- 参数:
ast- The node representing the function invocation (including parameters as subtree components).- 返回:
- The processed node.
-
resolveIdent
protected antlr.collections.AST resolveIdent(antlr.collections.AST ident)
Process the given node as an IDENT. May represent either a column reference or a property reference.- 参数:
ident- The node whose text represents either a column or property reference.- 返回:
- The processed node.
-
postProcessSortSpecification
protected antlr.collections.AST postProcessSortSpecification(antlr.collections.AST sortSpec)
Allow post processing of each sort specification- 参数:
sortSpec- The grammar-built sort specification subtree.- 返回:
- The processed sort specification subtree.
-
orderByFragment
public final void orderByFragment() throws antlr.RecognitionException, antlr.TokenStreamExceptionMain recognition rule for this grammar- 抛出:
antlr.RecognitionExceptionantlr.TokenStreamException
-
sortSpecification
public final void sortSpecification() throws antlr.RecognitionException, antlr.TokenStreamExceptionRecognition rule for what ANSI SQL terms the sort specification, which is essentially each thing upon which the results should be sorted.- 抛出:
antlr.RecognitionExceptionantlr.TokenStreamException
-
sortKey
public final void sortKey() throws antlr.RecognitionException, antlr.TokenStreamExceptionRecognition rule for what ANSI SQL terms the sort key which is the expression (column, function, etc) upon which to base the sorting.- 抛出:
antlr.RecognitionExceptionantlr.TokenStreamException
-
collationSpecification
public final void collationSpecification() throws antlr.RecognitionException, antlr.TokenStreamExceptionRecognition rule for what ANSI SQL terms the collation specification used to allow specifying that sorting for the givensortSpecification()be treated within a specific character-set.- 抛出:
antlr.RecognitionExceptionantlr.TokenStreamException
-
orderingSpecification
public final void orderingSpecification() throws antlr.RecognitionException, antlr.TokenStreamExceptionRecognition rule for what ANSI SQL terms the ordering specification; ASCENDING or DESCENDING.- 抛出:
antlr.RecognitionExceptionantlr.TokenStreamException
-
nullOrdering
public final void nullOrdering() throws antlr.RecognitionException, antlr.TokenStreamExceptionRecognition rule for what SQL-2003 terms the null ordering; NULLS FIRST or NULLS LAST.- 抛出:
antlr.RecognitionExceptionantlr.TokenStreamException
-
expression
public final void expression() throws antlr.RecognitionException, antlr.TokenStreamExceptionRecognition rule what this grammar recognizes as valid sort key.- 抛出:
antlr.RecognitionExceptionantlr.TokenStreamException
-
functionCall
public final void functionCall() throws antlr.RecognitionException, antlr.TokenStreamExceptionRecognition rule for a function call- 抛出:
antlr.RecognitionExceptionantlr.TokenStreamException
-
simplePropertyPath
public final void simplePropertyPath() throws antlr.RecognitionException, antlr.TokenStreamExceptionA simple-property-path is an IDENT followed by one or more (DOT IDENT) sequences- 抛出:
antlr.RecognitionExceptionantlr.TokenStreamException
-
functionCallCheck
public final void functionCallCheck() throws antlr.RecognitionException, antlr.TokenStreamExceptionIntended for use as a syntactic predicate to determine whether an IDENT represents a known SQL function name.- 抛出:
antlr.RecognitionExceptionantlr.TokenStreamException
-
functionName
public final void functionName() throws antlr.RecognitionException, antlr.TokenStreamExceptionA function-name is an IDENT followed by zero or more (DOT IDENT) sequences- 抛出:
antlr.RecognitionExceptionantlr.TokenStreamException
-
functionParameterList
public final void functionParameterList() throws antlr.RecognitionException, antlr.TokenStreamExceptionRecognition rule used to "wrap" all function parameters into an EXPR_LIST node- 抛出:
antlr.RecognitionExceptionantlr.TokenStreamException
-
functionParameter
public final void functionParameter() throws antlr.RecognitionException, antlr.TokenStreamExceptionRecognized function parameters.- 抛出:
antlr.RecognitionExceptionantlr.TokenStreamException
-
collationName
public final void collationName() throws antlr.RecognitionException, antlr.TokenStreamExceptionThe collation name wrtcollationSpecification(). Namely, the character-set.- 抛出:
antlr.RecognitionExceptionantlr.TokenStreamException
-
nullPrecedence
public final void nullPrecedence() throws antlr.RecognitionException, antlr.TokenStreamException- 抛出:
antlr.RecognitionExceptionantlr.TokenStreamException
-
buildTokenTypeASTClassMap
protected void buildTokenTypeASTClassMap()
-
-