Rules never reduced 16 @4: /* empty */ State 12 conflicts: 1 reduce/reduce State 35 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 stmt_block: '{' statement_list '}' 6 other_stmt: FOO 7 | stmt_block 8 if_stmt: matched_if_stmt 9 | open_if_stmt 10 @1: /* empty */ 11 @2: /* empty */ 12 matched_if_stmt: IF EXPR @1 THEN matched_if_stmt ELSE @2 matched_if_stmt 13 | other_stmt 14 @3: /* empty */ 15 open_if_stmt: IF EXPR @3 THEN if_stmt 16 @4: /* empty */ 17 @5: /* empty */ 18 open_if_stmt: IF EXPR @4 THEN matched_if_stmt ELSE @5 open_if_stmt Terminals, with rules where they appear $end (0) 0 '{' (123) 5 '}' (125) 5 error (256) IF (258) 12 15 18 THEN (259) 12 15 18 ELSE (260) 12 18 FOO (261) 6 EXPR (262) 12 15 18 Nonterminals, with rules where they appear $accept (10) on left: 0 program (11) on left: 1, on right: 0 statement_list (12) on left: 2 3, on right: 1 2 5 statement (13) on left: 4, on right: 2 3 stmt_block (14) on left: 5, on right: 7 other_stmt (15) on left: 6 7, on right: 13 if_stmt (16) on left: 8 9, on right: 4 15 matched_if_stmt (17) on left: 12 13, on right: 8 12 18 @1 (18) on left: 10, on right: 12 @2 (19) on left: 11, on right: 12 open_if_stmt (20) on left: 15 18, on right: 9 18 @3 (21) on left: 14, on right: 15 @4 (22) on left: 16, on right: 18 @5 (23) on left: 17, on right: 18 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 matched_if_stmt go to state 10 open_if_stmt go to state 11 state 1 12 matched_if_stmt: IF . EXPR @1 THEN matched_if_stmt ELSE @2 matched_if_stmt 15 open_if_stmt: IF . EXPR @3 THEN if_stmt 18 | IF . EXPR @4 THEN matched_if_stmt ELSE @5 open_if_stmt EXPR shift, and go to state 12 state 2 6 other_stmt: FOO . $default reduce using rule 6 (other_stmt) state 3 5 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 13 statement go to state 6 stmt_block go to state 7 other_stmt go to state 8 if_stmt go to state 9 matched_if_stmt go to state 10 open_if_stmt go to state 11 state 4 0 $accept: program . $end $end shift, and go to state 14 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 15 stmt_block go to state 7 other_stmt go to state 8 if_stmt go to state 9 matched_if_stmt go to state 10 open_if_stmt go to state 11 state 6 3 statement_list: statement . $default reduce using rule 3 (statement_list) state 7 7 other_stmt: stmt_block . $default reduce using rule 7 (other_stmt) state 8 13 matched_if_stmt: other_stmt . $default reduce using rule 13 (matched_if_stmt) state 9 4 statement: if_stmt . $default reduce using rule 4 (statement) state 10 8 if_stmt: matched_if_stmt . $default reduce using rule 8 (if_stmt) state 11 9 if_stmt: open_if_stmt . $default reduce using rule 9 (if_stmt) state 12 12 matched_if_stmt: IF EXPR . @1 THEN matched_if_stmt ELSE @2 matched_if_stmt 15 open_if_stmt: IF EXPR . @3 THEN if_stmt 18 | IF EXPR . @4 THEN matched_if_stmt ELSE @5 open_if_stmt THEN reduce using rule 10 (@1) THEN [reduce using rule 14 (@3)] THEN [reduce using rule 16 (@4)] $default reduce using rule 10 (@1) @1 go to state 16 @3 go to state 17 @4 go to state 18 state 13 2 statement_list: statement_list . statement 5 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 19 statement go to state 15 stmt_block go to state 7 other_stmt go to state 8 if_stmt go to state 9 matched_if_stmt go to state 10 open_if_stmt go to state 11 state 14 0 $accept: program $end . $default accept state 15 2 statement_list: statement_list statement . $default reduce using rule 2 (statement_list) state 16 12 matched_if_stmt: IF EXPR @1 . THEN matched_if_stmt ELSE @2 matched_if_stmt THEN shift, and go to state 20 state 17 15 open_if_stmt: IF EXPR @3 . THEN if_stmt THEN shift, and go to state 21 state 18 18 open_if_stmt: IF EXPR @4 . THEN matched_if_stmt ELSE @5 open_if_stmt THEN shift, and go to state 22 state 19 5 stmt_block: '{' statement_list '}' . $default reduce using rule 5 (stmt_block) state 20 12 matched_if_stmt: IF EXPR @1 THEN . matched_if_stmt ELSE @2 matched_if_stmt IF shift, and go to state 23 FOO shift, and go to state 2 '{' shift, and go to state 3 stmt_block go to state 7 other_stmt go to state 8 matched_if_stmt go to state 24 state 21 15 open_if_stmt: IF EXPR @3 THEN . if_stmt IF shift, and go to state 1 FOO shift, and go to state 2 '{' shift, and go to state 3 stmt_block go to state 7 other_stmt go to state 8 if_stmt go to state 25 matched_if_stmt go to state 10 open_if_stmt go to state 11 state 22 18 open_if_stmt: IF EXPR @4 THEN . matched_if_stmt ELSE @5 open_if_stmt IF shift, and go to state 23 FOO shift, and go to state 2 '{' shift, and go to state 3 stmt_block go to state 7 other_stmt go to state 8 matched_if_stmt go to state 26 state 23 12 matched_if_stmt: IF . EXPR @1 THEN matched_if_stmt ELSE @2 matched_if_stmt EXPR shift, and go to state 27 state 24 12 matched_if_stmt: IF EXPR @1 THEN matched_if_stmt . ELSE @2 matched_if_stmt ELSE shift, and go to state 28 state 25 15 open_if_stmt: IF EXPR @3 THEN if_stmt . $default reduce using rule 15 (open_if_stmt) state 26 18 open_if_stmt: IF EXPR @4 THEN matched_if_stmt . ELSE @5 open_if_stmt ELSE shift, and go to state 29 state 27 12 matched_if_stmt: IF EXPR . @1 THEN matched_if_stmt ELSE @2 matched_if_stmt $default reduce using rule 10 (@1) @1 go to state 16 state 28 12 matched_if_stmt: IF EXPR @1 THEN matched_if_stmt ELSE . @2 matched_if_stmt $default reduce using rule 11 (@2) @2 go to state 30 state 29 18 open_if_stmt: IF EXPR @4 THEN matched_if_stmt ELSE . @5 open_if_stmt $default reduce using rule 17 (@5) @5 go to state 31 state 30 12 matched_if_stmt: IF EXPR @1 THEN matched_if_stmt ELSE @2 . matched_if_stmt IF shift, and go to state 23 FOO shift, and go to state 2 '{' shift, and go to state 3 stmt_block go to state 7 other_stmt go to state 8 matched_if_stmt go to state 32 state 31 18 open_if_stmt: IF EXPR @4 THEN matched_if_stmt ELSE @5 . open_if_stmt IF shift, and go to state 33 open_if_stmt go to state 34 state 32 12 matched_if_stmt: IF EXPR @1 THEN matched_if_stmt ELSE @2 matched_if_stmt . $default reduce using rule 12 (matched_if_stmt) state 33 15 open_if_stmt: IF . EXPR @3 THEN if_stmt 18 | IF . EXPR @4 THEN matched_if_stmt ELSE @5 open_if_stmt EXPR shift, and go to state 35 state 34 18 open_if_stmt: IF EXPR @4 THEN matched_if_stmt ELSE @5 open_if_stmt . $default reduce using rule 18 (open_if_stmt) state 35 15 open_if_stmt: IF EXPR . @3 THEN if_stmt 18 | IF EXPR . @4 THEN matched_if_stmt ELSE @5 open_if_stmt THEN reduce using rule 14 (@3) THEN [reduce using rule 16 (@4)] $default reduce using rule 14 (@3) @3 go to state 17 @4 go to state 18