Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hibernate.hql.ast
Class HqlParser  view HqlParser download HqlParser.java

java.lang.Object
  extended byHqlBaseParser
      extended byorg.hibernate.hql.ast.HqlParser

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.


Field Summary
private static org.apache.commons.logging.Log log
          A logger for this class.
private  ParseErrorHandler parseErrorHandler
           
private  org.hibernate.hql.ast.util.ASTPrinter printer
           
 
Constructor Summary
private HqlParser(antlr.TokenStream lexer)
           
 
Method Summary
private  antlr.collections.AST createIsNullParent(antlr.collections.AST node, boolean negated)
           
private  antlr.collections.AST createSubquery(antlr.collections.AST node)
           
private static org.hibernate.hql.ast.util.ASTPrinter getASTPrinter()
           
static HqlParser getInstance(java.lang.String hql)
           
 ParseErrorHandler getParseErrorHandler()
           
 void handleDotIdent()
           
 antlr.collections.AST handleIdentifierError(antlr.Token token, antlr.RecognitionException ex)
          Overrides the base behavior to retry keywords as identifiers.
private  void initialize()
           
 antlr.collections.AST negateNode(antlr.collections.AST x)
          Returns an equivalent tree for (NOT (a relop b) ), for example:
static void panic()
           
 antlr.collections.AST processEqualityExpression(antlr.collections.AST x)
          Post process equality expressions, clean up the subtree.
private  antlr.collections.AST processIsEmpty(antlr.collections.AST node, boolean negated)
           
 void processMemberOf(antlr.Token n, antlr.collections.AST p, antlr.ASTPair currentAST)
           
 void reportError(antlr.RecognitionException e)
           
 void reportError(java.lang.String s)
           
 void reportWarning(java.lang.String s)
           
 void showAst(antlr.collections.AST ast, java.io.PrintStream out)
           
private  void showAst(antlr.collections.AST ast, java.io.PrintWriter pw)
           
 void weakKeywords()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log
A logger for this class.


parseErrorHandler

private ParseErrorHandler parseErrorHandler

printer

private org.hibernate.hql.ast.util.ASTPrinter printer
Constructor Detail

HqlParser

private HqlParser(antlr.TokenStream lexer)
Method Detail

getASTPrinter

private static org.hibernate.hql.ast.util.ASTPrinter getASTPrinter()

getInstance

public static HqlParser getInstance(java.lang.String hql)

reportError

public void reportError(antlr.RecognitionException e)

reportError

public void reportError(java.lang.String s)

reportWarning

public void reportWarning(java.lang.String s)

getParseErrorHandler

public ParseErrorHandler getParseErrorHandler()

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.


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)
 


processEqualityExpression

public antlr.collections.AST processEqualityExpression(antlr.collections.AST x)
Post process equality expressions, clean up the subtree.


createIsNullParent

private antlr.collections.AST createIsNullParent(antlr.collections.AST node,
                                                 boolean negated)

processIsEmpty

private antlr.collections.AST processIsEmpty(antlr.collections.AST node,
                                             boolean negated)

createSubquery

private antlr.collections.AST createSubquery(antlr.collections.AST node)

showAst

public void showAst(antlr.collections.AST ast,
                    java.io.PrintStream out)

showAst

private void showAst(antlr.collections.AST ast,
                     java.io.PrintWriter pw)

initialize

private void initialize()

weakKeywords

public void weakKeywords()
                  throws antlr.TokenStreamException

handleDotIdent

public void handleDotIdent()
                    throws antlr.TokenStreamException

processMemberOf

public void processMemberOf(antlr.Token n,
                            antlr.collections.AST p,
                            antlr.ASTPair currentAST)

panic

public static void panic()