0

I have this grammar that has to be transformed to LL(1) grammar:

S->A
A->BC|DBC
B->Bb|epsilon
C->c|epsilon
D->a|b|d

After applying left recursion and left factoring to it, I get the grammar as below:

S->A
A->BCA'|epsilon
A'->D | epsilon
B->B'
B'->bB'|epsilon
C->c|epsilon
D->a|b|d

But the grammar is still ambiguous. Have I done something wrong?

eri
  • 109
  • 3
  • 9

0 Answers0