[antlr-interest] Antlr3 in Eclipse and Maven?
Verny Quartara
webny23 at gmail.com
Wed Jun 20 05:06:51 PDT 2012
I post my working configuration, hoping that helps.
My grammar compiles fine in both AntlrWorks and Maven.
I putted my .g files in src/main/antlr3 and the gunit tests in
src/test/gunit.
Bye
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr3-maven-plugin</artifactId>
<version>3.4</version>
<executions>
<execution>
<goals>
<goal>antlr</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>maven-gunit-plugin</artifactId>
<version>3.4</version>
<executions>
<execution>
<id>maven-gunit-plugin</id>
<phase>generate-test-sources</phase>
<goals>
<goal>gunit</goal>
</goals>
</execution>
</executions>
</plugin>
2012/6/20 Brad Cox <bradjcox at gmail.com>
> I've an antlr3 grammar that compiles fine in AntlrWorks. I'm trying to load
> it into Eclipse with Maven to start work on the non-grammar bits.
>
> Problem is it won't compile in either. Error flags are on the first line,
> grammar ...;, and nothing I've tried will remove them. Somehow antlr2 is
> getting involved in the compile step.
>
> The dependency list shows antlr-runtime-3.2.jar and stringtemplate-3.2.jar
> now. Previously there was an antlr2 jar that I've explicitly excluded.
> Didn't make a difference.
>
> My best guess is that the antlr3 maven plugin is launching antlr2, not
> antlr3, but I have no visibility into what that plugin is doing.
>
> <groupId>org.antlr</groupId>
> <artifactId>antlr3-maven-plugin</artifactId>
> <version>3.1.3-1</version
>
> There's also likely confusion over which eclipse plugin I should be using.
> After some searching I removed everything but the one from certiv, but no
> joy.
>
> Could someone point me to a known-to-work reference? Thanks!
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
--
Verny Quartara
More information about the antlr-interest
mailing list