Grammar 0 $accept: unit "end of file" 1 unit: states 2 | unit states 3 states: statement "\n" 4 | "\n" 5 statement: "end" 6 | assign 7 | "if" comp_expr "then" 8 | "else" 9 | "endif" 10 | "for" assign "to" expr "step" expr 11 | "for" assign "to" expr 12 | "next" 13 | "while" comp_expr 14 | "wend" 15 | "print" args 16 | error 17 assign: value '=' expr 18 comp_expr: expr "==" expr 19 | expr "!=" expr 20 | expr '>' expr 21 | expr ">=" expr 22 | expr '<' expr 23 | expr "<=" expr 24 expr: expr '-' expr 25 | expr '+' expr 26 | expr '*' expr 27 | expr '/' expr 28 | expr '%' expr 29 | '-' expr 30 | '(' expr ')' 31 | value 32 | "ival" 33 | "rand" '(' expr ')' 34 value: "identifier" 35 args: expr 36 | args ',' expr Terminals, with rules where they appear "end of file" (0) 0 '%' (37) 28 '(' (40) 30 33 ')' (41) 30 33 '*' (42) 26 '+' (43) 25 ',' (44) 36 '-' (45) 24 29 '/' (47) 27 '<' (60) 22 '=' (61) 17 '>' (62) 20 error (256) 16 "ival" (258) 32 "identifier" (259) 34 "==" (260) 18 "!=" (261) 19 ">=" (262) 21 "<=" (263) 23 "\n" (264) 3 4 "if" (265) 7 "then" (266) 7 "else" (267) 8 "endif" (268) 9 "for" (269) 10 11 "to" (270) 10 11 "next" (271) 12 "while" (272) 13 "wend" (273) 14 "end" (274) 5 "rand" (275) 33 "print" (276) 15 NEG (277) "step" (278) 10 Nonterminals, with rules where they appear $accept (35) on left: 0 unit (36) on left: 1 2, on right: 0 2 states (37) on left: 3 4, on right: 1 2 statement (38) on left: 5 6 7 8 9 10 11 12 13 14 15 16, on right: 3 assign (39) on left: 17, on right: 6 10 11 comp_expr (40) on left: 18 19 20 21 22 23, on right: 7 13 expr (41) on left: 24 25 26 27 28 29 30 31 32 33, on right: 10 11 17 18 19 20 21 22 23 24 25 26 27 28 29 30 33 35 36 value (42) on left: 34, on right: 17 31 args (43) on left: 35 36, on right: 15 36 state 0 0 $accept: . unit "end of file" 1 unit: . states 2 | . unit states 3 states: . statement "\n" 4 | . "\n" 5 statement: . "end" 6 | . assign 7 | . "if" comp_expr "then" 8 | . "else" 9 | . "endif" 10 | . "for" assign "to" expr "step" expr 11 | . "for" assign "to" expr 12 | . "next" 13 | . "while" comp_expr 14 | . "wend" 15 | . "print" args 16 | . error 17 assign: . value '=' expr 34 value: . "identifier" error shift, and go to state 1 "identifier" shift, and go to state 2 "\n" shift, and go to state 3 "if" shift, and go to state 4 "else" shift, and go to state 5 "endif" shift, and go to state 6 "for" shift, and go to state 7 "next" shift, and go to state 8 "while" shift, and go to state 9 "wend" shift, and go to state 10 "end" shift, and go to state 11 "print" shift, and go to state 12 unit go to state 13 states go to state 14 statement go to state 15 assign go to state 16 value go to state 17 state 1 16 statement: error . $default reduce using rule 16 (statement) state 2 34 value: "identifier" . $default reduce using rule 34 (value) state 3 4 states: "\n" . $default reduce using rule 4 (states) state 4 7 statement: "if" . comp_expr "then" 18 comp_expr: . expr "==" expr 19 | . expr "!=" expr 20 | . expr '>' expr 21 | . expr ">=" expr 22 | . expr '<' expr 23 | . expr "<=" expr 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 comp_expr go to state 22 expr go to state 23 value go to state 24 state 5 8 statement: "else" . $default reduce using rule 8 (statement) state 6 9 statement: "endif" . $default reduce using rule 9 (statement) state 7 10 statement: "for" . assign "to" expr "step" expr 11 | "for" . assign "to" expr 17 assign: . value '=' expr 34 value: . "identifier" "identifier" shift, and go to state 2 assign go to state 25 value go to state 17 state 8 12 statement: "next" . $default reduce using rule 12 (statement) state 9 13 statement: "while" . comp_expr 18 comp_expr: . expr "==" expr 19 | . expr "!=" expr 20 | . expr '>' expr 21 | . expr ">=" expr 22 | . expr '<' expr 23 | . expr "<=" expr 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 comp_expr go to state 26 expr go to state 23 value go to state 24 state 10 14 statement: "wend" . $default reduce using rule 14 (statement) state 11 5 statement: "end" . $default reduce using rule 5 (statement) state 12 15 statement: "print" . args 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" 35 args: . expr 36 | . args ',' expr "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 27 value go to state 24 args go to state 28 state 13 0 $accept: unit . "end of file" 2 unit: unit . states 3 states: . statement "\n" 4 | . "\n" 5 statement: . "end" 6 | . assign 7 | . "if" comp_expr "then" 8 | . "else" 9 | . "endif" 10 | . "for" assign "to" expr "step" expr 11 | . "for" assign "to" expr 12 | . "next" 13 | . "while" comp_expr 14 | . "wend" 15 | . "print" args 16 | . error 17 assign: . value '=' expr 34 value: . "identifier" "end of file" shift, and go to state 29 error shift, and go to state 1 "identifier" shift, and go to state 2 "\n" shift, and go to state 3 "if" shift, and go to state 4 "else" shift, and go to state 5 "endif" shift, and go to state 6 "for" shift, and go to state 7 "next" shift, and go to state 8 "while" shift, and go to state 9 "wend" shift, and go to state 10 "end" shift, and go to state 11 "print" shift, and go to state 12 states go to state 30 statement go to state 15 assign go to state 16 value go to state 17 state 14 1 unit: states . $default reduce using rule 1 (unit) state 15 3 states: statement . "\n" "\n" shift, and go to state 31 state 16 6 statement: assign . $default reduce using rule 6 (statement) state 17 17 assign: value . '=' expr '=' shift, and go to state 32 state 18 32 expr: "ival" . $default reduce using rule 32 (expr) state 19 33 expr: "rand" . '(' expr ')' '(' shift, and go to state 33 state 20 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 29 | '-' . expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 34 value go to state 24 state 21 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 30 | '(' . expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 35 value go to state 24 state 22 7 statement: "if" comp_expr . "then" "then" shift, and go to state 36 state 23 18 comp_expr: expr . "==" expr 19 | expr . "!=" expr 20 | expr . '>' expr 21 | expr . ">=" expr 22 | expr . '<' expr 23 | expr . "<=" expr 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr "==" shift, and go to state 37 "!=" shift, and go to state 38 ">=" shift, and go to state 39 "<=" shift, and go to state 40 '+' shift, and go to state 41 '-' shift, and go to state 42 '*' shift, and go to state 43 '/' shift, and go to state 44 '%' shift, and go to state 45 '>' shift, and go to state 46 '<' shift, and go to state 47 state 24 31 expr: value . $default reduce using rule 31 (expr) state 25 10 statement: "for" assign . "to" expr "step" expr 11 | "for" assign . "to" expr "to" shift, and go to state 48 state 26 13 statement: "while" comp_expr . $default reduce using rule 13 (statement) state 27 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr 35 args: expr . ["\n", ','] '+' shift, and go to state 41 '-' shift, and go to state 42 '*' shift, and go to state 43 '/' shift, and go to state 44 '%' shift, and go to state 45 $default reduce using rule 35 (args) state 28 15 statement: "print" args . ["\n"] 36 args: args . ',' expr ',' shift, and go to state 49 $default reduce using rule 15 (statement) state 29 0 $accept: unit "end of file" . $default accept state 30 2 unit: unit states . $default reduce using rule 2 (unit) state 31 3 states: statement "\n" . $default reduce using rule 3 (states) state 32 17 assign: value '=' . expr 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 50 value go to state 24 state 33 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 33 | "rand" '(' . expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 51 value go to state 24 state 34 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr 29 | '-' expr . ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', '*', '/', '%', "step", '>', '<', ')', ','] $default reduce using rule 29 (expr) Conflict between rule 29 and token '+' resolved as reduce ('+' < NEG). Conflict between rule 29 and token '-' resolved as reduce ('-' < NEG). Conflict between rule 29 and token '*' resolved as reduce ('*' < NEG). Conflict between rule 29 and token '/' resolved as reduce ('/' < NEG). Conflict between rule 29 and token '%' resolved as reduce ('%' < NEG). state 35 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr 30 | '(' expr . ')' '+' shift, and go to state 41 '-' shift, and go to state 42 '*' shift, and go to state 43 '/' shift, and go to state 44 '%' shift, and go to state 45 ')' shift, and go to state 52 state 36 7 statement: "if" comp_expr "then" . $default reduce using rule 7 (statement) state 37 18 comp_expr: expr "==" . expr 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 53 value go to state 24 state 38 19 comp_expr: expr "!=" . expr 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 54 value go to state 24 state 39 21 comp_expr: expr ">=" . expr 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 55 value go to state 24 state 40 23 comp_expr: expr "<=" . expr 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 56 value go to state 24 state 41 24 expr: . expr '-' expr 25 | . expr '+' expr 25 | expr '+' . expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 57 value go to state 24 state 42 24 expr: . expr '-' expr 24 | expr '-' . expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 58 value go to state 24 state 43 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 26 | expr '*' . expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 59 value go to state 24 state 44 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 27 | expr '/' . expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 60 value go to state 24 state 45 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 28 | expr '%' . expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 61 value go to state 24 state 46 20 comp_expr: expr '>' . expr 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 62 value go to state 24 state 47 22 comp_expr: expr '<' . expr 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 63 value go to state 24 state 48 10 statement: "for" assign "to" . expr "step" expr 11 | "for" assign "to" . expr 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 64 value go to state 24 state 49 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" 36 args: args ',' . expr "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 65 value go to state 24 state 50 17 assign: value '=' expr . ["\n", "to"] 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr '+' shift, and go to state 41 '-' shift, and go to state 42 '*' shift, and go to state 43 '/' shift, and go to state 44 '%' shift, and go to state 45 $default reduce using rule 17 (assign) state 51 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr 33 | "rand" '(' expr . ')' '+' shift, and go to state 41 '-' shift, and go to state 42 '*' shift, and go to state 43 '/' shift, and go to state 44 '%' shift, and go to state 45 ')' shift, and go to state 66 state 52 30 expr: '(' expr ')' . $default reduce using rule 30 (expr) state 53 18 comp_expr: expr "==" expr . ["\n", "then"] 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr '+' shift, and go to state 41 '-' shift, and go to state 42 '*' shift, and go to state 43 '/' shift, and go to state 44 '%' shift, and go to state 45 $default reduce using rule 18 (comp_expr) state 54 19 comp_expr: expr "!=" expr . ["\n", "then"] 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr '+' shift, and go to state 41 '-' shift, and go to state 42 '*' shift, and go to state 43 '/' shift, and go to state 44 '%' shift, and go to state 45 $default reduce using rule 19 (comp_expr) state 55 21 comp_expr: expr ">=" expr . ["\n", "then"] 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr '+' shift, and go to state 41 '-' shift, and go to state 42 '*' shift, and go to state 43 '/' shift, and go to state 44 '%' shift, and go to state 45 $default reduce using rule 21 (comp_expr) state 56 23 comp_expr: expr "<=" expr . ["\n", "then"] 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr '+' shift, and go to state 41 '-' shift, and go to state 42 '*' shift, and go to state 43 '/' shift, and go to state 44 '%' shift, and go to state 45 $default reduce using rule 23 (comp_expr) state 57 24 expr: expr . '-' expr 25 | expr . '+' expr ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', "step", '>', '<', ')', ','] 25 | expr '+' expr . ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', "step", '>', '<', ')', ','] 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr '*' shift, and go to state 43 '/' shift, and go to state 44 '%' shift, and go to state 45 $default reduce using rule 25 (expr) Conflict between rule 25 and token '+' resolved as reduce (%left '+'). Conflict between rule 25 and token '-' resolved as reduce (%left '-'). Conflict between rule 25 and token '*' resolved as shift ('+' < '*'). Conflict between rule 25 and token '/' resolved as shift ('+' < '/'). Conflict between rule 25 and token '%' resolved as shift ('+' < '%'). state 58 24 expr: expr . '-' expr ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', "step", '>', '<', ')', ','] 24 | expr '-' expr . ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', "step", '>', '<', ')', ','] 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr '*' shift, and go to state 43 '/' shift, and go to state 44 '%' shift, and go to state 45 $default reduce using rule 24 (expr) Conflict between rule 24 and token '+' resolved as reduce (%left '+'). Conflict between rule 24 and token '-' resolved as reduce (%left '-'). Conflict between rule 24 and token '*' resolved as shift ('-' < '*'). Conflict between rule 24 and token '/' resolved as shift ('-' < '/'). Conflict between rule 24 and token '%' resolved as shift ('-' < '%'). state 59 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', '*', '/', '%', "step", '>', '<', ')', ','] 26 | expr '*' expr . ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', '*', '/', '%', "step", '>', '<', ')', ','] 27 | expr . '/' expr 28 | expr . '%' expr $default reduce using rule 26 (expr) Conflict between rule 26 and token '+' resolved as reduce ('+' < '*'). Conflict between rule 26 and token '-' resolved as reduce ('-' < '*'). Conflict between rule 26 and token '*' resolved as reduce (%left '*'). Conflict between rule 26 and token '/' resolved as reduce (%left '/'). Conflict between rule 26 and token '%' resolved as reduce (%left '%'). state 60 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', '*', '/', '%', "step", '>', '<', ')', ','] 27 | expr '/' expr . ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', '*', '/', '%', "step", '>', '<', ')', ','] 28 | expr . '%' expr $default reduce using rule 27 (expr) Conflict between rule 27 and token '+' resolved as reduce ('+' < '/'). Conflict between rule 27 and token '-' resolved as reduce ('-' < '/'). Conflict between rule 27 and token '*' resolved as reduce (%left '*'). Conflict between rule 27 and token '/' resolved as reduce (%left '/'). Conflict between rule 27 and token '%' resolved as reduce (%left '%'). state 61 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', '*', '/', '%', "step", '>', '<', ')', ','] 28 | expr '%' expr . ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', '*', '/', '%', "step", '>', '<', ')', ','] $default reduce using rule 28 (expr) Conflict between rule 28 and token '+' resolved as reduce ('+' < '%'). Conflict between rule 28 and token '-' resolved as reduce ('-' < '%'). Conflict between rule 28 and token '*' resolved as reduce (%left '*'). Conflict between rule 28 and token '/' resolved as reduce (%left '/'). Conflict between rule 28 and token '%' resolved as reduce (%left '%'). state 62 20 comp_expr: expr '>' expr . ["\n", "then"] 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr '+' shift, and go to state 41 '-' shift, and go to state 42 '*' shift, and go to state 43 '/' shift, and go to state 44 '%' shift, and go to state 45 $default reduce using rule 20 (comp_expr) state 63 22 comp_expr: expr '<' expr . ["\n", "then"] 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr '+' shift, and go to state 41 '-' shift, and go to state 42 '*' shift, and go to state 43 '/' shift, and go to state 44 '%' shift, and go to state 45 $default reduce using rule 22 (comp_expr) state 64 10 statement: "for" assign "to" expr . "step" expr 11 | "for" assign "to" expr . ["\n"] 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr '+' shift, and go to state 41 '-' shift, and go to state 42 '*' shift, and go to state 43 '/' shift, and go to state 44 '%' shift, and go to state 45 "step" shift, and go to state 67 $default reduce using rule 11 (statement) state 65 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr 36 args: args ',' expr . ["\n", ','] '+' shift, and go to state 41 '-' shift, and go to state 42 '*' shift, and go to state 43 '/' shift, and go to state 44 '%' shift, and go to state 45 $default reduce using rule 36 (args) state 66 33 expr: "rand" '(' expr ')' . $default reduce using rule 33 (expr) state 67 10 statement: "for" assign "to" expr "step" . expr 24 expr: . expr '-' expr 25 | . expr '+' expr 26 | . expr '*' expr 27 | . expr '/' expr 28 | . expr '%' expr 29 | . '-' expr 30 | . '(' expr ')' 31 | . value 32 | . "ival" 33 | . "rand" '(' expr ')' 34 value: . "identifier" "ival" shift, and go to state 18 "identifier" shift, and go to state 2 "rand" shift, and go to state 19 '-' shift, and go to state 20 '(' shift, and go to state 21 expr go to state 68 value go to state 24 state 68 10 statement: "for" assign "to" expr "step" expr . ["\n"] 24 expr: expr . '-' expr 25 | expr . '+' expr 26 | expr . '*' expr 27 | expr . '/' expr 28 | expr . '%' expr '+' shift, and go to state 41 '-' shift, and go to state 42 '*' shift, and go to state 43 '/' shift, and go to state 44 '%' shift, and go to state 45 $default reduce using rule 10 (statement)