title: How to solve SHIFT/REDUCE conflict - in parser generator
body: <p>I need help to solve this one and explanation how to deal with this SHIFT/REDUCE CONFLICTS in future.</p>
  
  <p>I have some conflicts between few states in my cup file.</p>
  
  <p>Grammer look like this:</p>
  
  <p>I have conflicts between "(" [ActPars] ")" states.</p>
  
  <pre><code>1. Statement = Designator ("=" Expr | "++" | "‐‐" | "(" [ActPars] ")" ) ";"
  
  2. Factor = number | charConst | Designator [ "(" [ActPars] ")" ].
  </code></pre>
  
  <hr>
  
  <p>I don't want to paste whole 700 lines of cup file. 
  I will give you the relevant states and error output.</p>
  
  <p>This is code for the line 1.)</p>
  
  <pre><code>Matched ::= Designator LPAREN ActParamsList RPAREN SEMI_COMMA
  
  ActParamsList ::=  ActPars
                 |
                 /* EPS */
                 ;
  
  ActPars ::= Expr
          |
          Expr ActPComma
          ;
  
  ActPComma ::= COMMA ActPars;    
  </code></pre>
  
  <p>This is for the line 2.)</p>
  
  <pre><code>Factor ::= Designator ActParamsOptional ;
  
  
  ActParamsOptional ::= LPAREN ActParamsList2 RPAREN
                |
                /* EPS */
                ;
  
  ActParamsList2 ::= ActPars
                 |
                 /* EPS */
                 ;
  
  Expr ::= SUBSTRACT Term RepOptionalExpression
           |
           Term RepOptionalExpression
           ;
  </code></pre>
  
  <p><strong>The ERROR output looks like this:</strong></p>
  
  <pre><code>Warning : *** Shift/Reduce conflict found in state #182
  between ActParamsOptional ::= LPAREN ActParamsList RPAREN (*) 
  and     Matched ::= Designator LPAREN ActParamsList RPAREN (*) SEMI_COMMA 
  under symbol SEMI_COMMA
  Resolved in favor of shifting.
  </code></pre>
  
  <p>Error : <em>*</em> More conflicts encountered than expected -- parser generation aborted</p>