Left RecursionΒΆ

We should eliminate the left recursion without changing the language.

\[A \rightarrow A \alpha \: \ \beta\]

The language the above generates is \(\beta \alpha^*\) The above representation is not in the grammar form.

We can convert the above language to left recursive form like this.

\[ \begin{align}\begin{aligned}A \rightarrow \: \beta A'\\A' \rightarrow \: \epsilon | \alpha A'\end{aligned}\end{align} \]