[antlr-interest] tree transformation in Parser PLEASE
Gregor Pardella
pardella at informatik.uni-bonn.de
Fri Aug 26 06:16:53 PDT 2005
Hello group,
Does nobody have an idea?? Or is the problem just too difficult to
handle?
With kind regards
Gregor Pardella
On Wed, Aug 24, 2005 at 06:41:21PM +0200, Gregor Pardella wrote:
> Hello,
>
> maybe someone is able to help me - I become desperate.
>
> My parser is able to parse a statement like this one:
>
> a = b = c = 4;
>
> and it generates a tree that looks like:
>
> <ROOT>
> |_ =
> |_ a
> |_ =
> |_ b
> |_ =
> |_ c
> |_ 4
>
> after finishing the expression rules.
>
> Does anybody have an idea how to transform this tree
> so
> that it looks like this one:
>
> <ROOT>
> |_ =
> | |_ a
> | |_ 4
> |
> |_ =
> | |_ b
> | |_ 4
> |
> |_ =
> |_ c
> |_ 4
>
> or
>
> <ROOT>
> |_ =
> | |_ c
> | |_ 4
> |
> |_ =
> | |_ b
> | |_ c
> |
> |_ =
> |_ a
> |_ b
>
>
> In other terms I want to flat the multi-assignment.
>
> Or does anybody have an idea how to flatten
> multi-assignments in another way?
>
> Please help!
>
> Thanks
> Gregor Pardella
>
>
>
>
>
>
> ___________________________________________________________
> Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
--
More information about the antlr-interest
mailing list