title: How to eliminate left recursion in context-free grammar?
body: <p>How would I eliminate the left recursion in this CFG?</p>
  
  <pre><code>&lt;RE&gt; -&gt; &lt;RE&gt;'|'&lt;CONCAT&gt; | &lt;CONCAT&gt;
  &lt;CONCAT&gt; -&gt; &lt;CONCAT&gt;&lt;KLEEN&gt; | &lt;KLEEN&gt;
  &lt;KLEEN&gt; -&gt; &lt;KLEEN&gt;'*' | &lt;ELEM&gt;
  &lt;ELEM&gt; -&gt; 'a' | 'b' | 'c' | 'd' | '('&lt;RE&gt;')'
  </code></pre>