Skip to content

Commit d9de961

Browse files
committed
Try to achieve a better parser error message
1 parent 1064b30 commit d9de961

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

key.core/src/main/java/de/uka/ilkd/key/nparser/ParsingFacade.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
import org.antlr.v4.runtime.*;
2323
import org.antlr.v4.runtime.atn.PredictionMode;
24-
import org.antlr.v4.runtime.misc.ParseCancellationException;
2524
import org.antlr.v4.runtime.tree.TerminalNode;
2625
import org.jspecify.annotations.NonNull;
2726
import org.jspecify.annotations.Nullable;
@@ -133,15 +132,7 @@ public static KeyAst.File parseFile(CharStream stream) {
133132
// we don't want error messages or recovery during first try
134133
p.removeErrorListeners();
135134
p.setErrorHandler(new BailErrorStrategy());
136-
KeYParser.FileContext ctx;
137-
try {
138-
ctx = p.file();
139-
} catch (ParseCancellationException ex) {
140-
LOGGER.warn("SLL was not enough");
141-
p = createParser(stream);
142-
ctx = p.file();
143-
}
144-
135+
KeYParser.FileContext ctx = p.file();
145136
p.getErrorReporter().throwException();
146137
return new KeyAst.File(ctx);
147138
}

0 commit comments

Comments
 (0)