[antlr-interest] Re: ANTLR status wrt Visual C++ 6.0
Michael Searles
msearles at base16.com
Thu Aug 12 10:42:14 PDT 2004
thanks for the reply Ric.
> Try 2.7.4 first I'd say. Although this particular output does not
ring a
> bell.. If 2.7.4 gives these errors as well then it would help to see
some
> generated code. _retTree is an attribute of the treewalker class.
ok, I've got 2.7.4 now.
_retTree and returnAST are commented out in the distro.
antlr-2.7.4\antlr-2.7.4\lib\cpp\antlr\TreeParser.hpp:
/* Where did this rule leave off parsing; avoids a return parameter */
//RefAST _retTree;
/* AST return value for a rule is squirreled away here */
//RefAST returnAST;
and _retTree is commented out in:
antlr-2.7.4\antlr-2.7.4\lib\cpp\antlr\Parser.hpp:
// /// AST return value for a rule is squirreled away here
// RefAST returnAST;
are these supposed to be commented out?
The 2.7.4 antlr.jar is generating code that expects them.
generated CalcParser.cpp:
void CalcParser::expr() {
returnAST = ANTLR_USE_NAMESPACE(antlr)nullAST;
.
.
generated CalcTreeWalker.cpp:
float CalcTreeWalker::expr(ANTLR_USE_NAMESPACE(antlr)RefAST _t) {
.
.
.
_t = _retTree;
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