[antlr-interest] Only 1 TreeParser per grammar?

Kevin J. Cummings cummings at kjchome.homeip.net
Wed Jul 11 00:14:27 PDT 2007


I'm in the middle of a big project.  What I've discovered is that I'd
like to walk the AST tree twice.  The first time, I'll perform some
transformations on it.  The second time, I'll produce my output from it.

I'm using ANTLR 2.7.7, and I just found out that I cannot put more than
1 TreeWalker into the .g file (I'd like to have 2!).  ANTLR complains.
How is this accomplished?  Do I have to create a 2nd .g file which
imports all of the token definitions from the first one's headers and
only has a TreeWalker in it?

-- 
Kevin J. Cummings
kjchome at rcn.com
cummings at kjchome.homeip.net
cummings at kjc386.framingham.ma.us
Registered Linux User #1232 (http://counter.li.org)


More information about the antlr-interest mailing list