[antlr-interest] labels for rule results?
Torsten Curdt
tcurdt at vafer.org
Sun Aug 24 05:20:34 PDT 2008
On Aug 24, 2008, at 13:34, Gavin Lambert wrote:
> At 23:19 24/08/2008, Torsten Curdt wrote:
> >Thanks for the answer. But that wasn't what I was trying to ask.
> >:)
> >
> >attributeDeclaration
> > : thetype=type_specifier name=Identifier ';'
> > {
> > System.out.println("name:" + name.getText());
> > System.out.println("type:" + thetype);
> > }
> > ;
> >
> >"thetype" is problem. There is no problem with "name".
>
> The answer is the same. You need to use the proper syntax (using $
> attributes).
>
Hm ...the only thing I found was this
http://www.antlr.org/wiki/display/ANTLR3/Special+symbols+in+actions
So I haven't really found that in documentation.
But I can confirm that it works perfectly :)
Thanks!
--
Torsten
More information about the antlr-interest
mailing list