static MysqlParser.ScriptContext parse(CharStream cs) {
MysqlLexer lexer = new MysqlLexer(cs);
CommonTokenStream tokens = new CommonTokenStream(lexer);
tokens.setTokenSource(lexer);
MysqlParser parser = new MysqlParser(tokens);
parser.setErrorHandler(new BailErrorStrategy());
boolean success = false;
try {
MysqlParser.ScriptContext script = parser.script();
success = true;
return script;
}
finally {
if (!success && (parser.lastStatement != null)) {
_log.debug("last passed statement: {}", ((ParseTree)parser.lastStatement).getText());
}
}
}
MysqlParserFactory.java 文件源码
java
阅读 15
收藏 0
点赞 0
评论 0
项目:antsdb
作者:
评论列表
文章目录