Don't tell anybody I told you this, but you can do this:
@annotatemethod { @SuppressWarnings("all") }
and then alter Java.stg so that it references
<actions.annotatemethod>
right before the method definition. Bob's your uncle, and you have
annotations.
ANTLR's output template mechanism allows you to name any action you
want and then reference it from the output templates.
Ter
On Aug 1, 2009, at 1:32 PM, Sam Barnett-Cormack wrote:
> Hey all,
>
> similar to previous discussions of doc-comments reaching the generated
> classes, it'd be *really* nice if it were possible to annotate the
> generated classes. Specifically, adding @SuppressWarnings("all") would
> be lovely, as the generated code produces so many warnings (dead code,
> unused local variables, unused imports...).
>
> If there were just something, akin to @header, that appeared between
> the
> antlr-generated imports and the actual class, that would do the
> trick -
> for doc-comments (of the class) and for annotations.
>
> Just a thought.
>
> --
> Sam Barnett-Cormack
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---