Conflict in state 18 between rule 7 and token '+' resolved as reduce. Conflict in state 18 between rule 7 and token '*' resolved as shift. Conflict in state 19 between rule 8 and token '+' resolved as reduce. Conflict in state 19 between rule 8 and token '*' resolved as reduce. State 17 contains 1 shift/reduce conflict. Grammar rule 1 program -> stmt_list rule 2 stmt_list -> stmt_list stmt rule 3 stmt_list -> stmt rule 4 stmt -> ID '=' expr ';' rule 5 stmt -> IF expr THEN stmt rule 6 stmt -> IF expr THEN stmt ELSE stmt rule 7 expr -> expr '+' expr rule 8 expr -> expr '*' expr rule 9 expr -> '(' expr ')' rule 10 expr -> ID rule 11 expr -> INT_CONST %left '+' %left '*' state 0 IF shift, and go to state 1 ID shift, and go to state 2 program go to state 23 stmt_list go to state 3 stmt go to state 4 state 1 stmt -> IF . expr THEN stmt (rule 5) stmt -> IF . expr THEN stmt ELSE stmt (rule 6) ID shift, and go to state 5 INT_CONST shift, and go to state 6 '(' shift, and go to state 7 expr go to state 8 state 2 stmt -> ID . '=' expr ';' (rule 4) '=' shift, and go to state 9 state 3 program -> stmt_list . (rule 1) stmt_list -> stmt_list . stmt (rule 2) IF shift, and go to state 1 ID shift, and go to state 2 $default reduce using rule 1 (program) stmt go to state 10 state 4 stmt_list -> stmt . (rule 3) $default reduce using rule 3 (stmt_list) state 5 expr -> ID . (rule 10) $default reduce using rule 10 (expr) state 6 expr -> INT_CONST . (rule 11) $default reduce using rule 11 (expr) state 7 expr -> '(' . expr ')' (rule 9) ID shift, and go to state 5 INT_CONST shift, and go to state 6 '(' shift, and go to state 7 expr go to state 11 state 8 stmt -> IF expr . THEN stmt (rule 5) stmt -> IF expr . THEN stmt ELSE stmt (rule 6) expr -> expr . '+' expr (rule 7) expr -> expr . '*' expr (rule 8) THEN shift, and go to state 12 '+' shift, and go to state 13 '*' shift, and go to state 14 state 9 stmt -> ID '=' . expr ';' (rule 4) ID shift, and go to state 5 INT_CONST shift, and go to state 6 '(' shift, and go to state 7 expr go to state 15 state 10 stmt_list -> stmt_list stmt . (rule 2) $default reduce using rule 2 (stmt_list) state 11 expr -> expr . '+' expr (rule 7) expr -> expr . '*' expr (rule 8) expr -> '(' expr . ')' (rule 9) '+' shift, and go to state 13 '*' shift, and go to state 14 ')' shift, and go to state 16 state 12 stmt -> IF expr THEN . stmt (rule 5) stmt -> IF expr THEN . stmt ELSE stmt (rule 6) IF shift, and go to state 1 ID shift, and go to state 2 stmt go to state 17 state 13 expr -> expr '+' . expr (rule 7) ID shift, and go to state 5 INT_CONST shift, and go to state 6 '(' shift, and go to state 7 expr go to state 18 state 14 expr -> expr '*' . expr (rule 8) ID shift, and go to state 5 INT_CONST shift, and go to state 6 '(' shift, and go to state 7 expr go to state 19 state 15 stmt -> ID '=' expr . ';' (rule 4) expr -> expr . '+' expr (rule 7) expr -> expr . '*' expr (rule 8) '+' shift, and go to state 13 '*' shift, and go to state 14 ';' shift, and go to state 20 state 16 expr -> '(' expr ')' . (rule 9) $default reduce using rule 9 (expr) state 17 stmt -> IF expr THEN stmt . (rule 5) stmt -> IF expr THEN stmt . ELSE stmt (rule 6) ELSE shift, and go to state 21 ELSE [reduce using rule 5 (stmt)] $default reduce using rule 5 (stmt) state 18 expr -> expr . '+' expr (rule 7) expr -> expr '+' expr . (rule 7) expr -> expr . '*' expr (rule 8) # '+' shift, and go to state 13 IGNORED '*' shift, and go to state 14 '+' reduce using rule 7 (expr) # '*' reduce using rule 7 (expr) IGNORED $default reduce using rule 7 (expr) state 19 expr -> expr . '+' expr (rule 7) expr -> expr . '*' expr (rule 8) expr -> expr '*' expr . (rule 8) # '+' shift, and go to state 13 IGNORED # '*' shift, and go to state 14 IGNORED $default reduce using rule 8 (expr) state 20 stmt -> ID '=' expr ';' . (rule 4) $default reduce using rule 4 (stmt) state 21 stmt -> IF expr THEN stmt ELSE . stmt (rule 6) IF shift, and go to state 1 ID shift, and go to state 2 stmt go to state 22 state 22 stmt -> IF expr THEN stmt ELSE stmt . (rule 6) $default reduce using rule 6 (stmt) state 23 $ go to state 24 state 24 $ go to state 25 state 25 $default accept