Consider the following grammar with terminal alphabet $\Sigma =\{a,(,),+,* \}$ and start symbol $E$. The production rules of the grammar are:
First $(E) = \{ a,( \}$
First $(A) = \{ +,*, \epsilon \}$
Follow $(E) =$ Follow $(A) =$ $\{$ $\$$ $,) \}$
LL(1) Parsing Table:
$$\begin{array}{|c|c|c|c|c|c|c|} \hline \textbf{} & \textbf{a} & \textbf{(} & \textbf{)} & \textbf{+} & \bf{*} & \textbf{\$} \\\hline \text{E} & \text{E} \rightarrow \text{aA} & \text{E} \rightarrow \text{(E)} & \text{} & \text{} & \text{} & \text{} \\\hline \text{A} & \text{}& \text{} & \text{A} \rightarrow \epsilon & \text{A} \rightarrow \text{+E} & \text{A} \rightarrow *\text{E} & \text{A} \rightarrow \epsilon \\\hline \end{array}$$
64.3k questions
77.9k answers
244k comments
80.0k users