String treeDump = dump(tree);
assertEquals("Parsed SQL doesn't match", curlyDump, treeDump.toLowerCase());
}
protected CommonTree parse(String sql) throws SqlJetException, RecognitionException {
CharStream chars = new ANTLRStringStream(sql);
SqlLexer lexer = new SqlLexer(chars);
CommonTokenStream tokens = new CommonTokenStream(lexer);
SqlParser parser = new SqlParser(tokens);
return (CommonTree) parser.sql_stmt().getTree();
}