Rules never reduced 11 @2: /* empty */ State 10 conflicts: 1 reduce/reduce Grammar 0 $accept: program $end 1 program: statement_list 2 statement_list: statement_list statement 3 | statement 4 statement: if_stmt 5 | other_stmt 6 | stmt_block 7 stmt_block: '{' statement_list '}' 8 other_stmt: FOO ';' 9 @1: /* empty */ 10 if_stmt: IF EXPR @1 THEN stmt_block ELSE stmt_block 11 @2: /* empty */ 12 if_stmt: IF EXPR @2 THEN stmt_block Terminals, with rules where they appear $end (0) 0 ';' (59) 8 '{' (123) 7 '}' (125) 7 error (256) IF (258) 10 12 THEN (259) 10 12 ELSE (260) 10 FOO (261) 8 EXPR (262) 10 12 Nonterminals, with rules where they appear $accept (11) on left: 0 program (12) on left: 1, on right: 0 statement_list (13) on left: 2 3, on right: 1 2 7 statement (14) on left: 4 5 6, on right: 2 3 stmt_block (15) on left: 7, on right: 6 10 12 other_stmt (16) on left: 8, on right: 5 if_stmt (17) on left: 10 12, on right: 4 @1 (18) on left: 9, on right: 10 @2 (19) on left: 11, on right: 12 state 0 0 $accept: . program $end IF shift, and go to state 1 FOO shift, and go to state 2 '{' shift, and go to state 3 program go to state 4 statement_list go to state 5 statement go to state 6 stmt_block go to state 7 other_stmt go to state 8 if_stmt go to state 9 state 1 10 if_stmt: IF . EXPR @1 THEN stmt_block ELSE stmt_block 12 | IF . EXPR @2 THEN stmt_block EXPR shift, and go to state 10 state 2 8 other_stmt: FOO . ';' ';' shift, and go to state 11 state 3 7 stmt_block: '{' . statement_list '}' IF shift, and go to state 1 FOO shift, and go to state 2 '{' shift, and go to state 3 statement_list go to state 12 statement go to state 6 stmt_block go to state 7 other_stmt go to state 8 if_stmt go to state 9 state 4 0 $accept: program . $end $end shift, and go to state 13 state 5 1 program: statement_list . 2 statement_list: statement_list . statement IF shift, and go to state 1 FOO shift, and go to state 2 '{' shift, and go to state 3 $default reduce using rule 1 (program) statement go to state 14 stmt_block go to state 7 other_stmt go to state 8 if_stmt go to state 9 state 6 3 statement_list: statement . $default reduce using rule 3 (statement_list) state 7 6 statement: stmt_block . $default reduce using rule 6 (statement) state 8 5 statement: other_stmt . $default reduce using rule 5 (statement) state 9 4 statement: if_stmt . $default reduce using rule 4 (statement) state 10 10 if_stmt: IF EXPR . @1 THEN stmt_block ELSE stmt_block 12 | IF EXPR . @2 THEN stmt_block THEN reduce using rule 9 (@1) THEN [reduce using rule 11 (@2)] $default reduce using rule 9 (@1) @1 go to state 15 @2 go to state 16 state 11 8 other_stmt: FOO ';' . $default reduce using rule 8 (other_stmt) state 12 2 statement_list: statement_list . statement 7 stmt_block: '{' statement_list . '}' IF shift, and go to state 1 FOO shift, and go to state 2 '{' shift, and go to state 3 '}' shift, and go to state 17 statement go to state 14 stmt_block go to state 7 other_stmt go to state 8 if_stmt go to state 9 state 13 0 $accept: program $end . $default accept state 14 2 statement_list: statement_list statement . $default reduce using rule 2 (statement_list) state 15 10 if_stmt: IF EXPR @1 . THEN stmt_block ELSE stmt_block THEN shift, and go to state 18 state 16 12 if_stmt: IF EXPR @2 . THEN stmt_block THEN shift, and go to state 19 state 17 7 stmt_block: '{' statement_list '}' . $default reduce using rule 7 (stmt_block) state 18 10 if_stmt: IF EXPR @1 THEN . stmt_block ELSE stmt_block '{' shift, and go to state 3 stmt_block go to state 20 state 19 12 if_stmt: IF EXPR @2 THEN . stmt_block '{' shift, and go to state 3 stmt_block go to state 21 state 20 10 if_stmt: IF EXPR @1 THEN stmt_block . ELSE stmt_block ELSE shift, and go to state 22 state 21 12 if_stmt: IF EXPR @2 THEN stmt_block . $default reduce using rule 12 (if_stmt) state 22 10 if_stmt: IF EXPR @1 THEN stmt_block ELSE . stmt_block '{' shift, and go to state 3 stmt_block go to state 23 state 23 10 if_stmt: IF EXPR @1 THEN stmt_block ELSE stmt_block . $default reduce using rule 10 (if_stmt)