2 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 103 270 571 1.1k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 3 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 41 92 275 comment Share Follow See all 2 Comments See all 2 2 Comments reply papesh 107 147 264 commented Dec 17, 2016 reply Follow flag J -> Lx K -> Ly L - > fL' L' - > xL' | yL' | ∈ This should be ans right?? 1 1 reply Share vijaycs 41 92 275 commented Dec 17, 2016 reply Follow flag ^yes, you are correct. (y). 0 0 reply Share Please log in or register to add a comment.