I understood Left Recursive Grammar (LRG) and how to remove it.
But i dont know how to remove recursive grammar which combine both left and right recursive:
A -> aAb | c
The full question is construct parsing table of LL(1) grammar of this:
S -> aABb
A -> aAb | e (epsilon)
B -> bB | c
Asked
Active
Viewed 174 times
0

Fallen
- 1
- 2
-
1You cannot in general do that. Why would you want to? – rici Jan 04 '20 at 05:59
-
I have to caculate FIRST and FOLLOW of an grammar. S -> aABb ; A -> aAb | e ; B -> bB | c – Fallen Jan 04 '20 at 06:12
-
Would you show me the illegal way if possible ? – Fallen Jan 04 '20 at 06:14
-
There is no way to do it. But there is also no need to do it. – rici Jan 04 '20 at 06:30