protected String createInputMismatchErrorMessage(Parser recognizer,
InputMismatchException e) {
return "Unexpected input: " + getTokenErrorDisplay(e.getOffendingToken(recognizer)) +
"; Expecting " + e.getExpectedTokens().toString(recognizer.getVocabulary());
}
java类org.antlr.v4.runtime.InputMismatchException的实例源码
DescriptiveErrorStrategy.java 文件源码
项目:groovy
阅读 22
收藏 0
点赞 0
评论 0
DescriptiveErrorStrategy.java 文件源码
项目:groovy
阅读 21
收藏 0
点赞 0
评论 0
protected void reportInputMismatch(Parser recognizer,
InputMismatchException e) {
notifyErrorListeners(recognizer, this.createInputMismatchErrorMessage(recognizer, e), e);
}
FixRulesErrorStrategy.java 文件源码
项目:infix
阅读 22
收藏 0
点赞 0
评论 0
/**
* @see DefaultErrorStrategy#reportInputMismatch
*/
@Override
protected void reportInputMismatch(Parser recognizer, InputMismatchException e) {
super.reportInputMismatch(recognizer, e);
}
SCIMFilterErrorHandler.java 文件源码
项目:syncope
阅读 19
收藏 0
点赞 0
评论 0
@Override
public Token recoverInline(final Parser recognizer) throws RecognitionException {
throw new InputMismatchException(recognizer);
}
JavadocDetailNodeParser.java 文件源码
项目:checkstyle
阅读 23
收藏 0
点赞 0
评论 0
@Override
public Token recoverInline(Parser recognizer) {
reportError(recognizer, new InputMismatchException(recognizer));
return super.recoverInline(recognizer);
}