[antlr-interest] Re: Tree Parser and removing nodes.

lgcraymer lgc at mail1.jpl.nasa.gov
Fri Aug 13 02:10:55 PDT 2004


--- In antlr-interest at yahoogroups.com, Monty Zukowski <monty at c...> wrote:
> a: #(A (B | c));
> c: #(C! (B)*);

Believe it or not, 2.7.1 would convert c to 
( #( B (B)* ) )?

2.7.2 will throw an exception.

--Loring

> 
> Monty
> 
> ANTLR & Java Consultant -- http://www.codetransform.com
> ANSI C/GCC transformation toolkit -- 
> http://www.codetransform.com/gcc.html
> Embrace the Decay -- http://www.codetransform.com/EmbraceDecay.html
> 
> On Aug 12, 2004, at 6:45 PM, ooobles wrote:
> 
> >
> > I have a tree parser which I'd like to automatically create basically
> > the same output tree with a few modifications. One of the changes is
> > to move a list of child AST's into a parent list.
> >
> > eg. I have token A:(B|C)*; and C:(B)*;
> >
> > A
> >   B
> >   C
> >     B
> >     B
> >   B
> >
> > I'd like to remove occurances of C and leave
> >
> > A
> >   B
> >   B
> >   B
> >   B
> >
> > with the children of B moved up to become children of A.
> >
> > I'm assuming this has a simple answer that I'm not seeing?
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >



 
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