Class GeneratedOrderByFragmentParser

    • Field Detail

      • _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
    • Constructor Detail

      • 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)
    • Method Detail

      • trace

        protected void trace​(String msg)
        Method for logging execution trace information.
        Parameters:
        msg - The trace message.
      • extractText

        protected final String extractText​(antlr.collections.AST ast)
        Extract a node's text.
        Parameters:
        ast - The node
        Returns:
        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.
        Parameters:
        ident - The quoted-identifier node.
        Returns:
        The processed node.
        See Also:
        Dialect.quote(java.lang.String)
      • quotedString

        protected antlr.collections.AST quotedString​(antlr.collections.AST ident)
        Process the given node as a quote string.
        Parameters:
        ident - The quoted string. This is used from within function param recognition, and represents a SQL-quoted string.
        Returns:
        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.
        Parameters:
        ast - The node whose text we want to check.
        Returns:
        True if the node's text is a known function name, false otherwise.
        See Also:
        SQLFunctionRegistry
      • resolveFunction

        protected antlr.collections.AST resolveFunction​(antlr.collections.AST ast)
        Process the given node as a function.
        Parameters:
        ast - The node representing the function invocation (including parameters as subtree components).
        Returns:
        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.
        Parameters:
        ident - The node whose text represents either a column or property reference.
        Returns:
        The processed node.
      • postProcessSortSpecification

        protected antlr.collections.AST postProcessSortSpecification​(antlr.collections.AST sortSpec)
        Allow post processing of each sort specification
        Parameters:
        sortSpec - The grammar-built sort specification subtree.
        Returns:
        The processed sort specification subtree.
      • orderByFragment

        public final void orderByFragment()
                                   throws antlr.RecognitionException,
                                          antlr.TokenStreamException
        Main recognition rule for this grammar
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
      • sortSpecification

        public final void sortSpecification()
                                     throws antlr.RecognitionException,
                                            antlr.TokenStreamException
        Recognition rule for what ANSI SQL terms the sort specification, which is essentially each thing upon which the results should be sorted.
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
      • sortKey

        public final void sortKey()
                           throws antlr.RecognitionException,
                                  antlr.TokenStreamException
        Recognition rule for what ANSI SQL terms the sort key which is the expression (column, function, etc) upon which to base the sorting.
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
      • collationSpecification

        public final void collationSpecification()
                                          throws antlr.RecognitionException,
                                                 antlr.TokenStreamException
        Recognition rule for what ANSI SQL terms the collation specification used to allow specifying that sorting for the given sortSpecification() be treated within a specific character-set.
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
      • orderingSpecification

        public final void orderingSpecification()
                                         throws antlr.RecognitionException,
                                                antlr.TokenStreamException
        Recognition rule for what ANSI SQL terms the ordering specification; ASCENDING or DESCENDING.
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
      • nullOrdering

        public final void nullOrdering()
                                throws antlr.RecognitionException,
                                       antlr.TokenStreamException
        Recognition rule for what SQL-2003 terms the null ordering; NULLS FIRST or NULLS LAST.
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
      • expression

        public final void expression()
                              throws antlr.RecognitionException,
                                     antlr.TokenStreamException
        Recognition rule what this grammar recognizes as valid sort key.
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
      • functionCall

        public final void functionCall()
                                throws antlr.RecognitionException,
                                       antlr.TokenStreamException
        Recognition rule for a function call
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
      • simplePropertyPath

        public final void simplePropertyPath()
                                      throws antlr.RecognitionException,
                                             antlr.TokenStreamException
        A simple-property-path is an IDENT followed by one or more (DOT IDENT) sequences
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
      • functionCallCheck

        public final void functionCallCheck()
                                     throws antlr.RecognitionException,
                                            antlr.TokenStreamException
        Intended for use as a syntactic predicate to determine whether an IDENT represents a known SQL function name.
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
      • functionName

        public final void functionName()
                                throws antlr.RecognitionException,
                                       antlr.TokenStreamException
        A function-name is an IDENT followed by zero or more (DOT IDENT) sequences
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
      • functionParameterList

        public final void functionParameterList()
                                         throws antlr.RecognitionException,
                                                antlr.TokenStreamException
        Recognition rule used to "wrap" all function parameters into an EXPR_LIST node
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
      • functionParameter

        public final void functionParameter()
                                     throws antlr.RecognitionException,
                                            antlr.TokenStreamException
        Recognized function parameters.
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
      • collationName

        public final void collationName()
                                 throws antlr.RecognitionException,
                                        antlr.TokenStreamException
        The collation name wrt collationSpecification(). Namely, the character-set.
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
      • nullPrecedence

        public final void nullPrecedence()
                                  throws antlr.RecognitionException,
                                         antlr.TokenStreamException
        Throws:
        antlr.RecognitionException
        antlr.TokenStreamException
      • buildTokenTypeASTClassMap

        protected void buildTokenTypeASTClassMap()