&gt; an example grammar and text on which a left-recursive production doesn&#x27;t terminate<p>All grammars with left recursion have this problem. The parser has no lookahead (and even if it did, the required lookahead to avoid this is unboundedly large) -- you can&#x27;t tell, given your input, whether you should recurse or not.<p>Here&#x27;s a pretty simple grammar:<p><pre><code>    S -&gt; A
    A -&gt; a
    A -&gt; A B (this is left recursion, a rule for producing A that itself begins with A)
    B -&gt; b
</code></pre>
The language matches the same strings as the regular expression (a|ab+), that is, a single a followed by zero or more b&#x27;s.<p>So, suppose you&#x27;re the parser. You begin with the start rule, which tells you to expect an A. For the A, you have two choices: recur via the rule A -&gt; A B, or stop recurring and process a literal a. You see the input &quot;a&quot;. How can you know which to do?<p>Compare the analogous right-recursive grammar, which matches (a|b+a):<p><pre><code>    S -&gt; A
    A -&gt; a
    A -&gt; B A
    B -&gt; b
</code></pre>
Here, you start out expecting an A. When you see the input &quot;a&quot;, you know that the only way to make sense of it is to invoke the rule &quot;A -&gt; a&quot;, which is a terminal rule. And when you see the input &quot;b&quot;, you know the only thing you can do is invoke the rule &quot;A -&gt; B A&quot;, since that is the only rule allowing an A to begin with &quot;b&quot;.<p>edit: replaced regexes involving * with uglier regexes using disjunction and +, since HN doesn&#x27;t allow asterisks in most normal uses.