[antlr-interest] Compiling Java source files when using the antlr3-maven-plugin
Jim Idle
jimi at temporal-wave.com
Wed Nov 11 11:54:50 PST 2009
Did you add the package statement to the @arser and @lexer header sections? The output files will generated I the correct place, but you need to add the package yourself, just like in Java.
Your best bet is to start here:
http://www.antlr.org/wiki/display/ANTLR3/Building+ANTLR+Projects+with+Maven
and modify the sample project that is produced.
Jim
From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-bounces at antlr.org] On Behalf Of Cameron Ross
Sent: Wednesday, November 11, 2009 11:43 AM
To: antlr-interest at antlr.org
Subject: [antlr-interest] Compiling Java source files when using the antlr3-maven-plugin
Hello,
I have a simple maven project with source files configured as follows:
my_project/
- pom.xml
- src
- main
- antlr3
- my_package
- MyGrammar.g
- java
- my_package
- MyClass.java
When I execute mvn compile my parser and lexer sources are generated properly and reside under target/generated-sources as expected. However, MyClass.java is not compiled and the process gives me the following error:
...
target/generated-sources/antlr3/my_package/MyParser.java:[105,13] cannot find symbol
symbol : constructor MyClass()
...
Any help would be greatly appreciated.
Cameron.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20091111/386ecaa1/attachment.html
More information about the antlr-interest
mailing list