[antlr-interest] Using labels in actions of a tree parser
Oliver B. Fischer
o.b.fischer at gmx.de
Fri Aug 15 02:47:38 PDT 2008
Hello Foust,
thank you for your hint. I didn't read this section properly.
Bye
Oliver
Foust schrieb:
> Oliver,
>
>> But is there a way to get access to the tree node itself? I tried to
>> use the ".tree" attribute, but it leads to an compile error, since .tree
>> isn't translated to ".getTree()".
>>
>> So, what can I do to get the tree node?
>
> Although it's counter-intuitive, there is no ".tree" attribute on nodes of a
> tree grammar (only in the parser). See p. 132. Although $t does represent
> your 'term' tree node, only "text", "start", and "st" are defined.
>
> Brent
>
--
Oliver B. Fischer, Schönhauser Allee 64, 10437 Berlin
Tel. +49 30 44793251, Mobil: +49 178 7903538
Mail: o.b.fischer at gmx.de Blog: http://www.sw-blog.net
More information about the antlr-interest
mailing list