[antlr-interest] Re: ANTLR status wrt Visual C++ 6.0

Michael Searles msearles at base16.com
Mon Aug 16 22:06:34 PDT 2004


Thanks for the reply again Ric.

It turns out that I was running ANTLR from inside Eclipse (2.1.3).  
For some unknown reason, when Eclipse runs ANTLR, the C++ code that's 
generated is different, and doesn't contain the ANTLR version number 
in the source. Building calc.g by calling antlr.jar from a command 
line, produces C++ code that compiles and a header that contains the 
antlr version:

/* $ANTLR 2.7.4: "calc.g" -> "CalcLexer.cpp"$ */

When Eclipse runs antlr, the C++ code that is emitted contains this:

/* $ANTLR : "calc.g" -> "CalcLexer.cpp"$ */

and the files don't compile with the errors I noted in previous posts.


I've checked classpaths in Eclipse, everything looks OK. I also 
temporarily renamed antlr directory to be sure Ecplise was using the 
expected antlr.jar. it was.

For now, I've decided not to pursue using ANTLR due to the 
complexities involved in using it with the Visual C++ 6.0 environment.

Thanks for your help,
Michael


--- In antlr-interest at yahoogroups.com, Ric Klaren <klaren at c...> wrote:
> On Thu, Aug 12, 2004 at 05:42:14PM -0000, Michael Searles wrote:
> > ok, I've got 2.7.4 now.
> >
> > _retTree and returnAST are commented out in the distro.
> 
> It seriously looks like you're mixing a support lib from one version 
of
> antlr with a codegenerator of another.
> 
> retTree and returnAST should be generated in the CalcTreeParser.hpp
> 
> > are these supposed to be commented out?
> 
> Yup.
> 
> > The 2.7.4 antlr.jar is generating code that expects them.
> 
> But also should generate them in the generated class. Verify that in 
the
> top of the generated files the version number from the antlr that 
generated
> them is 2.7.4.




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

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



More information about the antlr-interest mailing list