# Tag Info

1

No, it's not possible in general. There's no guarantee that a regular expression be LL(1), not even the simplified form of regular expressions required by that exercise, and the example you provide is a perfect illustration. To be LL(1), it must be possible to work out which production to match based only on the parse up to that point and the first symbol in ...

1

The question is: given the grammar \begin{align}\textit{List}&\to \textbf{elt}\ \textit{List}\\ \textit{List}&\to \textbf{elt} \end{align} and the input $$\textbf{elt elt elt}$$ Why doesn't the parser immediately reduce $$\textit{List}\to \textbf{elt}$$ Suppose that it did. You would then have $$\textit{List}\textbf{ elt elt}$$ Now what? No ...

2

All of the grammars in your first figure are context-free grammars. That text seems to identify grammar with context-free grammar.

Top 50 recent answers are included