2 votes 2 votes J -> Lx K -> Ly L -> J | K | f Whoever Answers Please Explain Methods solving such Questions . Compiler Design compiler-design parsing recurrence-relation grammar + – shekhar chauhan asked May 31, 2016 shekhar chauhan 1.0k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 3 votes 3 votes Here we have indirect left recursion. J -> Lx K -> Ly L -> J | K | f We can write it as, L - > Lx | Ly | f. Now to eliminate this left recursion, the general idea is to replace the productions. L - > fL' L' - > xL' | yL' | ∈ For more example you can see this. http://www.csd.uwo.ca/~moreno//CS447/Lectures/Syntax.html/node9.html vijaycs answered May 31, 2016 • selected Dec 17, 2016 by papesh vijaycs comment Share Follow See all 2 Comments See all 2 2 Comments reply papesh commented Dec 17, 2016 reply Follow Share J -> Lx K -> Ly L - > fL' L' - > xL' | yL' | ∈ This should be ans right?? 1 votes 1 votes vijaycs commented Dec 17, 2016 reply Follow Share ^yes, you are correct. (y). 0 votes 0 votes Please log in or register to add a comment.