[antlr-interest] Latest C++ dev. snapshot (20030626)
    Jorge Scandaliaris 
    j_scandaliaris at yahoo.es
       
    Thu Jul 10 01:35:45 PDT 2003
    
    
  
Ric,
            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?
 
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:
            antlr::Parser::LA(int)
and 
            antlr::Parser::LT(int)
in 
            ... \lib\cpp\antlr\parser.hpp
 
            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++
            in the places where the compiler complained (you told me
there was some new .net-specific stuff in here).
 
            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).
 
            Regards,
 
Jorge
 
 
 
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
    
    
More information about the antlr-interest
mailing list