12 views

Rewrite the following SDT:

• $A\rightarrow A\{a\}B\mid AB\{b\}\mid 0$
• $B\rightarrow B\{c\}A\mid BA\{d\}\mid 1$

so that the underlying grammar becomes non-left-recursive. Here, $a, b, c$, and $d$ are actions, and $0$ and $1$ are terminals.

| 12 views