call the display recognition error method in your parser with the
exception.
Ter
On Feb 26, 2009, at 8:28 AM, Indhu Bharathi wrote:
> Hi,
>
> I'm attaching a debug listener to my parser and overriding
> 'recognitionException' method as shown below.
>
> public void recognitionException (RecognitionException e) {
> System.err.println(e);
> }
>
> But I see that the error message printed is not as good as what is
> printed in stderr when the debug option is not set. Is there a way
> to attach debug listener and still get error messages in stderr? By
> default when debug listener is attached, error messages to stderr
> are turned off. Or is there a simple way to report error as good as
> how ANTLR does it in stderr instead of just printing 'e'?
>
> - Indhu
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---