title: Left Recursion in Grammar Results in Conflicts
body: <p>Throughout a Bison grammar I am using right recursion, and I have read that left recursion is better because it doesn't have to build the whole stack first.</p>
  
  <p>However, when I try to switch to left recursion on any of them, I always end up with a lot of conflicts, and I am not seeing why.</p>
  
  <p>Can anyone show me a generic example of where using left recursion instead of right causes a conflict (when the right recursion doesn't cause a conflict). Then what needs to be done when switching to left to correct such a conflict.  I think a fundamental example will help me more than just a correction of my own grammar.</p>
  
  <p><strong>Edit:</strong><br>
  But I guess I should include a particular example anyways, since my understand is a little less than complete :-) Changing 'list separator command' to 'command separator list' resolves the conflict.</p>
  
  <pre><code>State 9 conflicts: 3 shift/reduce
  
  
  Grammar
  
      0 $accept: input $end
  
      1 input: error NEWLINE
      2      | input NEWLINE
      3      | input list NEWLINE
      4      | /* empty */
  
      5 list: command
      6     | command separator
      7     | list separator command
  
      8 separator: SEMI
      9          | L_OR
     10          | L_AND
  
     11 command: variable_assignment
     12        | external_w_redir
     13        | external_w_redir AMP
     14        | pipeline
     15        | pipeline AMP
  
  ...
  
  state 9
  
      5 list: command .
      6     | command . separator
  
      SEMI   shift, and go to state 18
      L_AND  shift, and go to state 19
      L_OR   shift, and go to state 20
  
      SEMI      [reduce using rule 5 (list)]
      L_AND     [reduce using rule 5 (list)]
      L_OR      [reduce using rule 5 (list)]
      $default  reduce using rule 5 (list)
  
      separator  go to state 22
  </code></pre>