[antlr-interest] Bug report: 2.7.5 and 2.7.6

Ric Klaren ric.klaren at gmail.com
Wed Oct 11 13:38:12 PDT 2006


Hi,

On 10/11/06, Harmon Nine <hnine at isis.vanderbilt.edu> wrote:
> One thing:  is there a means of automatically determining, perhaps
> through a precompiler macro, what version of antlr is being used during
> a compile?

The runtime doesn't have a version variable of it's own. Yet in normal
(unix) installs there's the antlr-config script, that can be used to
query things like the version include and lib locations.

So you could do things like :

gcc -DANTLRVERSION=`antlr-config --version` .. etc.

And then use preprocessor macros.

If you got antlr in some vendor branch in source control then you
might even introduce a local patch with a version number in the header
file.

> I'd like to use the latest version of antlr in a software port (to
> linux), but the original software uses antlr-2.7.1, and that is pretty
> much cast in stone.  Is there a way of doing something like the
> following?

Upgrading is pretty much recommended. If you're really fixed on 2.7.1
then you can get a bugfix version from before the ASTFactory reworks
from

http://pts14043.pts.nl/antlr/

Cheers,

Ric


More information about the antlr-interest mailing list