[antlr-interest] Re: ANTLR Runtime/SDK jar mixtures and suggestions

Christian Ernst christian.ernst at poet.de
Wed Nov 14 04:19:36 PST 2001


Hy !

tom at psy.unsw.edu.au wrote:

> Ideally not, this method allows programmatic collection of errors
> (plus it's a good idea in general because it saves you having to
> replace every call to System.err when you realize you might want to
> support half decent error logging (such as JDK1.4 logging based)).
> The addin for JBuilder (I think it is) uses it and the upcoming
> module for Netbeans will also use it. Redirecting error stream isn't
> really appropriate either, cause then you can't seperate proper Antlr
> errors from user prints to System.err. It can't really be moved into
> the generated files either, has to remain in a seperate class so it
> can be overridden. Could have a seperate ErrorHandler class or
> something, no problems there. Or, you could have methods in the
> generated grammar that called the ErrorHandler by default but could
> be overridden in the grammar.

Yes i agree a central Logging facility would be better for the ANTLR Tool and

for IDE Intergration like JBuilder etc.
But for a small Runtime and under the Aspect that there is only one runtime
class (ASTFactory)
which use this Logging only for a warning it would be nice to get rid of this
dependicy
Perhaps it might be even better to change this to throwing a
new RuntimeException like ASTGenerationException !?

mfg
Christian






 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list