/**
* {@inheritDoc}
*/
@Override
public void reportNoViableAlternative(@NotNull Parser recognizer, @NotNull NoViableAltException e)
{
TokenStream tokens = recognizer.getInputStream();
String input;
if (tokens instanceof TokenStream)
{
if (e.getStartToken().getType() == Token.EOF)
input = "<EOF>";
else
input = getText(tokens, e.getStartToken(), e.getOffendingToken());
}
else
{
input = "<unknown input>";
}
String msg = "no viable alternative at input " + escapeWSAndQuote(input);
recognizer.notifyErrorListeners(e.getOffendingToken(), msg, e);
}
CQLErrorStrategy.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:StreamCQL
作者:
评论列表
文章目录