Click here to return to the main menu.
State 0: Click here for state 0 without closure items 4: assgnStmt: . ID ':=' expr 0: $S: . program <EOF> 1: program: . stmts 2: stmts: . assgnStmt 3: stmts: . assgnStmt ';' stmts GOTO 2 on program GOTO 3 on stmts GOTO 4 on assgnStmt SHIFT 1 on ID DEFAULT: Error State 1: Click here for state 1 without closure items 4: assgnStmt: ID . ':=' expr SHIFT 5 on ':=' DEFAULT: Error State 2: Click here for state 2 without closure items 0: $S: program . <EOF> SHIFT 6 on <EOF> DEFAULT: Error State 3: Click here for state 3 without closure items 1: program: stmts . DEFAULT: REDUCE 1 (program) State 4: Click here for state 4 without closure items 2: stmts: assgnStmt . 3: stmts: assgnStmt . ';' stmts SHIFT 7 on ';' DEFAULT: REDUCE 2 (stmts) State 5: Click here for state 5 without closure items 13: factor: . '(' expr ')' 14: factor: . ID 15: factor: . NUM 4: assgnStmt: ID ':=' . expr 5: expr: . expr '+' term 6: expr: . expr '-' term 7: expr: . term 8: term: . term '*' factor 9: term: . term '/' factor 10: term: . term 'div' factor 11: term: . term 'mod' factor 12: term: . factor GOTO 11 on expr GOTO 12 on term GOTO 13 on factor SHIFT 9 on ID SHIFT 10 on NUM SHIFT 8 on '(' DEFAULT: Error State 6: Click here for state 6 without closure items 0: $S: program <EOF> . DEFAULT: REDUCE 0 ($S) State 7: Click here for state 7 without closure items 4: assgnStmt: . ID ':=' expr 3: stmts: assgnStmt ';' . stmts 2: stmts: . assgnStmt 3: stmts: . assgnStmt ';' stmts GOTO 14 on stmts GOTO 4 on assgnStmt SHIFT 1 on ID DEFAULT: Error State 8: Click here for state 8 without closure items 13: factor: . '(' expr ')' 14: factor: . ID 15: factor: . NUM 13: factor: '(' . expr ')' 5: expr: . expr '+' term 6: expr: . expr '-' term 7: expr: . term 8: term: . term '*' factor 9: term: . term '/' factor 10: term: . term 'div' factor 11: term: . term 'mod' factor 12: term: . factor GOTO 15 on expr GOTO 12 on term GOTO 13 on factor SHIFT 9 on ID SHIFT 10 on NUM SHIFT 8 on '(' DEFAULT: Error State 9: Click here for state 9 without closure items 14: factor: ID . DEFAULT: REDUCE 14 (factor) State 10: Click here for state 10 without closure items 15: factor: NUM . DEFAULT: REDUCE 15 (factor) State 11: Click here for state 11 without closure items 4: assgnStmt: ID ':=' expr . 5: expr: expr . '+' term 6: expr: expr . '-' term SHIFT 16 on '+' SHIFT 17 on '-' DEFAULT: REDUCE 4 (assgnStmt) State 12: Click here for state 12 without closure items 7: expr: term . 8: term: term . '*' factor 9: term: term . '/' factor 10: term: term . 'div' factor 11: term: term . 'mod' factor SHIFT 21 on 'mod' SHIFT 20 on 'div' SHIFT 18 on '*' SHIFT 19 on '/' DEFAULT: REDUCE 7 (expr) State 13: Click here for state 13 without closure items 12: term: factor . DEFAULT: REDUCE 12 (term) State 14: Click here for state 14 without closure items 3: stmts: assgnStmt ';' stmts . DEFAULT: REDUCE 3 (stmts) State 15: Click here for state 15 without closure items 13: factor: '(' expr . ')' 5: expr: expr . '+' term 6: expr: expr . '-' term SHIFT 16 on '+' SHIFT 17 on '-' SHIFT 22 on ')' DEFAULT: Error State 16: Click here for state 16 without closure items 13: factor: . '(' expr ')' 14: factor: . ID 15: factor: . NUM 5: expr: expr '+' . term 8: term: . term '*' factor 9: term: . term '/' factor 10: term: . term 'div' factor 11: term: . term 'mod' factor 12: term: . factor GOTO 23 on term GOTO 13 on factor SHIFT 9 on ID SHIFT 10 on NUM SHIFT 8 on '(' DEFAULT: Error State 17: Click here for state 17 without closure items 13: factor: . '(' expr ')' 14: factor: . ID 15: factor: . NUM 6: expr: expr '-' . term 8: term: . term '*' factor 9: term: . term '/' factor 10: term: . term 'div' factor 11: term: . term 'mod' factor 12: term: . factor GOTO 24 on term GOTO 13 on factor SHIFT 9 on ID SHIFT 10 on NUM SHIFT 8 on '(' DEFAULT: Error State 18: Click here for state 18 without closure items 13: factor: . '(' expr ')' 14: factor: . ID 15: factor: . NUM 8: term: term '*' . factor GOTO 25 on factor SHIFT 9 on ID SHIFT 10 on NUM SHIFT 8 on '(' DEFAULT: Error State 19: Click here for state 19 without closure items 13: factor: . '(' expr ')' 14: factor: . ID 15: factor: . NUM 9: term: term '/' . factor GOTO 26 on factor SHIFT 9 on ID SHIFT 10 on NUM SHIFT 8 on '(' DEFAULT: Error State 20: Click here for state 20 without closure items 13: factor: . '(' expr ')' 14: factor: . ID 15: factor: . NUM 10: term: term 'div' . factor GOTO 27 on factor SHIFT 9 on ID SHIFT 10 on NUM SHIFT 8 on '(' DEFAULT: Error State 21: Click here for state 21 without closure items 13: factor: . '(' expr ')' 14: factor: . ID 15: factor: . NUM 11: term: term 'mod' . factor GOTO 28 on factor SHIFT 9 on ID SHIFT 10 on NUM SHIFT 8 on '(' DEFAULT: Error State 22: Click here for state 22 without closure items 13: factor: '(' expr ')' . DEFAULT: REDUCE 13 (factor) State 23: Click here for state 23 without closure items 5: expr: expr '+' term . 8: term: term . '*' factor 9: term: term . '/' factor 10: term: term . 'div' factor 11: term: term . 'mod' factor SHIFT 21 on 'mod' SHIFT 20 on 'div' SHIFT 18 on '*' SHIFT 19 on '/' DEFAULT: REDUCE 5 (expr) State 24: Click here for state 24 without closure items 6: expr: expr '-' term . 8: term: term . '*' factor 9: term: term . '/' factor 10: term: term . 'div' factor 11: term: term . 'mod' factor SHIFT 21 on 'mod' SHIFT 20 on 'div' SHIFT 18 on '*' SHIFT 19 on '/' DEFAULT: REDUCE 6 (expr) State 25: Click here for state 25 without closure items 8: term: term '*' factor . DEFAULT: REDUCE 8 (term) State 26: Click here for state 26 without closure items 9: term: term '/' factor . DEFAULT: REDUCE 9 (term) State 27: Click here for state 27 without closure items 10: term: term 'div' factor . DEFAULT: REDUCE 10 (term) State 28: Click here for state 28 without closure items 11: term: term 'mod' factor . DEFAULT: REDUCE 11 (term)
Click here to return to the main menu.