forked from jasder/antlr
add exception to recover()
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9287]
This commit is contained in:
parent
b6d8ff9234
commit
fbbf74bc4e
|
@ -48,9 +48,11 @@ public interface ANTLRErrorStrategy {
|
|||
|
||||
/** Resynchronize the parser by consuming tokens until we find one
|
||||
* in the resynchronization set--loosely the set of tokens that can follow
|
||||
* the current rule.
|
||||
* the current rule. The exception contains info you might want to
|
||||
* use to recover better.
|
||||
*/
|
||||
void recover(BaseRecognizer recognizer);
|
||||
void recover(BaseRecognizer recognizer,
|
||||
RecognitionException e);
|
||||
|
||||
/** Make sure that the current lookahead symbol is consistent with
|
||||
* what were expecting at this point in the ATN. You can call this
|
||||
|
|
|
@ -103,7 +103,7 @@ public class DefaultANTLRErrorStrategy implements ANTLRErrorStrategy {
|
|||
* token that the match() routine could not recover from.
|
||||
*/
|
||||
@Override
|
||||
public void recover(BaseRecognizer recognizer) {
|
||||
public void recover(BaseRecognizer recognizer, RecognitionException e) {
|
||||
// System.out.println("recover in "+recognizer.getRuleInvocationStack()+
|
||||
// " index="+recognizer.getInputStream().index()+
|
||||
// ", lastErrorIndex="+
|
||||
|
|
Loading…
Reference in New Issue