[antlr-interest] how to access rule attributes in a tree grammar in release 3.1

Gerard van de Glind g.vandeglind at beinformed.nl
Fri Aug 8 03:02:11 PDT 2008


Hey hello,

I updated to the ANTLR 3.1b2 release to try it out for the upcoming 3.1 release. Btw when will 3.1 be released, is that already known?

It seems that quite a lot has changed since the 3.0 release. Also, I get a lot of errors now when I generate Java code from my grammar.

In the Changes.txt I read the following:
match() returns Object matched now (parser, tree parser) so we can set labels
on token refs properly after single token ins/del error recovery.

And a close examination of the generated Java code reveals that many things have now become a direct instance of class Object.

However, this causes problems if I want to access the predefined ANTLR attributes (see 6.4 of the Definitive ANTLR Reference).
Is there a new notation to access these?

Thanks a lot!

Regards, Gerard




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080808/7aa4a9f2/attachment.html 


More information about the antlr-interest mailing list