if (sqlStat != null) {
sqlStat.incrementAndGetExecuteCount();
return result;
}
SQLStatementParser parser = createParser(sql);
if (!config.isCommentAllow()) {
parser.getLexer().setAllowComment(false); // deny comment
}
try {
parser.parseStatementList(result.getStatementList());
} catch (NotAllowCommentException e) {
result.getViolations().add(new SyntaxErrorViolation(e, sql));
incrementCommentDeniedCount();
return result;
} catch (ParserException e) {
if (config.isStrictSyntaxCheck()) {
result.getViolations().add(new SyntaxErrorViolation(e, sql));
}
return result;
} catch (Exception e) {
result.getViolations().add(new SyntaxErrorViolation(e, sql));
return result;
}
if (parser.getLexer().token() != Token.EOF) {
result.getViolations().add(new IllegalSQLObjectViolation(sql));
return result;
}
if (result.getStatementList().size() == 0) {