Rewrite the following SDT:
A->A {a} B | AB {b} | 0
B->B {c} A | BA {d} | 1
so that the underlying grammar becomes non-left-recursive. Here a, b, c and d are actions, and 0 and 1 are terminals
is my solution correct?
A→ 0A’
A’→ {a} BA’ | B {b} A’ | ε
B→ 1B’
B’→ {c} AB’ | A {d} B’ | ε