[antlr-interest] Multiple versions of Antlr playing nice together?

Greg Lindholm glindholm at yahoo.com
Fri Jul 1 08:22:44 PDT 2005



> From: Terence Parr <parrt at cs.usfca.edu>
> Date: Thu, 30 Jun 2005 13:30:31 -0700
> 
> > Are you doing anything to ensure that different (incompatable)
> version
> > of antlr can be used side-by-side in a project? I.e. Use different
> > package names?
> 
> I can't really do anything...the more common situation is to get an  
> updated version and expect your code to still compile.   
> antlr275.Token would be annoying, but is the only solution if you  
> must have multiple version :(
> 

Well... It's really only an issue when there is an incompatiblity.
If you know a new release is incompatible with an older one you 
can change the package name or deprecate the old class and put the
changes into a new class.

At this point I'm sure all your attention is on version 3 but going
forward it's a good thing to keep in mind that multiple versions of
antlr may have to run side-by-side in the same app.


> > What about when Antlr 3.x come into widespread use? Will it be able
> to
> > be used in the same application with Antlr 2.x?
> 
> Fortunately here we have org.antlr.* now instead of antlr.* so it  
> works fine.  Indeed 3 is written in 2.7.5 :)
>

This is good to hear, you did use different package names.


> 
> An example I just encountered is Struts 1.2.7 comes with Antlr 2.7.2
> and Hibernate 3.0.5 comes with antlr-2.7.5H3.jar.
> In this project I'm not doing any development with antlr I'm just a
> "user" of Struts and Hibernate. And as a user I don't know if there
> are
> any dependencies on a particular version of antlr or even if these
> two
> are compatible.
> If I use the later release 2.7.5H3 will it break something is Struts?

So does anyone know if there are any gotchas when upgrading from Antlr
2.7.2  to 2.7.5H3 (or the latest 2.7.x) release?



		
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com


More information about the antlr-interest mailing list