[antlr-interest] Philosophical: How to collect data in AST traversal

Oliver Zeigermann oliver.zeigermann at gmail.com
Fri Apr 29 00:55:56 PDT 2005


Folks!

I was just working with the Java grammar and had to add some action
data into the tree parser. I ended up passing data around between
several rules which caused quite some changes and also warnings
because of unsued return types. So I was wondering why not just
modifying class memebers from all rules that contain wanted data. I
know this may end up in the "global variables are evil" argument, but
I was just wondering how others are dealing with this.

Thanks for any comments 

  Oliver


More information about the antlr-interest mailing list