[antlr-interest] Architectural Suggestion: Pluggable Error Reporting

Alexandre Porcelli porcelli at uol.com.br
Wed Apr 25 12:04:31 PDT 2007


You can just override the emitErrorMessage method and report directly
on any place that you want (log4j for example).

Regards,
Alexandre Porcelli

On 4/25/07, Marc-André Laverdière <ma_laver at ciise.concordia.ca> wrote:
> Hello,
>
> In the Java implementation, I'm seeing BaseRecognizer.emitErrorMessage,
> that prints to stderr by default. I was thinking of this, and the
> related functions, and saw that I could recommend something.
>
> Maybe the error reporting logic could be delegated to an overridable
> BaseErrorDisplayer class. The BaseRecognizer would have a set/get pair
> to deal with it. It would not have much performance overhead and would
> give us some customization for people like me who would like to report
> directly to a GUI.
>
> What do you think of this idea?
>
> Regards,
>
> --
> Marc-André LAVERDIÈRE, B. Eng., M. A. Sc. (in progress)
> Computer Security Laboratory - Laboratoire de sécurité informatique
> CIISE, Université Concordia University, Montréal, Québec, Canada
> www.ciise.concordia.ca
>
> /"\
> \ /    ASCII Ribbon Campaign
>   X      against HTML e-mail
> / \
>
> "Perseverance must finish its work so that you may be mature and
> complete, not lacking anything." -James 1:4
>


More information about the antlr-interest mailing list