[antlr-interest] How to access returned objects

Hendrik Boom hendrik at topoi.pooq.com
Sat Aug 23 05:55:55 PDT 2008

On Thu, 21 Aug 2008 15:38:41 +0000, Hendrik Boom wrote:

> I have a rule 
> body returns [ std::string t9 ]
>     : t9:term7 ( DOLLAR w term7 {t9 += "$" + t;} )*;
> But I can't figure out hos to access the returned value in a rule that
> calls body.

I found out from an incidental example in an old message on this mailing
list. I say
, having declared f to have the proper type in a code
insertion at the beginning of the rule that calls body.

-- hendrik

More information about the antlr-interest mailing list