try {
CharStream chars = new ANTLRStringStream(sql);
SqlLexer lexer = new SqlLexer(chars);
CommonTokenStream tokens = new CommonTokenStream(lexer);
SqlParser parser = new SqlParser(tokens);
return (CommonTree) parser.pragma_stmt().getTree();
} catch (RecognitionException re) {
throw new SqlJetException(SqlJetErrorCode.ERROR, "Invalid sql statement: " + sql);
}
}