In this example, you can just pull it up:
L -> Aa | Bb | Laa
A -> aa
B -> bBb | ba
문제
I'm trying to solve the problem to write this CFG into an LL(1) parse table. However, the problem is that it has cyclic left recursion between L/A and I can't find any resources that explain how to do this.
Here is the CFG in question:
L -> Aa | Bb
A -> La | aa
B -> bBb | ba
Can anyone help explain how to remove this cycle from the grammar? Thanks!
올바른 솔루션이 없습니다
다른 팁
In this example, you can just pull it up:
L -> Aa | Bb | Laa
A -> aa
B -> bBb | ba