view Bison-Flex/BasicCompiler-MemoryBase/EUC/script-parser.output @ 0:db40c85cad7a default tip

upload sample source
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Mon, 09 May 2011 03:11:59 +0900
parents
children
line wrap: on
line source

文法

    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


出現位置の規則による終端

"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


出現位置の規則による非終端

$accept (35)
    左辺: 0
unit (36)
    左辺: 1 2, 右辺: 0 2
states (37)
    左辺: 3 4, 右辺: 1 2
statement (38)
    左辺: 5 6 7 8 9 10 11 12 13 14 15 16, 右辺: 3
assign (39)
    左辺: 17, 右辺: 6 10 11
comp_expr (40)
    左辺: 18 19 20 21 22 23, 右辺: 7 13
expr (41)
    左辺: 24 25 26 27 28 29 30 31 32 33, 右辺: 10 11 17 18 19 20
    21 22 23 24 25 26 27 28 29 30 33 35 36
value (42)
    左辺: 34, 右辺: 17 31
args (43)
    左辺: 35 36, 右辺: 15 36


状態 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


状態 1

   16 statement: error .

    $default  reduce using rule 16 (statement)


状態 2

   34 value: "identifier" .

    $default  reduce using rule 34 (value)


状態 3

    4 states: "\n" .

    $default  reduce using rule 4 (states)


状態 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


状態 5

    8 statement: "else" .

    $default  reduce using rule 8 (statement)


状態 6

    9 statement: "endif" .

    $default  reduce using rule 9 (statement)


状態 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


状態 8

   12 statement: "next" .

    $default  reduce using rule 12 (statement)


状態 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


状態 10

   14 statement: "wend" .

    $default  reduce using rule 14 (statement)


状態 11

    5 statement: "end" .

    $default  reduce using rule 5 (statement)


状態 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


状態 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


状態 14

    1 unit: states .

    $default  reduce using rule 1 (unit)


状態 15

    3 states: statement . "\n"

    "\n"  shift, and go to state 31


状態 16

    6 statement: assign .

    $default  reduce using rule 6 (statement)


状態 17

   17 assign: value . '=' expr

    '='  shift, and go to state 32


状態 18

   32 expr: "ival" .

    $default  reduce using rule 32 (expr)


状態 19

   33 expr: "rand" . '(' expr ')'

    '('  shift, and go to state 33


状態 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


状態 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


状態 22

    7 statement: "if" comp_expr . "then"

    "then"  shift, and go to state 36


状態 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


状態 24

   31 expr: value .

    $default  reduce using rule 31 (expr)


状態 25

   10 statement: "for" assign . "to" expr "step" expr
   11          | "for" assign . "to" expr

    "to"  shift, and go to state 48


状態 26

   13 statement: "while" comp_expr .

    $default  reduce using rule 13 (statement)


状態 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)


状態 28

   15 statement: "print" args .  ["\n"]
   36 args: args . ',' expr

    ','  shift, and go to state 49

    $default  reduce using rule 15 (statement)


状態 29

    0 $accept: unit "end of file" .

    $default  accept


状態 30

    2 unit: unit states .

    $default  reduce using rule 2 (unit)


状態 31

    3 states: statement "\n" .

    $default  reduce using rule 3 (states)


状態 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


状態 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


状態 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).


状態 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


状態 36

    7 statement: "if" comp_expr "then" .

    $default  reduce using rule 7 (statement)


状態 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


状態 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


状態 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


状態 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


状態 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


状態 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


状態 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


状態 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


状態 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


状態 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


状態 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


状態 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


状態 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


状態 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)


状態 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


状態 52

   30 expr: '(' expr ')' .

    $default  reduce using rule 30 (expr)


状態 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)


状態 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)


状態 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)


状態 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)


状態 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 ('+' < '%').


状態 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 ('-' < '%').


状態 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 '%').


状態 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 '%').


状態 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 '%').


状態 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)


状態 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)


状態 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)


状態 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)


状態 66

   33 expr: "rand" '(' expr ')' .

    $default  reduce using rule 33 (expr)


状態 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


状態 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)