[antlr-interest] Re: Reparsing a subtree. Or another solution?

lgcraymer lgc at mail1.jpl.nasa.gov
Tue Nov 16 15:42:35 PST 2004



--- In antlr-interest at yahoogroups.com, Joan Pujol <joanpujol at g...> wrote:
> A lot of thanks for your excellent reply.
> 
> On Tue, 16 Nov 2004 22:11:06 -0000, lgcraymer <lgc at m...> wrote:
...
> > 2.)  Duplicate the subtrees of interest, and have different walkers
> > (distinguished by actions, not by tree syntax) for the duplicates.
> > This may have maintainability advantages.
> I can't understand this alternative well.
> Please, can you put an small example?

Basically, if you have a subtree, say "a", then you use
factory->dupTree(#a) in an action and add it to the current rule's
tree.  The simplest case is actually messy in 2.7 (I didn't think
through the implementation), so you are probably better off adopting
the third approach.

--Loring





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the antlr-interest mailing list