[antlr-interest] Error Message Question

Mike Arace mikearace at hotmail.com
Sun Nov 4 19:27:08 PST 2007


Hi guys,

I'm building my first application around Antlr and have a question about the error messages generated by the tool at runtime.

The application is a Java console app, and I am trying to get it so that Antlr only outputs customized messages when lexing or parsing fails entirely.  I found the getErrorMessage() function that can be overridden in the lexer, but that only seems to address part of the error message after the location of the exception, and also only seems to address RecognitionExceptions; my Antlr installation (3.0.1) is very talkative and tells me about exceptions, recoveries, replacements, etc. right in stdout, and I would like to ignore these messages entirely.

I'm sure this is a solved problem already, but I am not finding anything on the site, the Antlr book, or in Google that addresses this in a application-wide way.  Any help would be greatly appreciated!

Best Regards,
Mike

_________________________________________________________________
Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare!
http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20071104/51bfe135/attachment.html 


More information about the antlr-interest mailing list