Okay, so I looked into this a little bit more, and the main reason why I implemented my own version of the javacc-maven-plugin, was that the plugin at the time (and still) does not know to omit classes which already exist in the src/main/java tree for overridden nodes.

The FAQ suggest placing those classes next to the grammar, but IMO this is not really desirable, since they should, IMO, live in the src/ main/java tree like normal classes.

My solution was to render the .jj[t] files via javacc into a temporary directory, then inspect each one using qdox to discover the package and classname, and if the class was not overridden, then copy the generated file to the target/generate-*/javacc directories for compilation.

This allowed my overridden classes to live naturally in the src/main/ java tree and allow the javacc parser to generate bits which were missing w/o causing a duplicate class error.

 * * *

IIRC, this was the main reason why I created a custom plugin in the first place...

But then again, I may switch over to Antlr3... or not who knows... shit I really need a parser generator expert to help me fix up the GShell parser and syntax anyways... *begs anyone with time*.

--jason


On Jun 11, 2008, at 12:51 PM, Benjamin Bentmann wrote:

Jason Dillon wrote:

I have not looked at the mojo javacc in a while, but my guess is there are still some issues with it.

Maybe you could try out the recent version when you have some time and just report back what is not working for you such that we might be able to extend/fix the Mojo plugin?


Benjamin

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to