From 0e5bcc2416818a17e5e46f34b9df2a207cc3fd2b Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Fri, 17 May 2013 23:56:56 -0500 Subject: [PATCH] Report file names with lexer errors --- tool/test/org/antlr/v4/test/TestPerformance.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tool/test/org/antlr/v4/test/TestPerformance.java b/tool/test/org/antlr/v4/test/TestPerformance.java index d30c6ebb1..f7e7227bf 100644 --- a/tool/test/org/antlr/v4/test/TestPerformance.java +++ b/tool/test/org/antlr/v4/test/TestPerformance.java @@ -1094,6 +1094,9 @@ public class TestPerformance extends BaseTest { sharedLexers[thread] = lexer; } + lexer.removeErrorListeners(); + lexer.addErrorListener(DescriptiveErrorListener.INSTANCE); + if (lexer.getInterpreter().decisionToDFA[0] == null) { ATN atn = lexer.getATN(); for (int i = 0; i < lexer.getInterpreter().decisionToDFA.length; i++) {