[antlr-interest] Latest C++ dev. snapshot (20030626)

Ric Klaren klaren at cs.utwente.nl
Thu Jul 10 01:58:10 PDT 2003


Hi,

On Thu, Jul 10, 2003 at 10:35:45AM +0200, Jorge Scandaliaris wrote:
>             I wonder what I am doing wrong, when I run java
> "antlr.build.Tool build" I get some error messages. It seems as if the
> build tool is trying to run "java antlr.Tool -o
> F:\tools\antlr-2.7.2\antlr ./antlr/antlr.g" even before the Tool.java is
> compiled. 
> 
>             I tried putting the for loop at the beginning of "build"
> method (from antlr/build/ANTLR.java) and it seems to work. Is that OK?

Would have to ask Terence, I don't use the new build tool.

> 
>  
> 
> public void build(Tool tool) {
> 
>         if ( !rootIsValidANTLRDir(tool) ) {
> 
>             return;
> 
>         }
> 
>         for (int i=0; i<srcdir.length; i++) {
> 
>             String cmd = compiler+" -d "+root+"
> "+root+"/"+srcdir[i]+"/*.java";
> 
>             tool.system(cmd);
> 
>         }
> 
>         // run ANTLR on its own .g files
> 
>         tool.antlr(root+"/antlr/antlr.g");
> 
>         tool.antlr(root+"/antlr/tokdef.g");
> 
>         tool.antlr(root+"/antlr/preprocessor/preproc.g");
> 
>         tool.antlr(root+"/antlr/actions/java/action.g");
> 
>         tool.antlr(root+"/antlr/actions/cpp/action.g");
> 
>         tool.antlr(root+"/antlr/actions/csharp/action.g");
> 
>     } 
> 
> 
>             This seems to work, i.e. I can run antlr and generate the
> cpp files. The problem is that the MSVC compiler gives then some errors,
> complaining about pure virtual functions not defined:

This is a screw up of mine in that snapshot, it is fixed in a newer one
available at http://wwwhome.cs.utwente.nl/~klaren/antlr/

>             Any ideas? Maybe this has something to do with the way I
> compiled the static library: to get it to compile I replaced SOME
> appearances of 
> 
> #if defined(_MSC_VER) && !defined(__ICL) // Microsoft Visual C++
> 
>             with
> 
> #if defined(_MSC_VER) && !defined(__ICL) && (_MSC_VER > 1200) //
> Microsoft Visual C++

This should be ok (I think) I have to do the same myself since the VC7
changes borked VC6.

>             This is not crucial for me now, I was just looking to take
> advantage of the bug fixes introduced (I use some workarounds now and my
> application works with them). I just thought the feedback might be
> useful. Note also I had similar problems with previous snapshots, so I
> would discard the build problem I describe at the beginning as the cause
> (w/ previous snapshots, the build tool worked ok).

Thank you for the feedback :) The stuff needs to be brought back inline for
VC6 :( at least for the static build.

Cheers,

Ric
-- 
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722  ----
-----+++++*****************************************************+++++++++-------
     "Never argue with an idiot, for they will bring you down to their
              level and beat you with experience." --- Unknown


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list