/**
* Parse the {@link GraqlParser} into a Java object, where errors are reported to the given
* {@link GraqlErrorListener}.
*/
final T parse(GraqlParser parser, GraqlErrorListener errorListener) {
S tree;
try {
tree = parseTree(parser);
} catch (ParseCancellationException e) {
// If we're using the BailErrorStrategy, we will throw here
// This strategy is designed for parsing very large files and cannot provide useful error information
throw GraqlSyntaxException.parsingError("syntax error");
}
if (errorListener.hasErrors()) {
throw GraqlSyntaxException.parsingError(errorListener.toString());
}
return visit(getQueryVisitor(), tree);
}
QueryParserImpl.java 文件源码
java
阅读 31
收藏 0
点赞 0
评论 0
项目:grakn
作者:
评论列表
文章目录