org.makumba.providers.query
Class Pass1ASTPrinter
java.lang.Object
org.makumba.providers.query.Pass1ASTPrinter
public class Pass1ASTPrinter
- extends Object
Prints a pass1 AST tree back into a query.
- Author:
- Cristian Bogdan
Method Summary |
static void |
main(String[] argv)
|
static StringBuffer |
printAST(antlr.collections.AST tree)
print a AST pass1 tree back to its "original" HQL query |
static boolean |
testPrinter(antlr.collections.AST f,
String query)
Test method that prints a given AST, re-parses it and compares the initial and final AST |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Pass1ASTPrinter
public Pass1ASTPrinter()
printAST
public static StringBuffer printAST(antlr.collections.AST tree)
- print a AST pass1 tree back to its "original" HQL query
- Parameters:
tree
-
- Returns:
- the HQL query
testPrinter
public static boolean testPrinter(antlr.collections.AST f,
String query)
- Test method that prints a given AST, re-parses it and compares the initial and final AST
- Parameters:
f
- the initial ASTquery
- the query from which the initial AST came. Used only for debug purposes in case of error
- Returns:
main
public static void main(String[] argv)