title: Bison: Conflicts: 1 shift/reduce error
body: <p>I'm trying to build a parser with bison and have narrowed all my errors down to one difficult one.</p>
  
  <p>Here's the debug output of bison with the state where the error lies:</p>
  
  <pre><code>state 120
  
     12 statement_list: statement_list . SEMICOLON statement
     24 if_statement: IF conditional THEN statement_lists ELSE statement_list .
  
      SEMICOLON  shift, and go to state 50
  
      SEMICOLON  [reduce using rule 24 (if_statement)]
      $default   reduce using rule 24 (if_statement)
  </code></pre>
  
  <p>Here are the translation rules in the parser.y source</p>
  
  <pre><code>%%
  
  program              : ID COLON block ENDP ID POINT
                       ;
  block                : CODE statement_list
                       | DECLARATIONS declaration_block CODE statement_list
                       ;
  declaration_block    : id_list OF TYPE type SEMICOLON
                       | declaration_block id_list OF TYPE type SEMICOLON
                       ;
  id_list              : ID
                       | ID COMMA id_list
                       ;
  type                 : CHARACTER
                       | INTEGER
                       | REAL
                       ;
  statement_list       : statement
                       | statement_list SEMICOLON statement
                       ;
  statement_lists      : statement
                       | statement_list SEMICOLON statement
                       ;
  statement            : assignment_statement
                       | if_statement
                       | do_statement
                       | while_statement
                       | for_statement
                       | write_statement
                       | read_statement
                       ;
  assignment_statement : expression OUTPUTTO ID
                       ;
  if_statement         : IF conditional THEN statement_lists ENDIF
                       | IF conditional THEN statement_lists ELSE statement_list
                       ;
  do_statement         : DO statement_list WHILE conditional ENDDO
                       ;
  while_statement      : WHILE conditional DO statement_list ENDWHILE
                       ;
  for_statement        : FOR ID IS expression BY expressions TO expression DO statement_list ENDFOR
                       ;
  write_statement      : WRITE BRA output_list KET
                       | NEWLINE
                       ;
  read_statement       : READ BRA ID KET
                       ;
  output_list          : value
                       | value COMMA output_list
                       ;
  condition            : expression comparator expression
                       ;
  conditional          : condition
                       | NOT conditional
                       | condition AND conditional
                       | condition OR conditional
                       ;
  comparator           : ASSIGNMENT
                       | BETWEEN
                       | LT
                       | GT
                       | LESSEQUAL
                       | GREATEREQUAL
                       ;
  expression           : term
                       | term PLUS expression
                       | term MINUS expression
                       ;
  expressions          : term
                       | term PLUS expressions
                       | term MINUS expressions
                       ;
  term                 : value
                       | value MULTIPLY term
                       | value DIVIDE term
                       ;
  value                : ID
                       | constant
                       | BRA expression KET
                       ;
  constant             : number_constant
                       | CHARCONST
                       ;
  number_constant      : NUMBER
                       | MINUS NUMBER
                       | NUMBER POINT NUMBER
                       | MINUS NUMBER POINT NUMBER
                       ;              
  %%
  </code></pre>
  
  <p>When I remove the if_statement rule there are no errors, so I've narrowed it down considerably, but still can't solve the error.</p>
  
  <p>Thanks for any help.</p>