类 HqlParser

  • 所有已实现的接口:
    HqlTokenTypes

    public final class HqlParser
    extends HqlBaseParser
    Implements the semantic action methods defined in the HQL base parser to keep the grammar source file a little cleaner. Extends the parser class generated by ANTLR.
    作者:
    Joshua Davis (pgmjsd@sourceforge.net)
    • 方法详细资料

      • getInstance

        public static HqlParser getInstance​(String hql)
        Get a HqlParser instance for the given HQL string.
        参数:
        hql - The HQL query string
        返回:
        The parser.
      • traceIn

        public void traceIn​(String ruleName)
        覆盖:
        traceIn 在类中 antlr.LLkParser
      • traceOut

        public void traceOut​(String ruleName)
        覆盖:
        traceOut 在类中 antlr.LLkParser
      • reportError

        public void reportError​(antlr.RecognitionException e)
        覆盖:
        reportError 在类中 antlr.Parser
      • reportError

        public void reportError​(String s)
        覆盖:
        reportError 在类中 antlr.Parser
      • reportWarning

        public void reportWarning​(String s)
        覆盖:
        reportWarning 在类中 antlr.Parser
      • handleIdentifierError

        public antlr.collections.AST handleIdentifierError​(antlr.Token token,
                                                           antlr.RecognitionException ex)
                                                    throws antlr.RecognitionException,
                                                           antlr.TokenStreamException
        Overrides the base behavior to retry keywords as identifiers.
        覆盖:
        handleIdentifierError 在类中 HqlBaseParser
        参数:
        token - The token.
        ex - The recognition exception.
        返回:
        The new AST.
        抛出:
        antlr.RecognitionException - if the substitution was not possible.
        antlr.TokenStreamException - if the substitution was not possible.
      • negateNode

        public antlr.collections.AST negateNode​(antlr.collections.AST x)
        Returns an equivalent tree for (NOT (a relop b) ), for example:
         (NOT (GT a b) ) => (LE a b)
         
        覆盖:
        negateNode 在类中 HqlBaseParser
        参数:
        x - The sub tree to transform, the parent is assumed to be NOT.
        返回:
        The equivalent sub-tree.
      • processEqualityExpression

        public antlr.collections.AST processEqualityExpression​(antlr.collections.AST x)
        Post process equality expressions, clean up the subtree.
        覆盖:
        processEqualityExpression 在类中 HqlBaseParser
        参数:
        x - The equality expression.
        返回:
        The clean sub-tree.
      • showAst

        public void showAst​(antlr.collections.AST ast,
                            PrintStream out)
      • matchOptionalFrom

        public void matchOptionalFrom()
                               throws antlr.RecognitionException,
                                      antlr.TokenStreamException
        从类复制的说明: HqlBaseParser
        Manages the case of an optional FROM allowing the path to start with the "from" keyword
        覆盖:
        matchOptionalFrom 在类中 HqlBaseParser
        抛出:
        antlr.RecognitionException
        antlr.TokenStreamException
      • firstPathTokenWeakKeywords

        public void firstPathTokenWeakKeywords()
                                        throws antlr.TokenStreamException
        覆盖:
        firstPathTokenWeakKeywords 在类中 HqlBaseParser
        抛出:
        antlr.TokenStreamException
      • weakKeywords

        public void weakKeywords()
                          throws antlr.TokenStreamException
        覆盖:
        weakKeywords 在类中 HqlBaseParser
        抛出:
        antlr.TokenStreamException
      • expectNamedParameterName

        public void expectNamedParameterName()
                                      throws antlr.TokenStreamException
        从类复制的说明: HqlBaseParser
        Called after we have recognized ':'. The expectation is to handle converting any non-IDENT token where possibleID == true into an IDENT
        覆盖:
        expectNamedParameterName 在类中 HqlBaseParser
        抛出:
        antlr.TokenStreamException
      • handleDotIdent

        public void handleDotIdent()
                            throws antlr.TokenStreamException
        从类复制的说明: HqlBaseParser
        This method looks ahead and converts . into . IDENT when appropriate.
        覆盖:
        handleDotIdent 在类中 HqlBaseParser
        抛出:
        antlr.TokenStreamException
      • processMemberOf

        public void processMemberOf​(antlr.Token n,
                                    antlr.collections.AST p,
                                    antlr.ASTPair currentAST)
        覆盖:
        processMemberOf 在类中 HqlBaseParser
      • registerTreat

        protected void registerTreat​(antlr.collections.AST pathToTreat,
                                     antlr.collections.AST treatAs)
        覆盖:
        registerTreat 在类中 HqlBaseParser
      • panic

        public static void panic()