Mercurial > hg > Members > nobuyasu > myCompiler
view Bison-Flex/BasicCompiler-StackBase/UTF8/script-parser.output @ 3:3cea2e8a0e4b
add function goto
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 10 May 2011 10:48:02 +0900 |
parents | fbe42292d479 |
children |
line wrap: on
line source
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 | "identifier" ":" 17 | "goto" "identifier" 18 | error 19 assign: value '=' expr 20 comp_expr: expr "==" expr 21 | expr "!=" expr 22 | expr '>' expr 23 | expr ">=" expr 24 | expr '<' expr 25 | expr "<=" expr 26 expr: expr '-' expr 27 | expr '+' expr 28 | expr '*' expr 29 | expr '/' expr 30 | expr '%' expr 31 | '-' expr 32 | '(' expr ')' 33 | value 34 | "ival" 35 | "rand" '(' expr ')' 36 value: "identifier" 37 args: expr 38 | args ',' expr Terminals, with rules where they appear "end of file" (0) 0 '%' (37) 30 '(' (40) 32 35 ')' (41) 32 35 '*' (42) 28 '+' (43) 27 ',' (44) 38 '-' (45) 26 31 '/' (47) 29 '<' (60) 24 '=' (61) 19 '>' (62) 22 error (256) 18 "ival" (258) 34 "identifier" (259) 16 17 36 "==" (260) 20 "!=" (261) 21 ">=" (262) 23 "<=" (263) 25 "\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) 35 "print" (276) 15 ":" (277) 16 "goto" (278) 17 NEG (279) "step" (280) 10 Nonterminals, with rules where they appear $accept (37) on left: 0 unit (38) on left: 1 2, on right: 0 2 states (39) on left: 3 4, on right: 1 2 statement (40) on left: 5 6 7 8 9 10 11 12 13 14 15 16 17 18, on right: 3 assign (41) on left: 19, on right: 6 10 11 comp_expr (42) on left: 20 21 22 23 24 25, on right: 7 13 expr (43) on left: 26 27 28 29 30 31 32 33 34 35, on right: 10 11 19 20 21 22 23 24 25 26 27 28 29 30 31 32 35 37 38 value (44) on left: 36, on right: 19 33 args (45) on left: 37 38, on right: 15 38 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 | . "identifier" ":" 17 | . "goto" "identifier" 18 | . error 19 assign: . value '=' expr 36 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 "goto" shift, and go to state 13 unit go to state 14 states go to state 15 statement go to state 16 assign go to state 17 value go to state 18 state 1 18 statement: error . $default reduce using rule 18 (statement) state 2 16 statement: "identifier" . ":" 36 value: "identifier" . ['='] ":" shift, and go to state 19 $default reduce using rule 36 (value) state 3 4 states: "\n" . $default reduce using rule 4 (states) state 4 7 statement: "if" . comp_expr "then" 20 comp_expr: . expr "==" expr 21 | . expr "!=" expr 22 | . expr '>' expr 23 | . expr ">=" expr 24 | . expr '<' expr 25 | . expr "<=" expr 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 comp_expr go to state 25 expr go to state 26 value go to state 27 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 19 assign: . value '=' expr 36 value: . "identifier" "identifier" shift, and go to state 21 assign go to state 28 value go to state 18 state 8 12 statement: "next" . $default reduce using rule 12 (statement) state 9 13 statement: "while" . comp_expr 20 comp_expr: . expr "==" expr 21 | . expr "!=" expr 22 | . expr '>' expr 23 | . expr ">=" expr 24 | . expr '<' expr 25 | . expr "<=" expr 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 comp_expr go to state 29 expr go to state 26 value go to state 27 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 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" 37 args: . expr 38 | . args ',' expr "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 30 value go to state 27 args go to state 31 state 13 17 statement: "goto" . "identifier" "identifier" shift, and go to state 32 state 14 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 | . "identifier" ":" 17 | . "goto" "identifier" 18 | . error 19 assign: . value '=' expr 36 value: . "identifier" "end of file" shift, and go to state 33 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 "goto" shift, and go to state 13 states go to state 34 statement go to state 16 assign go to state 17 value go to state 18 state 15 1 unit: states . $default reduce using rule 1 (unit) state 16 3 states: statement . "\n" "\n" shift, and go to state 35 state 17 6 statement: assign . $default reduce using rule 6 (statement) state 18 19 assign: value . '=' expr '=' shift, and go to state 36 state 19 16 statement: "identifier" ":" . $default reduce using rule 16 (statement) state 20 34 expr: "ival" . $default reduce using rule 34 (expr) state 21 36 value: "identifier" . $default reduce using rule 36 (value) state 22 35 expr: "rand" . '(' expr ')' '(' shift, and go to state 37 state 23 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 31 | '-' . expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 38 value go to state 27 state 24 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 32 | '(' . expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 39 value go to state 27 state 25 7 statement: "if" comp_expr . "then" "then" shift, and go to state 40 state 26 20 comp_expr: expr . "==" expr 21 | expr . "!=" expr 22 | expr . '>' expr 23 | expr . ">=" expr 24 | expr . '<' expr 25 | expr . "<=" expr 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr 30 | 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 '-' shift, and go to state 46 '*' shift, and go to state 47 '/' shift, and go to state 48 '%' shift, and go to state 49 '>' shift, and go to state 50 '<' shift, and go to state 51 state 27 33 expr: value . $default reduce using rule 33 (expr) state 28 10 statement: "for" assign . "to" expr "step" expr 11 | "for" assign . "to" expr "to" shift, and go to state 52 state 29 13 statement: "while" comp_expr . $default reduce using rule 13 (statement) state 30 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr 30 | expr . '%' expr 37 args: expr . ["\n", ','] '+' shift, and go to state 45 '-' shift, and go to state 46 '*' shift, and go to state 47 '/' shift, and go to state 48 '%' shift, and go to state 49 $default reduce using rule 37 (args) state 31 15 statement: "print" args . ["\n"] 38 args: args . ',' expr ',' shift, and go to state 53 $default reduce using rule 15 (statement) state 32 17 statement: "goto" "identifier" . $default reduce using rule 17 (statement) state 33 0 $accept: unit "end of file" . $default accept state 34 2 unit: unit states . $default reduce using rule 2 (unit) state 35 3 states: statement "\n" . $default reduce using rule 3 (states) state 36 19 assign: value '=' . expr 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 54 value go to state 27 state 37 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 35 | "rand" '(' . expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 55 value go to state 27 state 38 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr 30 | expr . '%' expr 31 | '-' expr . ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', '*', '/', '%', "step", '>', '<', ')', ','] $default reduce using rule 31 (expr) Conflict between rule 31 and token '+' resolved as reduce ('+' < NEG). Conflict between rule 31 and token '-' resolved as reduce ('-' < NEG). Conflict between rule 31 and token '*' resolved as reduce ('*' < NEG). Conflict between rule 31 and token '/' resolved as reduce ('/' < NEG). Conflict between rule 31 and token '%' resolved as reduce ('%' < NEG). state 39 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr 30 | expr . '%' expr 32 | '(' expr . ')' '+' shift, and go to state 45 '-' shift, and go to state 46 '*' shift, and go to state 47 '/' shift, and go to state 48 '%' shift, and go to state 49 ')' shift, and go to state 56 state 40 7 statement: "if" comp_expr "then" . $default reduce using rule 7 (statement) state 41 20 comp_expr: expr "==" . expr 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 57 value go to state 27 state 42 21 comp_expr: expr "!=" . expr 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 58 value go to state 27 state 43 23 comp_expr: expr ">=" . expr 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 59 value go to state 27 state 44 25 comp_expr: expr "<=" . expr 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 60 value go to state 27 state 45 26 expr: . expr '-' expr 27 | . expr '+' expr 27 | expr '+' . expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 61 value go to state 27 state 46 26 expr: . expr '-' expr 26 | expr '-' . expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 62 value go to state 27 state 47 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 28 | expr '*' . expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 63 value go to state 27 state 48 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 29 | expr '/' . expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 64 value go to state 27 state 49 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 30 | expr '%' . expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 65 value go to state 27 state 50 22 comp_expr: expr '>' . expr 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 66 value go to state 27 state 51 24 comp_expr: expr '<' . expr 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 67 value go to state 27 state 52 10 statement: "for" assign "to" . expr "step" expr 11 | "for" assign "to" . expr 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 68 value go to state 27 state 53 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" 38 args: args ',' . expr "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 69 value go to state 27 state 54 19 assign: value '=' expr . ["\n", "to"] 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr 30 | expr . '%' expr '+' shift, and go to state 45 '-' shift, and go to state 46 '*' shift, and go to state 47 '/' shift, and go to state 48 '%' shift, and go to state 49 $default reduce using rule 19 (assign) state 55 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr 30 | expr . '%' expr 35 | "rand" '(' expr . ')' '+' shift, and go to state 45 '-' shift, and go to state 46 '*' shift, and go to state 47 '/' shift, and go to state 48 '%' shift, and go to state 49 ')' shift, and go to state 70 state 56 32 expr: '(' expr ')' . $default reduce using rule 32 (expr) state 57 20 comp_expr: expr "==" expr . ["\n", "then"] 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr 30 | expr . '%' expr '+' shift, and go to state 45 '-' shift, and go to state 46 '*' shift, and go to state 47 '/' shift, and go to state 48 '%' shift, and go to state 49 $default reduce using rule 20 (comp_expr) state 58 21 comp_expr: expr "!=" expr . ["\n", "then"] 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr 30 | expr . '%' expr '+' shift, and go to state 45 '-' shift, and go to state 46 '*' shift, and go to state 47 '/' shift, and go to state 48 '%' shift, and go to state 49 $default reduce using rule 21 (comp_expr) state 59 23 comp_expr: expr ">=" expr . ["\n", "then"] 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr 30 | expr . '%' expr '+' shift, and go to state 45 '-' shift, and go to state 46 '*' shift, and go to state 47 '/' shift, and go to state 48 '%' shift, and go to state 49 $default reduce using rule 23 (comp_expr) state 60 25 comp_expr: expr "<=" expr . ["\n", "then"] 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr 30 | expr . '%' expr '+' shift, and go to state 45 '-' shift, and go to state 46 '*' shift, and go to state 47 '/' shift, and go to state 48 '%' shift, and go to state 49 $default reduce using rule 25 (comp_expr) state 61 26 expr: expr . '-' expr 27 | expr . '+' expr ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', "step", '>', '<', ')', ','] 27 | expr '+' expr . ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', "step", '>', '<', ')', ','] 28 | expr . '*' expr 29 | expr . '/' expr 30 | expr . '%' expr '*' shift, and go to state 47 '/' shift, and go to state 48 '%' shift, and go to state 49 $default reduce using rule 27 (expr) 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 shift ('+' < '*'). Conflict between rule 27 and token '/' resolved as shift ('+' < '/'). Conflict between rule 27 and token '%' resolved as shift ('+' < '%'). state 62 26 expr: expr . '-' expr ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', "step", '>', '<', ')', ','] 26 | expr '-' expr . ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', "step", '>', '<', ')', ','] 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr 30 | expr . '%' expr '*' shift, and go to state 47 '/' shift, and go to state 48 '%' shift, and go to state 49 $default reduce using rule 26 (expr) 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 shift ('-' < '*'). Conflict between rule 26 and token '/' resolved as shift ('-' < '/'). Conflict between rule 26 and token '%' resolved as shift ('-' < '%'). state 63 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', '*', '/', '%', "step", '>', '<', ')', ','] 28 | expr '*' expr . ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', '*', '/', '%', "step", '>', '<', ')', ','] 29 | expr . '/' expr 30 | expr . '%' expr $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 64 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', '*', '/', '%', "step", '>', '<', ')', ','] 29 | expr '/' expr . ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', '*', '/', '%', "step", '>', '<', ')', ','] 30 | expr . '%' expr $default reduce using rule 29 (expr) Conflict between rule 29 and token '+' resolved as reduce ('+' < '/'). Conflict between rule 29 and token '-' resolved as reduce ('-' < '/'). Conflict between rule 29 and token '*' resolved as reduce (%left '*'). Conflict between rule 29 and token '/' resolved as reduce (%left '/'). Conflict between rule 29 and token '%' resolved as reduce (%left '%'). state 65 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr 30 | expr . '%' expr ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', '*', '/', '%', "step", '>', '<', ')', ','] 30 | expr '%' expr . ["==", "!=", ">=", "<=", "\n", "then", "to", '+', '-', '*', '/', '%', "step", '>', '<', ')', ','] $default reduce using rule 30 (expr) Conflict between rule 30 and token '+' resolved as reduce ('+' < '%'). Conflict between rule 30 and token '-' resolved as reduce ('-' < '%'). Conflict between rule 30 and token '*' resolved as reduce (%left '*'). Conflict between rule 30 and token '/' resolved as reduce (%left '/'). Conflict between rule 30 and token '%' resolved as reduce (%left '%'). state 66 22 comp_expr: expr '>' expr . ["\n", "then"] 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr 30 | expr . '%' expr '+' shift, and go to state 45 '-' shift, and go to state 46 '*' shift, and go to state 47 '/' shift, and go to state 48 '%' shift, and go to state 49 $default reduce using rule 22 (comp_expr) state 67 24 comp_expr: expr '<' expr . ["\n", "then"] 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr 30 | expr . '%' expr '+' shift, and go to state 45 '-' shift, and go to state 46 '*' shift, and go to state 47 '/' shift, and go to state 48 '%' shift, and go to state 49 $default reduce using rule 24 (comp_expr) state 68 10 statement: "for" assign "to" expr . "step" expr 11 | "for" assign "to" expr . ["\n"] 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr 30 | expr . '%' expr '+' shift, and go to state 45 '-' shift, and go to state 46 '*' shift, and go to state 47 '/' shift, and go to state 48 '%' shift, and go to state 49 "step" shift, and go to state 71 $default reduce using rule 11 (statement) state 69 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr 30 | expr . '%' expr 38 args: args ',' expr . ["\n", ','] '+' shift, and go to state 45 '-' shift, and go to state 46 '*' shift, and go to state 47 '/' shift, and go to state 48 '%' shift, and go to state 49 $default reduce using rule 38 (args) state 70 35 expr: "rand" '(' expr ')' . $default reduce using rule 35 (expr) state 71 10 statement: "for" assign "to" expr "step" . expr 26 expr: . expr '-' expr 27 | . expr '+' expr 28 | . expr '*' expr 29 | . expr '/' expr 30 | . expr '%' expr 31 | . '-' expr 32 | . '(' expr ')' 33 | . value 34 | . "ival" 35 | . "rand" '(' expr ')' 36 value: . "identifier" "ival" shift, and go to state 20 "identifier" shift, and go to state 21 "rand" shift, and go to state 22 '-' shift, and go to state 23 '(' shift, and go to state 24 expr go to state 72 value go to state 27 state 72 10 statement: "for" assign "to" expr "step" expr . ["\n"] 26 expr: expr . '-' expr 27 | expr . '+' expr 28 | expr . '*' expr 29 | expr . '/' expr 30 | expr . '%' expr '+' shift, and go to state 45 '-' shift, and go to state 46 '*' shift, and go to state 47 '/' shift, and go to state 48 '%' shift, and go to state 49 $default reduce using rule 10 (statement)