title: how to solve shift-reduce conflict in yacc
body: <p>I wrote the c-minor compiler with <code>yacc</code> and it now says it has 2 shift-reduce conflict and it shows these 2 lines:  </p>
  
  <blockquote>
    <p>line has var '-='<br>
          line has var '+='</p>
  </blockquote>
  
  <pre><code>expression : var '=' expression 
              |var '+=' expression
              |var '−=' expression
              |simple_expression
              ;
  var :ID
      |ID '[' expression ']'
      ;
  </code></pre>
  
  <p>How can I solve it?</p>