[antlr-interest] Only 1 TreeParser per grammar?
Loring Craymer
lgcraymer at yahoo.com
Wed Jul 11 07:03:30 PDT 2007
You need to have an exportVocab in your options
section for your original grammar, and an importVocab
in your new tree grammar. The manual should have more
details.
--Loring
--- "Kevin J. Cummings" <cummings at kjchome.homeip.net>
wrote:
> 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)
>
____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
More information about the antlr-interest
mailing list