Do you mean that you don't want ANTLR errors to be mixed with jython's lexer/parser errors in the same container inside of RecordingErrorHandler or you just want error messages _text style_ to be the same?

My main objective is to record ANTLR errors as well as errors coming from jython's lexer/parser, otherwise parsing syntactically incorrect source code ends up with AST and no error messages available for analysis (see example), that's not good.

And I'll add a test to Indexer and update the issue with a new patch.

2012/3/24 Frank Wierzbicki <report@bugs.jython.org>

Frank Wierzbicki <fwierzbicki@users.sourceforge.net> added the comment:

+    @Override
+    public void reportError(RecognitionException e) {
+      // Update syntax error count and output error.
+      super.reportError(e);
+      errorHandler.reportError(this, e);
-}
+    }
+}

smokxx: we won't be able to do it like you have as we will end up with ANTLR style error messages on top of/mixed in with Python style error messages - is there any way you can change your patch to extend some kind of errorHandler?

_______________________________________
Jython tracker <report@bugs.jython.org>
<http://bugs.jython.org/issue1866>
_______________________________________



--
Have fun,
   Roman Shuvaev.
  
   cell: +79119529883.