Re: Antlr2/3 compatibility with maven-antlr3-plugin

2007-07-13 Thread Jochen Kuhnle

On 2007-07-12 15:47:31 +0200, David Holroyd [EMAIL PROTECTED] said:


Hi,

On Thu, Jul 12, 2007 at 12:08:53PM +0200, Jochen Kuhnle wrote:

I tried out the antlr3 plugin and ran into a dependency problem:
antlr-3.0 depends on stringtemplate-3.0 which depends on antlr-2.7.x.
Since antlr-2 and -3 are fundamentally incompatible (API packages
renamed, grammar file format changed), this does not work.


However, the two ANTLRs have different groupIds, so there should be no
problem due to these dependencies, I think?

  antlr:antlr:2.7.x  vs.  org.antlr:antlr:3.0

(Still pretty confusing though.)


You're right, of course. Please excuse me, I had a wrong stringtemplate 
pom in my repo left over from playing around with antlr. I obviously 
forgot to do my Repository-Kehrwoche 
(http://www.training-for-germany.de/tips99/tipkw.htm), inexcusable for 
somone from Stuttgart...




What specific errors did you encounter?


A think before you type error on my side...





I propose to change the artifactId of antlr-3.0 to antlr3-3.0, and to
change the default directories of the plugin to src/main/antlr3 and
target/generated-sources/antlr3. This allows using antlr-2.x and
antlr-3.0 and the respective plugins side by side.


I took src/main/antlr as the default for the v3 plugin on the
assumption that if anyone wanted to do this, they could just specify
different folders by hand.  Also, IIRC, the v2 plugin does not have a
default directory for the v3 plugin to clash with -- you have to
explicitly tell it where to find the source v2 grammars, I think?

I think that most people will just be using one version of the plugin,
and the few wanting both can configure a non-default value.  If you can
show a reasonable case for changing the default, I'll take a look
though.


ta,
dave





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Antlr2/3 compatibility with maven-antlr3-plugin

2007-07-12 Thread Jochen Kuhnle

Hi,

I tried out the antlr3 plugin and ran into a dependency problem: 
antlr-3.0 depends on stringtemplate-3.0 which depends on antlr-2.7.x. 
Since antlr-2 and -3 are fundamentally incompatible (API packages 
renamed, grammar file format changed), this does not work.


I propose to change the artifactId of antlr-3.0 to antlr3-3.0, and to 
change the default directories of the plugin to src/main/antlr3 and 
target/generated-sources/antlr3. This allows using antlr-2.x and 
antlr-3.0 and the respective plugins side by side.


Regards,
Jochen



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Antlr2/3 compatibility with maven-antlr3-plugin

2007-07-12 Thread David Holroyd
Hi,

On Thu, Jul 12, 2007 at 12:08:53PM +0200, Jochen Kuhnle wrote:
 I tried out the antlr3 plugin and ran into a dependency problem: 
 antlr-3.0 depends on stringtemplate-3.0 which depends on antlr-2.7.x. 
 Since antlr-2 and -3 are fundamentally incompatible (API packages 
 renamed, grammar file format changed), this does not work.

However, the two ANTLRs have different groupIds, so there should be no
problem due to these dependencies, I think?

  antlr:antlr:2.7.x  vs.  org.antlr:antlr:3.0

(Still pretty confusing though.)

What specific errors did you encounter?


 I propose to change the artifactId of antlr-3.0 to antlr3-3.0, and to 
 change the default directories of the plugin to src/main/antlr3 and 
 target/generated-sources/antlr3. This allows using antlr-2.x and 
 antlr-3.0 and the respective plugins side by side.

I took src/main/antlr as the default for the v3 plugin on the
assumption that if anyone wanted to do this, they could just specify
different folders by hand.  Also, IIRC, the v2 plugin does not have a
default directory for the v3 plugin to clash with -- you have to
explicitly tell it where to find the source v2 grammars, I think?

I think that most people will just be using one version of the plugin,
and the few wanting both can configure a non-default value.  If you can
show a reasonable case for changing the default, I'll take a look
though.


ta,
dave

-- 
http://david.holroyd.me.uk/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Antlr2/3 compatibility with maven-antlr3-plugin

2007-07-12 Thread Brett Porter

I agree with David.

I also didn't think stringtemplate used antlr2 at runtime, I thought  
it was just at compile time?


- Brett

On 12/07/2007, at 11:47 PM, David Holroyd wrote:


Hi,

On Thu, Jul 12, 2007 at 12:08:53PM +0200, Jochen Kuhnle wrote:

I tried out the antlr3 plugin and ran into a dependency problem:
antlr-3.0 depends on stringtemplate-3.0 which depends on antlr-2.7.x.
Since antlr-2 and -3 are fundamentally incompatible (API packages
renamed, grammar file format changed), this does not work.


However, the two ANTLRs have different groupIds, so there should be no
problem due to these dependencies, I think?

  antlr:antlr:2.7.x  vs.  org.antlr:antlr:3.0

(Still pretty confusing though.)

What specific errors did you encounter?



I propose to change the artifactId of antlr-3.0 to antlr3-3.0, and to
change the default directories of the plugin to src/main/antlr3 and
target/generated-sources/antlr3. This allows using antlr-2.x and
antlr-3.0 and the respective plugins side by side.


I took src/main/antlr as the default for the v3 plugin on the
assumption that if anyone wanted to do this, they could just specify
different folders by hand.  Also, IIRC, the v2 plugin does not have a
default directory for the v3 plugin to clash with -- you have to
explicitly tell it where to find the source v2 grammars, I think?

I think that most people will just be using one version of the plugin,
and the few wanting both can configure a non-default value.  If you  
can

show a reasonable case for changing the default, I'll take a look
though.


ta,
dave

--
http://david.holroyd.me.uk/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Antlr2/3 compatibility with maven-antlr3-plugin

2007-07-12 Thread David Holroyd
On Fri, Jul 13, 2007 at 06:21:24AM +1000, Brett Porter wrote:
 I also didn't think stringtemplate used antlr2 at runtime, I thought  
 it was just at compile time?

The StringTemplate build needs the ANTLRv2 tool to compile its grammar
and the StringTemplate artifact needs the ANTLRv2 'runtime' to execute
the resulting parser.  In v2, tool and runtime are in the same artifact,
so the dependency is correct, I think.

ta,
dave

-- 
http://david.holroyd.me.uk/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]