|Help needed with grammar problem firstname.lastname@example.org (2003-03-09)|
|Re: Help needed with grammar problem email@example.com (2003-03-14)|
|From:||firstname.lastname@example.org (Yuval Mishory)|
|Date:||9 Mar 2003 17:29:40 -0500|
|Posted-Date:||09 Mar 2003 17:29:40 EST|
I'm facing a problem:
Among other rules, I have a syntax rule that goes E -> E R E , which
is of course a left recursion. now, this syntax rule is supposed to be
interpreted into a syntax subtree that is supposed to be binary and
created preorder, meaning I'd like the lefthand side E to become a
node of type R, which has two 'sons' of type E (each of which may
become another R itself and so on).
Simple left recursion elimination algorithms can't help me here,
because eventually it still comes down to inorder processing, which
gives me a non-binary tree (E may become a single node, three nodes,
five nodes and so on).
Return to the
Search the comp.compilers archives again.