public void sync(Parser recognizer) throws RecognitionException {
ATNState s = recognizer.getInterpreter().atn.states.get(recognizer.getState());
if (!this.inErrorRecoveryMode(recognizer)) {
TokenStream tokens = recognizer.getInputStream();
int la = tokens.LA(1);
if (!recognizer.getATN().nextTokens(s).contains(la) && la != -1) {
if (!recognizer.isExpectedToken(la)) {
switch (s.getStateType()) {
case 3:
case 4:
case 5:
case 10:
throw new RecognitionException(recognizer, tokens, recognizer.getContext());
case 9:
case 11:
//added
this.reportUnwantedToken(recognizer);
throw new RecognitionException(recognizer, tokens, recognizer.getContext());
case 6:
case 7:
case 8:
default:
}
}
}
}
}
CSSErrorStrategy.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:jStyleParser
作者:
评论列表
文章目录