[antlr-interest] Re: Tree Parser and removing nodes.
ooobles
oobles at hotmail.com
Thu Aug 12 19:13:18 PDT 2004
I just realised that HTML doesn't draw trees very well. The trees
below were supposed to look like.
A
|-B
|-C
| |-B
| |-B
|-B
and
A
|-B
|-B
|-B
|-B
I want to write a tree parser which will construct the second AST from
the first AST.
Thanks again,
David.
>
> 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
<*> 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