write a C program to remove left recursion from single production.
Answers
Answered by
0
Explanation:
What is Left Factoring ?
Consider a part of regular grammar,
E->aE+bcD
E->aE+cBD
Here, grammar is non-left recursive, and unambiguous but there is left factoring.
How to resolve ?
E=aB | aC | aD | ............
then,
E=aX
X=B | C | D |...........
So, the above grammar will be as :
E=aE+X
X=bcD | cBD
HOPE IT HELPS UHH....PLZ MARK ME AS BRAINLIEST^_^
Similar questions
Math,
4 months ago
Math,
4 months ago
Physics,
4 months ago
Environmental Sciences,
9 months ago
Math,
9 months ago