[antlr-interest] @SuppressWarnings("all")

Terence Parr parrt at cs.usfca.edu
Sun Sep 17 17:35:55 PDT 2006


hi. You can just tweak the templates in org.antlr.codegen.templates/ 
Java/Java.stg :)  call it GregJava.stg and then use language=GregJava  
in the options. :)

Ter
On Sep 17, 2006, at 11:00 AM, Greg Clemenson wrote:

> In Antlr 3.0b4 I can't figure out how to get @SuppressWarnings 
> ("all") just before the Parser or Lexer class definition in Java.   
> Putting it in the @parser::header section doesn't work, since the  
> Java template inserts additional import statements following the  
> inserted @SuppressWarnings("all"), causing a Java compile error.  I  
> was thinking there might be some sort of @header::preamble section  
> (also @lexer::preamble) that could insert such things before the  
> class declarations.  Perhaps there is already a mechanism for doing  
> this, but I just can't find it?
>
> Thanks,
> Greg
>



More information about the antlr-interest mailing list