[antlr-interest] question about inserting @SuppressWarnings() in grammar
Terence Parr
parrt at cs.usfca.edu
Tue Dec 29 13:18:46 PST 2009
for now, you'd have to modify the Java.stg template.
Ter
On Dec 29, 2009, at 1:00 PM, Yi Wei wrote:
> hi,
>
> I was using Antlr-3.1 to build a small language and the lexer and
> parser
> Antlr generated contained some warnings such as never used local
> variables
> or never used imported classes. So I decided to use the
> @SuppressWarnings() construct to suppress all these warnings. But I
> had
> difficulty finding a place in the grammar file to add this
> construct. I
> tried to add them in the @header {} block, but the @SuppressWarnings()
> will appear right after the package header in the generated parser and
> causes a syntax error. If I added the construct in the @members {}
> block,
> the construct doesn't have any effect. Actually, the construct
> should be
> added after the imports but before the class declarations. Is there
> a way
> in Antlr so that I can insert this construct to the right place?
> Thank you
> very much!
>
> Regards,
> Yi
>
> --
>
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
More information about the antlr-interest
mailing list