if (lexer.getErrorListener().hasErrors()) {
logger.warn(local.message("ERR_Lexing_SQ",preparedSql));
return result;
}
PlaceholderNode.resetId();
MySQL51Parser parser = new MySQL51Parser(tokens);
parser.setTreeAdaptor(mySQLTreeAdaptor);
parser.setErrorListener(new QueuingErrorListener(parser));
try {
CommonTree stmtTree = (CommonTree) parser.statement().getTree();
result = stmtTree;
} catch (RecognitionException e) {
logger.warn(local.message("ERR_Parsing_SQL", preparedSql));
}
if (parser.getErrorListener().hasErrors()) {
logger.warn(local.message("ERR_Parsing_SQL", preparedSql));
}
return result;
}