Eliminating Left Recursion

SyntaxEditor for Windows Forms Forum

Posted 12 years ago by amit
Version: 4.0.0250
Avatar
Hi,

I have been searching for how to eliminate left recursion and have found loads of literature on the internet. This topic seems not so complicated to me as is presented in the literature. So I am confused about my implementation. Here is a prototype where i am eliminating the left recursion. Can someone plz tell me whether i am doing mistake or not.

(A and B represent Non-Terminals. a, b, and c represent Terminals.)

The resursive production rule is shown below.

A:
B |
A a |
A b |
A c
;

And the corresponding non-recursive iterative rule that i understand is -

A: B { a | b | c }

Is something wrong with my understanding ? If someone throws some light on this topic, it will be of great help for me.

regards
Amit

Comments (1)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
It looks like what you have is correct.


Actipro Software Support

The latest build of this product (v2020.1 build 0400) was released 4 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.