mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 16:58:56 +00:00
Fix freeze on FailedPredicateException
Signed-off-by: Jan Sebechlebsky <jan.sebechlebsky@cz.ibm.com>
This commit is contained in:
parent
4a43c1aaa9
commit
34d61d4d80
1 changed files with 3 additions and 1 deletions
|
@ -13,6 +13,7 @@ import java.util.Map;
|
|||
|
||||
import org.antlr.runtime.CharStream;
|
||||
import org.antlr.runtime.CommonToken;
|
||||
import org.antlr.runtime.FailedPredicateException;
|
||||
import org.antlr.runtime.NoViableAltException;
|
||||
import org.antlr.runtime.RecognitionException;
|
||||
import org.antlr.runtime.RecognizerSharedState;
|
||||
|
@ -69,7 +70,8 @@ public abstract class Lexer extends org.antlr.runtime.Lexer {
|
|||
}
|
||||
catch (RecognitionException re) {
|
||||
reportError(re);
|
||||
if (re instanceof NoViableAltException) {
|
||||
if (re instanceof NoViableAltException ||
|
||||
re instanceof FailedPredicateException) {
|
||||
recover(re);
|
||||
}
|
||||
// create token that holds mismatched char
|
||||
|
|
Loading…
Reference in a new issue