[antlr-interest] Maven vs AntlrWorks Generated Sources

Luca Li Greci luca.ligreci at gmail.com
Thu Oct 1 00:37:17 PDT 2009

2009/9/30 Jim Idle <jimi at temporal-wave.com>

>  On 09/30/2009 02:47 AM, Luca Li Greci wrote:
> You said that when the grammar is under src/main/antlr3* *the maven plugin
> automatically picks up all grammar defined under any subdirectories (such
> as org/mycompany/myproduct) so that the maven parameters include, lib, and
> the @parser::header {package org.mycompany.myproduct;}
> You still need the package in the @headers for each .g file.
> Jim
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Hi Jim,

I'm going to refactor my project to use what we discuss.

Reading the documentation I can see that the src/main/antlr3/imports is used
to collect all the additional grammars, I assume that this happens when a
grammar is divided in several imported grammars.

Do I need to use @parser::header {package org.mycompany.myproduct;} for all
of grammars in src/main/antlr3/imports ?

If I don't need to do this could, then it could explain the weird java
classes I saw generated, and I could split up my grammar in 5 "blocks".

Thank you very much for helping me!


Victor Hugo wrote, “The future has many names: For the weak, it means the
unattainable. For the fearful, it means the unknown. For the courageous, it
means opportunity.”
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20091001/17fa0535/attachment.html 

More information about the antlr-interest mailing list