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

tom at psy.unsw.edu.au tom at psy.unsw.edu.au
Tue Nov 13 15:57:56 PST 2001


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.

Tom.
--- In antlr-interest at y..., christian.ernst at p... wrote:
> Hy Folks !
<SNIP>
> 
> So i suggest following changes:
<SNIP>
> 
> Class: ASTFactory
> ToDo: change Methods for error Output from Tool.warning to 
> System.err.println()
> Methods:
> create()
> setAstNodeTyp(..)
> 
<SNIP> 
> mfg 
> christian


 

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



More information about the antlr-interest mailing list