[antlr-interest] ANTLR 3 Eclipse Plugin

scott at javadude.com scott at javadude.com
Tue Jun 19 05:30:23 PDT 2007


Source/target will work for maven (or other command-line builders), but to
make things work properly in eclipse, I need to have it generate the java
files into a source dir in eclipse, which will then be compiled by the
java builder.

At work, I've set up a "generated" source folder for some other builders
I've worked on (I think it was for xmlbeans, or it might have been SMC -
oh -- that reminds me... I need to release my SMC builder!) I did the same
dir-mapping you mention here.

I'll have to see if I can set that up. I'd like to keep the dir structure
flexible so it doesn't force/preclude a specific command-line build
approach. (We use ant at my work, though there's been talk about switching
to maven). Maven's strict on dir structure, so I've gotta be sure I'm
friendly with it ;)

Later,
-- Scott



> On Tue, Jun 19, 2007 at 01:24:57PM +0300, Shmuel Siegel wrote:
>> In the meantime, I have one suggestion that I will take from the antlr3
>> ant task. I like the idea of having a grammar folder outside of the src
>> folder. The generated code is then put in the right place. It would be
>> great if you can detect the package statement and automatically put the
>> code in the right place.
>
> FYI, the approach I've tried to take in the Maven2 plugin is to just
> have source and target folder-structures match.  i.e. if you place the
> grammar file in $src/com/example, the output files will be generated
> within $dest/com/example (well, the actual structure is more complex,
> but you get the idea).  This doesn't require any additional inspection
> inside the grammar file :)
>
>
> ta,
> dave
>
> --
> http://david.holroyd.me.uk/
>



More information about the antlr-interest mailing list