[antlr-interest] Build errors for ANTLR 3.13

Jim Idle jimi at temporal-wave.com
Fri Apr 11 10:02:12 PDT 2008


I think that the build issue is compounded by the fact that the people (including Ter) who build ANTLR don't use ant to do it. This is because of a fundamental aversion to using something like XML to construct build scripts - a camp that I firmly belong to myself. How I get around this personally is that I use Netbeans to create a project with existing source, and just ignore the current ANT build.xml. This is no disrespect to the chap that kindly donated the effort to make the build.xml in any way. 

 

Ter doesn't use that ant script to build antlr and hence on occasions the build.xml gets out of whack with the 'real' build process. A much simpler bash script is used that just runs ANTLR  against ANTLR sources and jars it all up. The build really isn't very complicated and as it only takes about 20 seconds or so to build the lot from scratch, having ANT involved seems a bit overkill I think. 

 

Yes, you already have to have ANTLR before you can build ANTLR, and this is standard practice - at the end of the build you finally build the product with the current version of itself, and if you want to be sure then having done that you build it again with the version you just built and thus prove the huge requirement for regression tests :-). So, this is why people are tripping over the 'pre-existing sources" issue. If you want to bootstrap it, then these sources have to exist in the source tree. 

 

As quite a few people have a need to build the latest from source (there is always a jar in the snapshot by the way in case you haven't spotted this), then maybe I will spend a little time on either the ant script or just a publically available bash/.bat script that is easier to use directly with the source code as seen in a snapshot from perforce - that's basically the issue here and it might be a nice diversion on a sunny morning. As there's more chance of the Pope popping round for tea this afternoon than Ter using ant, then perhaps a script with a few comments might be the best bet as if it was really good, then Ter might even use it, though obviously the scripts he has now must work or we wouldn't be talking about this ;-0

 

If you can't get to the bottom of your crashes with C quickly, then feel free to tell me about them as it is entirely possible that there are bugs in the current beta. I know specifically that if you free the tree node stream after you have rewritten or otherwise manipulated it (such as in the polydiff example) then the runtime currently tries to release nodes twice. This will be fixed before release of course. Other than that I am not aware of any crashes and run boundschecker against lots of examples to try and keep it that way ;-)

 

Jim

 

 

 

From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-bounces at antlr.org] On Behalf Of Christian Schladetsch
Sent: Friday, April 11, 2008 7:58 AM
To: Micheal J
Cc: antlr-interest at antlr.org
Subject: Re: [antlr-interest] Build errors for ANTLR 3.13

 

There is a `clean` target for the ant script.

But the recursive nature of ANTLR makes this tricky. As Dr. Parr has pointed out, the latest release is self-referential and needs `version 3 grammars`. I guess that is from a previous version 3, as my belief system requires that a thing cannot use itself to create itself. Of course, a thing can use an older version of itself to make itself, that's fine, but the latest 'builds' are something else.

Which makes it really hard for us grunts. I am a C++/C#/C/Asm guy trying to meet deadlines. I am not a Java/Ant guy. 

Sure, so it sucks to be me. Even so, I am not an idiot and it has been a real pain to get a build up and running. Generated code from 3.1 is crashing on VS2008 and I don't know if it's my grammar or because of the build kludges I put in (like, *deleting* files from the release package).

It would be fine except I need a C++ target so I am using Jim's 3.1 C runtime. But that means java -> C -> C++ burdened with build issues. I know this is bleeding edge, and I am used to that (I am in game-dev) but at least the builds should build?

I have utmost respect for Dr. Parr and his work, and for all the other contributers. But if builds cannot be built out-of-the-box there is something deeply wrong. Is there a build maintainter for this project? The documentation is scant (yes I have bought the book), but my word if it has to use java then `ant` from from the root has to Just Work.

Regards,
Christian.



On Sat, Apr 12, 2008 at 1:47 AM, Micheal J <open.zone at virgin.net> wrote:

Hi,


> I sent the following updated build.xml to a couple of folks
> the other day; give it a try and let us know here.  A better
> fix would be for the ANTLR distro _not_ to include the
> generated files in the src tree, but until then...

...you could add a 'clean' target?

Much like in the Nant build for the C# v3.1 beta.

Micheal

-----------------------
The best way to contact me is via the list/forum. My time is very limited.

 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080411/da3ac822/attachment.html 


More information about the antlr-interest mailing list