[il-antlr-interest: 32877] Re: [antlr-interest] Token Stream Rewriting
merge(...) is returning a String. Fabien. Le 22/06/11 00:36, Bart Kiers a écrit : Fabien, but what is the return type of this `merge(...)` method? Could you post the method? Or even better: post a SSCCE http://sscce.orgthat causes such an exception? Regards, Bart. On Wed, Jun 22, 2011 at 8:30 AM, Fabien Hermenier hermenierfab...@gmail.com mailto:hermenierfab...@gmail.com wrote: In fact, I've badly readed the help. So yet, it is running a String that should be tokenized (then translated into tree I suppose) at run time. Le 22/06/11 00:28, Bart Kiers a écrit : Is your `merge(String, List, String)` method returning a java.util.ArrayList instead of a Tree? Regards, Bart. On Wed, Jun 22, 2011 at 8:04 AM, Fabien Hermenier hermenierfab...@gmail.com mailto:hermenierfab...@gmail.com mailto:hermenierfab...@gmail.com mailto:hermenierfab...@gmail.com wrote: Hi I have some troubles with token stream rewriting. Below is the piece of ANTLR code. I have a grammar, with an AST as output and Java as the target. I want to insert a sequence of token into the stream. I have followed the page http://www.antlr.org/wiki/display/~admin/2007/06/28/Token+stream+rewriting+with+rewrite+rules http://www.antlr.org/wiki/display/%7Eadmin/2007/06/28/Token+stream+rewriting+with+rewrite+rules http://www.antlr.org/wiki/display/%7Eadmin/2007/06/28/Token+stream+rewriting+with+rewrite+rules and adapted the example that interest me. A piece of the code is following. Basically, in the alternative of 'explodedSet', I get the return values of other rules and do some stuff in the merge method. This one returns a list of String as explained in the online example. explodedSet: '{' (setContent (',' setContent)*)? '}' - ^(EXPLODED_SET setContent+) | {List l = new LinkedList();}LEFTY r1=brace_content{l.add($r1.ret);} (',' r2=brace_content{l.add($r2.ret);})* RIGHTY - { merge($LEFTY.text,l,$RIGHTY.text) }; brace_content returns [List ret]: st=number ('..' ed=number)? {$ret = new LinkedList(); for (int i = $st.val; i = $ed.val; i++) {$ret.add(i);}} | NAME {$ret = new LinkedList(); $ret.add($NAME.text);}; The code compiles well but at runtime, I've got this exception: Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to org.antlr.runtime.tree.Tree at org.antlr.runtime.tree.BaseTreeAdaptor.addChild(BaseTreeAdaptor.java:107) at Parser.explodedSet(Parser.java:560) So, the return value of merge does not seems to be converted into tokens nor Tree. Does someone has an idea ? Fabien. List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- Fabien Hermenier Postdoctoral researcher at Flux http://sites.google.com/site/hermenierfabien/home List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- Fabien Hermenier Postdoctoral researcher at Flux http://sites.google.com/site/hermenierfabien/home List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups il-antlr-interest group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
[il-antlr-interest: 32878] Re: [antlr-interest] Token Stream Rewriting
Is it _really_ returning a String * private String merge(String s1, List lst, String s2) {* *...* *return ...* * }* ? Not an Object _you think_ is a String: * private Object merge(String s1, List lst, String s2) {* *...* *return ...* * }* ? I ask because the stack-trace you posted: Caused by: java.lang.ClassCastException: java.util.ArrayList seems to suggest it is an ArrayList. Either way: a String or an ArrayList, both are wrong: that method needs to return a Tree. Bart. On Wed, Jun 22, 2011 at 8:39 AM, Fabien Hermenier hermenierfab...@gmail.com wrote: merge(...) is returning a String. Fabien. Le 22/06/11 00:36, Bart Kiers a écrit : Fabien, but what is the return type of this `merge(...)` method? Could you post the method? Or even better: post a SSCCE http://sscce.orgthat causes such an exception? Regards, Bart. On Wed, Jun 22, 2011 at 8:30 AM, Fabien Hermenier hermenierfab...@gmail.com wrote: In fact, I've badly readed the help. So yet, it is running a String that should be tokenized (then translated into tree I suppose) at run time. Le 22/06/11 00:28, Bart Kiers a écrit : Is your `merge(String, List, String)` method returning a java.util.ArrayList instead of a Tree? Regards, Bart. On Wed, Jun 22, 2011 at 8:04 AM, Fabien Hermenier hermenierfab...@gmail.com mailto:hermenierfab...@gmail.com wrote: Hi I have some troubles with token stream rewriting. Below is the piece of ANTLR code. I have a grammar, with an AST as output and Java as the target. I want to insert a sequence of token into the stream. I have followed the page http://www.antlr.org/wiki/display/~admin/2007/06/28/Token+stream+rewriting+with+rewrite+ruleshttp://www.antlr.org/wiki/display/%7Eadmin/2007/06/28/Token+stream+rewriting+with+rewrite+rules http://www.antlr.org/wiki/display/%7Eadmin/2007/06/28/Token+stream+rewriting+with+rewrite+rules and adapted the example that interest me. A piece of the code is following. Basically, in the alternative of 'explodedSet', I get the return values of other rules and do some stuff in the merge method. This one returns a list of String as explained in the online example. explodedSet: '{' (setContent (',' setContent)*)? '}' - ^(EXPLODED_SET setContent+) | {List l = new LinkedList();}LEFTY r1=brace_content{l.add($r1.ret);} (',' r2=brace_content{l.add($r2.ret);})* RIGHTY - { merge($LEFTY.text,l,$RIGHTY.text) }; brace_content returns [List ret]: st=number ('..' ed=number)? {$ret = new LinkedList(); for (int i = $st.val; i = $ed.val; i++) {$ret.add(i);}} | NAME {$ret = new LinkedList(); $ret.add($NAME.text);}; The code compiles well but at runtime, I've got this exception: Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to org.antlr.runtime.tree.Tree at org.antlr.runtime.tree.BaseTreeAdaptor.addChild(BaseTreeAdaptor.java:107) at Parser.explodedSet(Parser.java:560) So, the return value of merge does not seems to be converted into tokens nor Tree. Does someone has an idea ? Fabien. List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- Fabien Hermenier Postdoctoral researcher at Flux http://sites.google.com/site/hermenierfabien/home List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- Fabien Hermenier Postdoctoral researcher at Flux http://sites.google.com/site/hermenierfabien/home List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups il-antlr-interest group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
[il-antlr-interest: 32879] Re: [antlr-interest] Token Stream Rewriting
Yes it was a String. In my previous mail, I've explained the List was an error, so the trace was not fine. You say it as to return a Tree; I will work on this. I think I didn't understood the example on the webpage. Thanks for your help. Fabien. Le 22/06/11 00:45, Bart Kiers a écrit : Is it _really_ returning a String * private String merge(String s1, List lst, String s2) {* *...* *return ...* * }* ? Not an Object _you think_ is a String: * private Object merge(String s1, List lst, String s2) {* *...* *return ...* * }* ? I ask because the stack-trace you posted: Caused by: java.lang.ClassCastException: java.util.ArrayList seems to suggest it is an ArrayList. Either way: a String or an ArrayList, both are wrong: that method needs to return a Tree. Bart. On Wed, Jun 22, 2011 at 8:39 AM, Fabien Hermenier hermenierfab...@gmail.com mailto:hermenierfab...@gmail.com wrote: merge(...) is returning a String. Fabien. Le 22/06/11 00:36, Bart Kiers a écrit : Fabien, but what is the return type of this `merge(...)` method? Could you post the method? Or even better: post a SSCCE http://sscce.orgthat causes such an exception? Regards, Bart. On Wed, Jun 22, 2011 at 8:30 AM, Fabien Hermenier hermenierfab...@gmail.com mailto:hermenierfab...@gmail.com wrote: In fact, I've badly readed the help. So yet, it is running a String that should be tokenized (then translated into tree I suppose) at run time. Le 22/06/11 00:28, Bart Kiers a écrit : Is your `merge(String, List, String)` method returning a java.util.ArrayList instead of a Tree? Regards, Bart. On Wed, Jun 22, 2011 at 8:04 AM, Fabien Hermenier hermenierfab...@gmail.com mailto:hermenierfab...@gmail.com mailto:hermenierfab...@gmail.com mailto:hermenierfab...@gmail.com wrote: Hi I have some troubles with token stream rewriting. Below is the piece of ANTLR code. I have a grammar, with an AST as output and Java as the target. I want to insert a sequence of token into the stream. I have followed the page http://www.antlr.org/wiki/display/~admin/2007/06/28/Token+stream+rewriting+with+rewrite+rules http://www.antlr.org/wiki/display/%7Eadmin/2007/06/28/Token+stream+rewriting+with+rewrite+rules http://www.antlr.org/wiki/display/%7Eadmin/2007/06/28/Token+stream+rewriting+with+rewrite+rules and adapted the example that interest me. A piece of the code is following. Basically, in the alternative of 'explodedSet', I get the return values of other rules and do some stuff in the merge method. This one returns a list of String as explained in the online example. explodedSet: '{' (setContent (',' setContent)*)? '}' - ^(EXPLODED_SET setContent+) | {List l = new LinkedList();}LEFTY r1=brace_content{l.add($r1.ret);} (',' r2=brace_content{l.add($r2.ret);})* RIGHTY - { merge($LEFTY.text,l,$RIGHTY.text) }; brace_content returns [List ret]: st=number ('..' ed=number)? {$ret = new LinkedList(); for (int i = $st.val; i = $ed.val; i++) {$ret.add(i);}} | NAME {$ret = new LinkedList(); $ret.add($NAME.text);}; The code compiles well but at runtime, I've got this exception: Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to org.antlr.runtime.tree.Tree at org.antlr.runtime.tree.BaseTreeAdaptor.addChild(BaseTreeAdaptor.java:107) at Parser.explodedSet(Parser.java:560) So, the return value of merge does not seems to be converted into tokens nor Tree. Does someone has an idea ? Fabien. List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- Fabien Hermenier Postdoctoral researcher at Flux http://sites.google.com/site/hermenierfabien/home List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
[il-antlr-interest: 32882] Re: [antlr-interest] test release of antlr 3.4
Terence Parr pa...@cs.usfca.edu wrote: Hi, ok, fixed up the C target. please try again. http://antlr.org/download/antlr-3.4rc2-complete.jar http://antlr.org/download/antlr-3.4rc2.jar Looks way better! Now I guess we need to let Jim come up with the matching runtime to try it out for real and see if it builds runs as intended. Thanks, JB. -- Julien BLACHE http://www.jblache.org j...@jblache.org GPG KeyID 0xF5D65169 List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups il-antlr-interest group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
[il-antlr-interest: 32887] Re: [antlr-interest] test release of antlr 3.4
On Wed, Jun 22, 2011 at 10:38 PM, Jim Idle j...@temporal-wave.com wrote: Yes, it is but now I have to tests and release the runtime, which I will be doing over the next few hours. I have your patch somewhere but I did not use it yet because something bothered me about it and I don't remember what yet. However, I will be fixing everything that I can this morning/today. Jim Thanks Jim Gokul. List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups il-antlr-interest group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
[il-antlr-interest: 32891] [antlr-interest] ANTLR 3 and Maven 3
Hi, I'm trying to convert an existing Java project (dependent on ANTLR 3) to maven. I've found that the recommendations on the list are that we use the archetype to create a sample project: http://www.antlr.org/wiki/display/ANTLR3/Building+ANTLR+Projects+with+Maven I'm currently using Maven 3.0.3, and the command recommend in the above fails: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.0:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.antlr:antlr3-maven-archetype:3.3) - [Help 1] The 2 comments on that page reflect the same failure I'm experiencing. Is this a compatibility issue with Maven 3? List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups il-antlr-interest group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
[il-antlr-interest: 32892] Re: [antlr-interest] ANTLR 3 and Maven 3
Antlr is only 2.2.1 compliant itself. However, there is a bug in the 3.3 archetype and you have to generate using the 3.2.1 archetype and then change the generated pom to use 3.3 afterwards. I think that the plugin MIGHT work with Maven 3.0.3 but no guarantees. You are better using Maven 2.2.1 and then upgrading to 3.0.3 when we upgrade ANTLR to that release. Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of Joey Mink Sent: Wednesday, June 22, 2011 2:26 PM To: antlr-interest@antlr.org Subject: [antlr-interest] ANTLR 3 and Maven 3 Hi, I'm trying to convert an existing Java project (dependent on ANTLR 3) to maven. I've found that the recommendations on the list are that we use the archetype to create a sample project: http://www.antlr.org/wiki/display/ANTLR3/Building+ANTLR+Projects+with+M aven I'm currently using Maven 3.0.3, and the command recommend in the above fails: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.0:generate (default- cli) on project standalone-pom: The desired archetype does not exist (org.antlr:antlr3-maven-archetype:3.3) - [Help 1] The 2 comments on that page reflect the same failure I'm experiencing. Is this a compatibility issue with Maven 3? List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your- email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups il-antlr-interest group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
[il-antlr-interest: 32893] Re: [antlr-interest] ANTLR 3 and Maven 3
Hi I use the antlr plugin, without having to specify a special archetype. Files are stored into src/main/antlr3. Here is the dependency for the pom.xml: plugin groupIdorg.antlr/groupId artifactIdantlr3-maven-plugin/artifactId version3.2/version executions execution goals goalantlr/goal /goals /execution /executions /plugin To compile the grammars, I use mvn antlr3:antlr. Hope this help Fabien. Le 22/06/11 15:34, Jim Idle a écrit : Antlr is only 2.2.1 compliant itself. However, there is a bug in the 3.3 archetype and you have to generate using the 3.2.1 archetype and then change the generated pom to use 3.3 afterwards. I think that the plugin MIGHT work with Maven 3.0.3 but no guarantees. You are better using Maven 2.2.1 and then upgrading to 3.0.3 when we upgrade ANTLR to that release. Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of Joey Mink Sent: Wednesday, June 22, 2011 2:26 PM To: antlr-interest@antlr.org Subject: [antlr-interest] ANTLR 3 and Maven 3 Hi, I'm trying to convert an existing Java project (dependent on ANTLR 3) to maven. I've found that the recommendations on the list are that we use the archetype to create a sample project: http://www.antlr.org/wiki/display/ANTLR3/Building+ANTLR+Projects+with+M aven I'm currently using Maven 3.0.3, and the command recommend in the above fails: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.0:generate (default- cli) on project standalone-pom: The desired archetype does not exist (org.antlr:antlr3-maven-archetype:3.3) - [Help 1] The 2 comments on that page reflect the same failure I'm experiencing. Is this a compatibility issue with Maven 3? List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your- email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- Fabien Hermenier Postdoctoral researcher at Flux http://sites.google.com/site/hermenierfabien/home List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups il-antlr-interest group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
[il-antlr-interest: 32894] Re: [antlr-interest] ANTLR 3 and Maven 3
Fabien, Thanks for the reply - I've actually tried your recommendation previously, but I find I have the following problem if I simply `mvn clean` on my project: Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/antlr3-maven-plugin/3.2/antlr3-maven-plugin-3.2.pom [WARNING] The POM for org.codehaus.mojo:antlr3-maven-plugin:jar:3.2 is missing, no dependency information available And ultimately, I get this error: [ERROR] Plugin org.codehaus.mojo:antlr3-maven-plugin:3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:antlr3-maven-plugin:jar:3.2: Could not find artifact org.codehaus.mojo:antlr3-maven-plugin:pom:3.2 in central ( http://repo1.maven.org/maven2) - [Help 1] Might I need to add a special repository for antlr3-maven-plugin? On Wed, Jun 22, 2011 at 5:39 PM, Fabien Hermenier hermenierfab...@gmail.com wrote: Hi I use the antlr plugin, without having to specify a special archetype. Files are stored into src/main/antlr3. Here is the dependency for the pom.xml: plugin groupIdorg.antlr/groupId artifactIdantlr3-maven-plugin/artifactId version3.2/version executions execution goals goalantlr/goal /goals /execution /executions /plugin To compile the grammars, I use mvn antlr3:antlr. Hope this help Fabien. Le 22/06/11 15:34, Jim Idle a écrit : Antlr is only 2.2.1 compliant itself. However, there is a bug in the 3.3 archetype and you have to generate using the 3.2.1 archetype and then change the generated pom to use 3.3 afterwards. I think that the plugin MIGHT work with Maven 3.0.3 but no guarantees. You are better using Maven 2.2.1 and then upgrading to 3.0.3 when we upgrade ANTLR to that release. Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of Joey Mink Sent: Wednesday, June 22, 2011 2:26 PM To: antlr-interest@antlr.org Subject: [antlr-interest] ANTLR 3 and Maven 3 Hi, I'm trying to convert an existing Java project (dependent on ANTLR 3) to maven. I've found that the recommendations on the list are that we use the archetype to create a sample project: http://www.antlr.org/wiki/display/ANTLR3/Building+ANTLR+Projects+with+M aven I'm currently using Maven 3.0.3, and the command recommend in the above fails: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.0:generate (default- cli) on project standalone-pom: The desired archetype does not exist (org.antlr:antlr3-maven-archetype:3.3) - [Help 1] The 2 comments on that page reflect the same failure I'm experiencing. Is this a compatibility issue with Maven 3? List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your- email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- Fabien Hermenier Postdoctoral researcher at Flux http://sites.google.com/site/hermenierfabien/home List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups il-antlr-interest group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
[il-antlr-interest: 32895] Re: [antlr-interest] ANTLR 3 and Maven 3
The archetype is a short cut to generating a project - the OP is just following the Maven article I wrote I think. I will try to fix the 3.3 archetype if I can. Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of Fabien Hermenier Sent: Wednesday, June 22, 2011 2:39 PM To: antlr-interest@antlr.org Subject: Re: [antlr-interest] ANTLR 3 and Maven 3 Hi I use the antlr plugin, without having to specify a special archetype. Files are stored into src/main/antlr3. Here is the dependency for the pom.xml: plugin groupIdorg.antlr/groupId artifactIdantlr3-maven-plugin/artifactId version3.2/version executions execution goals goalantlr/goal /goals /execution /executions /plugin To compile the grammars, I use mvn antlr3:antlr. Hope this help Fabien. Le 22/06/11 15:34, Jim Idle a écrit : Antlr is only 2.2.1 compliant itself. However, there is a bug in the 3.3 archetype and you have to generate using the 3.2.1 archetype and then change the generated pom to use 3.3 afterwards. I think that the plugin MIGHT work with Maven 3.0.3 but no guarantees. You are better using Maven 2.2.1 and then upgrading to 3.0.3 when we upgrade ANTLR to that release. Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of Joey Mink Sent: Wednesday, June 22, 2011 2:26 PM To: antlr-interest@antlr.org Subject: [antlr-interest] ANTLR 3 and Maven 3 Hi, I'm trying to convert an existing Java project (dependent on ANTLR 3) to maven. I've found that the recommendations on the list are that we use the archetype to create a sample project: http://www.antlr.org/wiki/display/ANTLR3/Building+ANTLR+Projects+with +M aven I'm currently using Maven 3.0.3, and the command recommend in the above fails: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.0:generate (default- cli) on project standalone-pom: The desired archetype does not exist (org.antlr:antlr3-maven-archetype:3.3) - [Help 1] The 2 comments on that page reflect the same failure I'm experiencing. Is this a compatibility issue with Maven 3? List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your- email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email- address -- Fabien Hermenier Postdoctoral researcher at Flux http://sites.google.com/site/hermenierfabien/home List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your- email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups il-antlr-interest group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
[il-antlr-interest: 32896] Re: [antlr-interest] ANTLR 3 and Maven 3
I think you have to use Maven 2.2.1 as I said earlier. I have not build a version against 3.0.3 and so I don't know if it will work or not. Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of Joey Mink Sent: Wednesday, June 22, 2011 2:47 PM To: Fabien Hermenier Cc: antlr-interest@antlr.org Subject: Re: [antlr-interest] ANTLR 3 and Maven 3 Fabien, Thanks for the reply - I've actually tried your recommendation previously, but I find I have the following problem if I simply `mvn clean` on my project: Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/antlr3-maven- plugin/3.2/antlr3-maven-plugin-3.2.pom [WARNING] The POM for org.codehaus.mojo:antlr3-maven-plugin:jar:3.2 is missing, no dependency information available And ultimately, I get this error: [ERROR] Plugin org.codehaus.mojo:antlr3-maven-plugin:3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:antlr3-maven-plugin:jar:3.2: Could not find artifact org.codehaus.mojo:antlr3-maven-plugin:pom:3.2 in central ( http://repo1.maven.org/maven2) - [Help 1] Might I need to add a special repository for antlr3-maven-plugin? On Wed, Jun 22, 2011 at 5:39 PM, Fabien Hermenier hermenierfab...@gmail.com wrote: Hi I use the antlr plugin, without having to specify a special archetype. Files are stored into src/main/antlr3. Here is the dependency for the pom.xml: plugin groupIdorg.antlr/groupId artifactIdantlr3-maven-plugin/artifactId version3.2/version executions execution goals goalantlr/goal /goals /execution /executions /plugin To compile the grammars, I use mvn antlr3:antlr. Hope this help Fabien. Le 22/06/11 15:34, Jim Idle a écrit : Antlr is only 2.2.1 compliant itself. However, there is a bug in the 3.3 archetype and you have to generate using the 3.2.1 archetype and then change the generated pom to use 3.3 afterwards. I think that the plugin MIGHT work with Maven 3.0.3 but no guarantees. You are better using Maven 2.2.1 and then upgrading to 3.0.3 when we upgrade ANTLR to that release. Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of Joey Mink Sent: Wednesday, June 22, 2011 2:26 PM To: antlr-interest@antlr.org Subject: [antlr-interest] ANTLR 3 and Maven 3 Hi, I'm trying to convert an existing Java project (dependent on ANTLR 3) to maven. I've found that the recommendations on the list are that we use the archetype to create a sample project: http://www.antlr.org/wiki/display/ANTLR3/Building+ANTLR+Projects+wi th+M aven I'm currently using Maven 3.0.3, and the command recommend in the above fails: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.0:generate (default- cli) on project standalone-pom: The desired archetype does not exist (org.antlr:antlr3-maven-archetype:3.3) - [Help 1] The 2 comments on that page reflect the same failure I'm experiencing. Is this a compatibility issue with Maven 3? List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your- email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email- address -- Fabien Hermenier Postdoctoral researcher at Flux http://sites.google.com/site/hermenierfabien/home List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email- address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your- email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups il-antlr-interest group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
[il-antlr-interest: 32897] Re: [antlr-interest] ANTLR 3 and Maven 3
Well, I don't have your warnings and I don't use any specific repositories. However, files are already on my local repos since a long time. Just in case, here is a more complete pom.xml --- ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdbtrPlaceSL/groupId artifactIdbtrPlaceSL/artifactId version1.0/version dependencies ... dependency groupIdorg.antlr/groupId artifactIdantlr/artifactId version3.3/version typejar/type optionalfalse/optional /dependency ... /dependencies build plugins plugin groupIdorg.antlr/groupId artifactIdantlr3-maven-plugin/artifactId version3.2/version executions execution goals goalantlr/goal /goals /execution /executions /plugin /plugins /build /project --- Le 22/06/11 15:46, Joey Mink a écrit : Fabien, Thanks for the reply - I've actually tried your recommendation previously, but I find I have the following problem if I simply `mvn clean` on my project: Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/antlr3-maven-plugin/3.2/antlr3-maven-plugin-3.2.pom [WARNING] The POM for org.codehaus.mojo:antlr3-maven-plugin:jar:3.2 is missing, no dependency information available And ultimately, I get this error: [ERROR] Plugin org.codehaus.mojo:antlr3-maven-plugin:3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:antlr3-maven-plugin:jar:3.2: Could not find artifact org.codehaus.mojo:antlr3-maven-plugin:pom:3.2 in central (http://repo1.maven.org/maven2) - [Help 1] Might I need to add a special repository for antlr3-maven-plugin? On Wed, Jun 22, 2011 at 5:39 PM, Fabien Hermenier hermenierfab...@gmail.com mailto:hermenierfab...@gmail.com wrote: Hi I use the antlr plugin, without having to specify a special archetype. Files are stored into src/main/antlr3. Here is the dependency for the pom.xml: plugin groupIdorg.antlr/groupId artifactIdantlr3-maven-plugin/artifactId version3.2/version executions execution goals goalantlr/goal /goals /execution /executions /plugin To compile the grammars, I use mvn antlr3:antlr. Hope this help Fabien. Le 22/06/11 15:34, Jim Idle a écrit : Antlr is only 2.2.1 compliant itself. However, there is a bug in the 3.3 archetype and you have to generate using the 3.2.1 archetype and then change the generated pom to use 3.3 afterwards. I think that the plugin MIGHT work with Maven 3.0.3 but no guarantees. You are better using Maven 2.2.1 and then upgrading to 3.0.3 when we upgrade ANTLR to that release. Jim -Original Message- From: antlr-interest-boun...@antlr.org mailto:antlr-interest-boun...@antlr.org [mailto:antlr-interest- mailto:antlr-interest- boun...@antlr.org mailto:boun...@antlr.org] On Behalf Of Joey Mink Sent: Wednesday, June 22, 2011 2:26 PM To: antlr-interest@antlr.org mailto:antlr-interest@antlr.org Subject: [antlr-interest] ANTLR 3 and Maven 3 Hi, I'm trying to convert an existing Java project (dependent on ANTLR 3) to maven. I've found that the recommendations on the list are that we use the archetype to create a sample project: http://www.antlr.org/wiki/display/ANTLR3/Building+ANTLR+Projects+with+M aven I'm currently using Maven 3.0.3, and the command recommend in the above fails: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.0:generate (default- cli) on project standalone-pom: The desired archetype does not exist (org.antlr:antlr3-maven-archetype:3.3) - [Help 1] The 2 comments on that page reflect the same failure I'm experiencing. Is this a compatibility issue with Maven 3? List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your- email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- Fabien Hermenier Postdoctoral researcher at Flux http://sites.google.com/site/hermenierfabien/home List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- Fabien Hermenier Postdoctoral researcher at Flux http://sites.google.com/site/hermenierfabien/home List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe:
[il-antlr-interest: 32898] Re: [antlr-interest] ANTLR 3 and Maven 3
Jim, My mistake - when I 1st read Fabien's reply, I thought he said he was using Maven 3.x, but I must have been mistaken. I'll try to set up a dual environment for Maven. Thanks! On Wed, Jun 22, 2011 at 5:49 PM, Jim Idle j...@temporal-wave.com wrote: I think you have to use Maven 2.2.1 as I said earlier. I have not build a version against 3.0.3 and so I don't know if it will work or not. Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of Joey Mink Sent: Wednesday, June 22, 2011 2:47 PM To: Fabien Hermenier Cc: antlr-interest@antlr.org Subject: Re: [antlr-interest] ANTLR 3 and Maven 3 Fabien, Thanks for the reply - I've actually tried your recommendation previously, but I find I have the following problem if I simply `mvn clean` on my project: Downloading: http://repo1.maven.org/maven2/org/codehaus/mojo/antlr3-maven- plugin/3.2/antlr3-maven-plugin-3.2.pom [WARNING] The POM for org.codehaus.mojo:antlr3-maven-plugin:jar:3.2 is missing, no dependency information available And ultimately, I get this error: [ERROR] Plugin org.codehaus.mojo:antlr3-maven-plugin:3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:antlr3-maven-plugin:jar:3.2: Could not find artifact org.codehaus.mojo:antlr3-maven-plugin:pom:3.2 in central ( http://repo1.maven.org/maven2) - [Help 1] Might I need to add a special repository for antlr3-maven-plugin? On Wed, Jun 22, 2011 at 5:39 PM, Fabien Hermenier hermenierfab...@gmail.com wrote: Hi I use the antlr plugin, without having to specify a special archetype. Files are stored into src/main/antlr3. Here is the dependency for the pom.xml: plugin groupIdorg.antlr/groupId artifactIdantlr3-maven-plugin/artifactId version3.2/version executions execution goals goalantlr/goal /goals /execution /executions /plugin To compile the grammars, I use mvn antlr3:antlr. Hope this help Fabien. Le 22/06/11 15:34, Jim Idle a écrit : Antlr is only 2.2.1 compliant itself. However, there is a bug in the 3.3 archetype and you have to generate using the 3.2.1 archetype and then change the generated pom to use 3.3 afterwards. I think that the plugin MIGHT work with Maven 3.0.3 but no guarantees. You are better using Maven 2.2.1 and then upgrading to 3.0.3 when we upgrade ANTLR to that release. Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of Joey Mink Sent: Wednesday, June 22, 2011 2:26 PM To: antlr-interest@antlr.org Subject: [antlr-interest] ANTLR 3 and Maven 3 Hi, I'm trying to convert an existing Java project (dependent on ANTLR 3) to maven. I've found that the recommendations on the list are that we use the archetype to create a sample project: http://www.antlr.org/wiki/display/ANTLR3/Building+ANTLR+Projects+wi th+M aven I'm currently using Maven 3.0.3, and the command recommend in the above fails: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.0:generate (default- cli) on project standalone-pom: The desired archetype does not exist (org.antlr:antlr3-maven-archetype:3.3) - [Help 1] The 2 comments on that page reflect the same failure I'm experiencing. Is this a compatibility issue with Maven 3? List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your- email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email- address -- Fabien Hermenier Postdoctoral researcher at Flux http://sites.google.com/site/hermenierfabien/home List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email- address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your- email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups il-antlr-interest group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at