You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12912 lines
495 KiB
12912 lines
495 KiB
Nonterminals useless in grammar
|
|
|
|
ident_list
|
|
|
|
|
|
Rules useless in grammar
|
|
|
|
118 ident_list: %empty
|
|
119 | IDENT
|
|
120 | ident_list COMMA
|
|
121 | ident_list IDENT
|
|
|
|
|
|
State 10 conflicts: 19 shift/reduce
|
|
State 11 conflicts: 19 shift/reduce
|
|
State 12 conflicts: 19 shift/reduce
|
|
State 21 conflicts: 2 shift/reduce
|
|
State 24 conflicts: 19 shift/reduce
|
|
State 27 conflicts: 1 shift/reduce
|
|
State 33 conflicts: 1 shift/reduce
|
|
State 34 conflicts: 1 shift/reduce
|
|
State 40 conflicts: 1 shift/reduce
|
|
State 58 conflicts: 1 shift/reduce
|
|
State 59 conflicts: 1 shift/reduce
|
|
State 60 conflicts: 1 shift/reduce
|
|
State 72 conflicts: 22 reduce/reduce
|
|
State 73 conflicts: 4 reduce/reduce
|
|
State 78 conflicts: 1 shift/reduce
|
|
State 80 conflicts: 22 reduce/reduce
|
|
State 104 conflicts: 19 shift/reduce
|
|
State 125 conflicts: 2 shift/reduce
|
|
State 126 conflicts: 2 shift/reduce
|
|
State 127 conflicts: 2 shift/reduce
|
|
State 128 conflicts: 2 shift/reduce
|
|
State 129 conflicts: 2 shift/reduce
|
|
State 130 conflicts: 2 shift/reduce
|
|
State 131 conflicts: 2 shift/reduce
|
|
State 132 conflicts: 2 shift/reduce
|
|
State 133 conflicts: 2 shift/reduce
|
|
State 141 conflicts: 1 shift/reduce
|
|
State 144 conflicts: 4 reduce/reduce
|
|
State 145 conflicts: 4 reduce/reduce
|
|
State 146 conflicts: 1 shift/reduce, 12 reduce/reduce
|
|
State 147 conflicts: 1 shift/reduce, 12 reduce/reduce
|
|
State 148 conflicts: 4 reduce/reduce
|
|
State 149 conflicts: 4 reduce/reduce
|
|
State 150 conflicts: 4 reduce/reduce
|
|
State 151 conflicts: 4 reduce/reduce
|
|
State 152 conflicts: 4 reduce/reduce
|
|
State 153 conflicts: 4 reduce/reduce
|
|
State 154 conflicts: 15 reduce/reduce
|
|
State 155 conflicts: 15 reduce/reduce
|
|
State 156 conflicts: 15 reduce/reduce
|
|
State 157 conflicts: 15 reduce/reduce
|
|
State 158 conflicts: 6 shift/reduce, 16 reduce/reduce
|
|
State 159 conflicts: 6 shift/reduce, 16 reduce/reduce
|
|
State 160 conflicts: 6 shift/reduce, 16 reduce/reduce
|
|
State 161 conflicts: 6 shift/reduce, 16 reduce/reduce
|
|
State 162 conflicts: 6 shift/reduce, 16 reduce/reduce
|
|
State 163 conflicts: 1 shift/reduce, 15 reduce/reduce
|
|
State 166 conflicts: 2 shift/reduce
|
|
State 167 conflicts: 2 shift/reduce
|
|
State 168 conflicts: 2 shift/reduce
|
|
State 169 conflicts: 2 shift/reduce
|
|
State 170 conflicts: 2 shift/reduce
|
|
State 171 conflicts: 2 shift/reduce
|
|
State 172 conflicts: 2 shift/reduce
|
|
State 173 conflicts: 2 shift/reduce
|
|
State 174 conflicts: 2 shift/reduce
|
|
State 188 conflicts: 1 shift/reduce
|
|
State 192 conflicts: 19 shift/reduce
|
|
State 216 conflicts: 1 shift/reduce
|
|
State 222 conflicts: 1 shift/reduce
|
|
|
|
|
|
Grammar
|
|
|
|
0 $accept: program $end
|
|
|
|
1 program: stmt_list
|
|
|
|
2 stmt_list: stmt_list stmt
|
|
3 | %empty
|
|
|
|
4 stmt: expr
|
|
5 | RETURN expr
|
|
6 | RETURN
|
|
7 | BREAK
|
|
8 | BREAK expr
|
|
9 | CONTINUE
|
|
10 | CONTINUE expr
|
|
11 | stmt SEMICOLON
|
|
|
|
12 expr: control_expr
|
|
|
|
13 control_expr: IF expr THEN stmt_list if_termin
|
|
14 | WHILE expr DO stmt_list END
|
|
15 | FOR IDENT IN expr DO stmt_list END
|
|
16 | assign_expr
|
|
|
|
17 if_termin: ELSEIF expr THEN stmt_list if_termin
|
|
18 | ELSE stmt_list END
|
|
19 | END
|
|
|
|
20 assign_expr: IDENT ASSIGN expr
|
|
21 | IDENT ASSIGNPLUS expr
|
|
22 | IDENT ASSIGNMINUS expr
|
|
23 | IDENT ASSIGNSTAR expr
|
|
24 | IDENT ASSIGNSLASH expr
|
|
25 | IDENT ASSIGNDSTAR expr
|
|
26 | IDENT ASSIGNBAND expr
|
|
27 | IDENT ASSIGNBOR expr
|
|
28 | IDENT ASSIGNBXOR expr
|
|
29 | ex_index_expr ASSIGN expr
|
|
30 | ex_index_expr ASSIGNPLUS expr
|
|
31 | ex_index_expr ASSIGNMINUS expr
|
|
32 | ex_index_expr ASSIGNSTAR expr
|
|
33 | ex_index_expr ASSIGNSLASH expr
|
|
34 | ex_index_expr ASSIGNDSTAR expr
|
|
35 | ex_index_expr ASSIGNBAND expr
|
|
36 | ex_index_expr ASSIGNBOR expr
|
|
37 | ex_index_expr ASSIGNBXOR expr
|
|
38 | logic_expr
|
|
|
|
39 logic_expr: logic_expr LAND ulogic_expr
|
|
40 | logic_expr LOR ulogic_expr
|
|
41 | ulogic_expr
|
|
|
|
42 ulogic_expr: LNOT ulogic_expr
|
|
43 | rel_expr
|
|
|
|
44 rel_expr: term_expr EQUAL rel_expr
|
|
45 | term_expr NEQUAL rel_expr
|
|
46 | term_expr LESS rel_expr
|
|
47 | term_expr GREATER rel_expr
|
|
48 | term_expr LESSEQ rel_expr
|
|
49 | term_expr GREATEREQ rel_expr
|
|
50 | term_expr
|
|
|
|
51 term_expr: term_expr PLUS factor_expr
|
|
52 | term_expr MINUS factor_expr
|
|
53 | factor_expr
|
|
|
|
54 factor_expr: factor_expr STAR power_expr
|
|
55 | factor_expr SLASH power_expr
|
|
56 | factor_expr PERCENT power_expr
|
|
57 | power_expr
|
|
|
|
58 power_expr: tbang_expr DSTAR power_expr
|
|
59 | tbang_expr
|
|
|
|
60 tbang_expr: binary_expr TBANG tbang_expr
|
|
61 | binary_expr
|
|
|
|
62 binary_expr: binary_expr BAND binary_expr
|
|
63 | binary_expr BOR binary_expr
|
|
64 | binary_expr BXOR binary_expr
|
|
65 | binary_expr LSHIFT binary_expr
|
|
66 | binary_expr RSHIFT binary_expr
|
|
67 | ubinary_expr
|
|
|
|
68 ubinary_expr: BNOT ubinary_expr
|
|
69 | ulen_expr
|
|
|
|
70 ulen_expr: POUND ulen_expr
|
|
71 | call_expr
|
|
|
|
72 call_expr: call_expr LPAREN expr_list RPAREN
|
|
73 | call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | funcdecl_expr
|
|
|
|
75 funcdecl_expr: FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | index_expr
|
|
|
|
82 index_expr: expr LBRACKET expr RBRACKET
|
|
83 | expr DOT IDENT
|
|
84 | ref_expr
|
|
|
|
85 ex_index_expr: expr LBRACKET expr RBRACKET
|
|
86 | expr DOT IDENT
|
|
|
|
87 ref_expr: IDENT
|
|
88 | lit_expr
|
|
|
|
89 lit_expr: INT
|
|
90 | MINUS INT
|
|
91 | FLOAT
|
|
92 | STRING
|
|
93 | NONE
|
|
94 | gen_expr
|
|
|
|
95 gen_expr: LBRACKET expr_list RBRACKET
|
|
96 | LBRACE assoc_list RBRACE
|
|
97 | paren_expr
|
|
|
|
98 paren_expr: any_lparen expr RPAREN
|
|
|
|
99 expr_list: %empty
|
|
100 | expr
|
|
101 | expr_list COMMA
|
|
102 | expr_list expr
|
|
|
|
103 param_list: %empty
|
|
104 | param_list IDENT ASSIGN expr
|
|
105 | param_list STAR IDENT
|
|
106 | param_list IDENT maybe_anno
|
|
107 | param_list COMMA
|
|
|
|
108 assoc_list: %empty
|
|
109 | assoc_item
|
|
110 | assoc_list COMMA
|
|
111 | assoc_list assoc_item
|
|
|
|
112 assoc_item: LBRACKET expr RBRACKET ASSIGN expr
|
|
113 | IDENT ASSIGN expr
|
|
|
|
114 any_lparen: LPAREN
|
|
115 | BLPAREN
|
|
|
|
116 maybe_anno: COLON expr
|
|
117 | %empty
|
|
|
|
|
|
Terminals, with rules where they appear
|
|
|
|
$end (0) 0
|
|
error (256)
|
|
IF (258) 13
|
|
THEN (259) 13 17
|
|
ELSEIF (260) 17
|
|
ELSE (261) 18
|
|
WHILE (262) 14
|
|
FOR (263) 15
|
|
IN (264) 15
|
|
DO (265) 14 15
|
|
FUNC (266) 75 76
|
|
MACRO (267) 77 78 80
|
|
LAMBDA (268) 79 80
|
|
RETURN (269) 5 6
|
|
BREAK (270) 7 8
|
|
CONTINUE (271) 9 10
|
|
END (272) 14 15 18 19 75 76 77 78 79 80
|
|
NONE (273) 93
|
|
IDENT (274) 15 20 21 22 23 24 25 26 27 28 73 75 77 83 86 87 104 105
|
|
106 113
|
|
INT (275) 89 90
|
|
FLOAT (276) 91
|
|
STRING (277) 92
|
|
PLUS (278) 51
|
|
MINUS (279) 52 90
|
|
STAR (280) 54 105
|
|
SLASH (281) 55
|
|
PERCENT (282) 56
|
|
DSTAR (283) 58
|
|
BAND (284) 62
|
|
BOR (285) 63
|
|
BXOR (286) 64
|
|
BNOT (287) 68
|
|
LAND (288) 39
|
|
LOR (289) 40
|
|
LNOT (290) 42
|
|
ASSIGN (291) 20 29 104 112 113
|
|
ASSIGNPLUS (292) 21 30
|
|
ASSIGNMINUS (293) 22 31
|
|
ASSIGNSTAR (294) 23 32
|
|
ASSIGNSLASH (295) 24 33
|
|
ASSIGNDSTAR (296) 25 34
|
|
ASSIGNBAND (297) 26 35
|
|
ASSIGNBOR (298) 27 36
|
|
ASSIGNBXOR (299) 28 37
|
|
EQUAL (300) 44
|
|
NEQUAL (301) 45
|
|
LESS (302) 46
|
|
GREATER (303) 47
|
|
LESSEQ (304) 48
|
|
GREATEREQ (305) 49
|
|
RSHIFT (306) 66
|
|
LSHIFT (307) 65
|
|
LBRACE (308) 96
|
|
RBRACE (309) 96
|
|
BLPAREN (310) 115
|
|
LPAREN (311) 72 73 114
|
|
RPAREN (312) 72 73 75 76 77 78 79 80 98
|
|
LBRACKET (313) 82 85 95 112
|
|
RBRACKET (314) 82 85 95 112
|
|
DOT (315) 83 86
|
|
COLON (316) 73 116
|
|
SEMICOLON (317) 11
|
|
COMMA (318) 101 107 110
|
|
POUND (319) 70
|
|
TBANG (320) 60
|
|
|
|
|
|
Nonterminals, with rules where they appear
|
|
|
|
$accept (66)
|
|
on left: 0
|
|
program (67)
|
|
on left: 1, on right: 0
|
|
stmt_list (68)
|
|
on left: 2 3, on right: 1 2 13 14 15 17 18 75 76 77 78
|
|
stmt (69)
|
|
on left: 4 5 6 7 8 9 10 11, on right: 2 11
|
|
expr (70)
|
|
on left: 12, on right: 4 5 8 10 13 14 15 17 20 21 22 23 24 25 26
|
|
27 28 29 30 31 32 33 34 35 36 37 79 80 82 83 85 86 98 100 102 104
|
|
112 113 116
|
|
control_expr (71)
|
|
on left: 13 14 15 16, on right: 12
|
|
if_termin (72)
|
|
on left: 17 18 19, on right: 13 17
|
|
assign_expr (73)
|
|
on left: 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
|
38, on right: 16
|
|
logic_expr (74)
|
|
on left: 39 40 41, on right: 38 39 40
|
|
ulogic_expr (75)
|
|
on left: 42 43, on right: 39 40 41 42
|
|
rel_expr (76)
|
|
on left: 44 45 46 47 48 49 50, on right: 43 44 45 46 47 48 49
|
|
term_expr (77)
|
|
on left: 51 52 53, on right: 44 45 46 47 48 49 50 51 52
|
|
factor_expr (78)
|
|
on left: 54 55 56 57, on right: 51 52 53 54 55 56
|
|
power_expr (79)
|
|
on left: 58 59, on right: 54 55 56 57 58
|
|
tbang_expr (80)
|
|
on left: 60 61, on right: 58 59 60
|
|
binary_expr (81)
|
|
on left: 62 63 64 65 66 67, on right: 60 61 62 63 64 65 66
|
|
ubinary_expr (82)
|
|
on left: 68 69, on right: 67 68
|
|
ulen_expr (83)
|
|
on left: 70 71, on right: 69 70
|
|
call_expr (84)
|
|
on left: 72 73 74, on right: 71 72 73
|
|
funcdecl_expr (85)
|
|
on left: 75 76 77 78 79 80 81, on right: 74
|
|
index_expr (86)
|
|
on left: 82 83 84, on right: 81
|
|
ex_index_expr (87)
|
|
on left: 85 86, on right: 29 30 31 32 33 34 35 36 37
|
|
ref_expr (88)
|
|
on left: 87 88, on right: 84
|
|
lit_expr (89)
|
|
on left: 89 90 91 92 93 94, on right: 88
|
|
gen_expr (90)
|
|
on left: 95 96 97, on right: 94
|
|
paren_expr (91)
|
|
on left: 98, on right: 97
|
|
expr_list (92)
|
|
on left: 99 100 101 102, on right: 72 73 95 101 102
|
|
param_list (93)
|
|
on left: 103 104 105 106 107, on right: 75 76 77 78 79 80 104 105
|
|
106 107
|
|
assoc_list (94)
|
|
on left: 108 109 110 111, on right: 96 110 111
|
|
assoc_item (95)
|
|
on left: 112 113, on right: 109 111
|
|
any_lparen (96)
|
|
on left: 114 115, on right: 75 76 77 78 79 80 98
|
|
maybe_anno (97)
|
|
on left: 116 117, on right: 75 76 77 78 79 80 106
|
|
|
|
|
|
State 0
|
|
|
|
0 $accept: . program $end
|
|
1 program: . stmt_list
|
|
2 stmt_list: . stmt_list stmt
|
|
3 | . %empty
|
|
|
|
$default reduce using rule 3 (stmt_list)
|
|
|
|
program go to state 1
|
|
stmt_list go to state 2
|
|
|
|
|
|
State 1
|
|
|
|
0 $accept: program . $end
|
|
|
|
$end shift, and go to state 3
|
|
|
|
|
|
State 2
|
|
|
|
1 program: stmt_list . [$end]
|
|
2 stmt_list: stmt_list . stmt
|
|
4 stmt: . expr
|
|
5 | . RETURN expr
|
|
6 | . RETURN
|
|
7 | . BREAK
|
|
8 | . BREAK expr
|
|
9 | . CONTINUE
|
|
10 | . CONTINUE expr
|
|
11 | . stmt SEMICOLON
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
RETURN shift, and go to state 10
|
|
BREAK shift, and go to state 11
|
|
CONTINUE shift, and go to state 12
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
$default reduce using rule 1 (program)
|
|
|
|
stmt go to state 26
|
|
expr go to state 27
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 3
|
|
|
|
0 $accept: program $end .
|
|
|
|
$default accept
|
|
|
|
|
|
State 4
|
|
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
13 | IF . expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
expr go to state 49
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 5
|
|
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
14 | WHILE . expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
expr go to state 50
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 6
|
|
|
|
15 control_expr: FOR . IDENT IN expr DO stmt_list END
|
|
|
|
IDENT shift, and go to state 51
|
|
|
|
|
|
State 7
|
|
|
|
75 funcdecl_expr: FUNC . IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | FUNC . any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IDENT shift, and go to state 52
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
|
|
any_lparen go to state 53
|
|
|
|
|
|
State 8
|
|
|
|
77 funcdecl_expr: MACRO . IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | MACRO . any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
80 | MACRO . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
LAMBDA shift, and go to state 54
|
|
IDENT shift, and go to state 55
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
|
|
any_lparen go to state 56
|
|
|
|
|
|
State 9
|
|
|
|
79 funcdecl_expr: LAMBDA . any_lparen param_list RPAREN maybe_anno expr END
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
|
|
any_lparen go to state 57
|
|
|
|
|
|
State 10
|
|
|
|
5 stmt: RETURN . expr
|
|
6 | RETURN . [$end, IF, ELSEIF, ELSE, WHILE, FOR, FUNC, MACRO, LAMBDA, RETURN, BREAK, CONTINUE, END, NONE, IDENT, INT, FLOAT, STRING, MINUS, BNOT, LNOT, LBRACE, BLPAREN, LPAREN, LBRACKET, SEMICOLON, POUND]
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
IF [reduce using rule 6 (stmt)]
|
|
WHILE [reduce using rule 6 (stmt)]
|
|
FOR [reduce using rule 6 (stmt)]
|
|
FUNC [reduce using rule 6 (stmt)]
|
|
MACRO [reduce using rule 6 (stmt)]
|
|
LAMBDA [reduce using rule 6 (stmt)]
|
|
NONE [reduce using rule 6 (stmt)]
|
|
IDENT [reduce using rule 6 (stmt)]
|
|
INT [reduce using rule 6 (stmt)]
|
|
FLOAT [reduce using rule 6 (stmt)]
|
|
STRING [reduce using rule 6 (stmt)]
|
|
MINUS [reduce using rule 6 (stmt)]
|
|
BNOT [reduce using rule 6 (stmt)]
|
|
LNOT [reduce using rule 6 (stmt)]
|
|
LBRACE [reduce using rule 6 (stmt)]
|
|
BLPAREN [reduce using rule 6 (stmt)]
|
|
LPAREN [reduce using rule 6 (stmt)]
|
|
LBRACKET [reduce using rule 6 (stmt)]
|
|
POUND [reduce using rule 6 (stmt)]
|
|
$default reduce using rule 6 (stmt)
|
|
|
|
expr go to state 58
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 11
|
|
|
|
7 stmt: BREAK . [$end, IF, ELSEIF, ELSE, WHILE, FOR, FUNC, MACRO, LAMBDA, RETURN, BREAK, CONTINUE, END, NONE, IDENT, INT, FLOAT, STRING, MINUS, BNOT, LNOT, LBRACE, BLPAREN, LPAREN, LBRACKET, SEMICOLON, POUND]
|
|
8 | BREAK . expr
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
IF [reduce using rule 7 (stmt)]
|
|
WHILE [reduce using rule 7 (stmt)]
|
|
FOR [reduce using rule 7 (stmt)]
|
|
FUNC [reduce using rule 7 (stmt)]
|
|
MACRO [reduce using rule 7 (stmt)]
|
|
LAMBDA [reduce using rule 7 (stmt)]
|
|
NONE [reduce using rule 7 (stmt)]
|
|
IDENT [reduce using rule 7 (stmt)]
|
|
INT [reduce using rule 7 (stmt)]
|
|
FLOAT [reduce using rule 7 (stmt)]
|
|
STRING [reduce using rule 7 (stmt)]
|
|
MINUS [reduce using rule 7 (stmt)]
|
|
BNOT [reduce using rule 7 (stmt)]
|
|
LNOT [reduce using rule 7 (stmt)]
|
|
LBRACE [reduce using rule 7 (stmt)]
|
|
BLPAREN [reduce using rule 7 (stmt)]
|
|
LPAREN [reduce using rule 7 (stmt)]
|
|
LBRACKET [reduce using rule 7 (stmt)]
|
|
POUND [reduce using rule 7 (stmt)]
|
|
$default reduce using rule 7 (stmt)
|
|
|
|
expr go to state 59
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 12
|
|
|
|
9 stmt: CONTINUE . [$end, IF, ELSEIF, ELSE, WHILE, FOR, FUNC, MACRO, LAMBDA, RETURN, BREAK, CONTINUE, END, NONE, IDENT, INT, FLOAT, STRING, MINUS, BNOT, LNOT, LBRACE, BLPAREN, LPAREN, LBRACKET, SEMICOLON, POUND]
|
|
10 | CONTINUE . expr
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
IF [reduce using rule 9 (stmt)]
|
|
WHILE [reduce using rule 9 (stmt)]
|
|
FOR [reduce using rule 9 (stmt)]
|
|
FUNC [reduce using rule 9 (stmt)]
|
|
MACRO [reduce using rule 9 (stmt)]
|
|
LAMBDA [reduce using rule 9 (stmt)]
|
|
NONE [reduce using rule 9 (stmt)]
|
|
IDENT [reduce using rule 9 (stmt)]
|
|
INT [reduce using rule 9 (stmt)]
|
|
FLOAT [reduce using rule 9 (stmt)]
|
|
STRING [reduce using rule 9 (stmt)]
|
|
MINUS [reduce using rule 9 (stmt)]
|
|
BNOT [reduce using rule 9 (stmt)]
|
|
LNOT [reduce using rule 9 (stmt)]
|
|
LBRACE [reduce using rule 9 (stmt)]
|
|
BLPAREN [reduce using rule 9 (stmt)]
|
|
LPAREN [reduce using rule 9 (stmt)]
|
|
LBRACKET [reduce using rule 9 (stmt)]
|
|
POUND [reduce using rule 9 (stmt)]
|
|
$default reduce using rule 9 (stmt)
|
|
|
|
expr go to state 60
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 13
|
|
|
|
93 lit_expr: NONE .
|
|
|
|
$default reduce using rule 93 (lit_expr)
|
|
|
|
|
|
State 14
|
|
|
|
20 assign_expr: IDENT . ASSIGN expr
|
|
21 | IDENT . ASSIGNPLUS expr
|
|
22 | IDENT . ASSIGNMINUS expr
|
|
23 | IDENT . ASSIGNSTAR expr
|
|
24 | IDENT . ASSIGNSLASH expr
|
|
25 | IDENT . ASSIGNDSTAR expr
|
|
26 | IDENT . ASSIGNBAND expr
|
|
27 | IDENT . ASSIGNBOR expr
|
|
28 | IDENT . ASSIGNBXOR expr
|
|
87 ref_expr: IDENT . [$end, IF, THEN, ELSEIF, ELSE, WHILE, FOR, DO, FUNC, MACRO, LAMBDA, RETURN, BREAK, CONTINUE, END, NONE, IDENT, INT, FLOAT, STRING, PLUS, MINUS, STAR, SLASH, PERCENT, DSTAR, BAND, BOR, BXOR, BNOT, LAND, LOR, LNOT, EQUAL, NEQUAL, LESS, GREATER, LESSEQ, GREATEREQ, RSHIFT, LSHIFT, LBRACE, RBRACE, BLPAREN, LPAREN, RPAREN, LBRACKET, RBRACKET, DOT, COLON, SEMICOLON, COMMA, POUND, TBANG]
|
|
|
|
ASSIGN shift, and go to state 61
|
|
ASSIGNPLUS shift, and go to state 62
|
|
ASSIGNMINUS shift, and go to state 63
|
|
ASSIGNSTAR shift, and go to state 64
|
|
ASSIGNSLASH shift, and go to state 65
|
|
ASSIGNDSTAR shift, and go to state 66
|
|
ASSIGNBAND shift, and go to state 67
|
|
ASSIGNBOR shift, and go to state 68
|
|
ASSIGNBXOR shift, and go to state 69
|
|
|
|
$default reduce using rule 87 (ref_expr)
|
|
|
|
|
|
State 15
|
|
|
|
89 lit_expr: INT .
|
|
|
|
$default reduce using rule 89 (lit_expr)
|
|
|
|
|
|
State 16
|
|
|
|
91 lit_expr: FLOAT .
|
|
|
|
$default reduce using rule 91 (lit_expr)
|
|
|
|
|
|
State 17
|
|
|
|
92 lit_expr: STRING .
|
|
|
|
$default reduce using rule 92 (lit_expr)
|
|
|
|
|
|
State 18
|
|
|
|
90 lit_expr: MINUS . INT
|
|
|
|
INT shift, and go to state 70
|
|
|
|
|
|
State 19
|
|
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
68 | BNOT . ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
expr go to state 71
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 72
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 20
|
|
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
42 | LNOT . ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
expr go to state 71
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 73
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 21
|
|
|
|
96 gen_expr: LBRACE . assoc_list RBRACE
|
|
108 assoc_list: . %empty [IDENT, RBRACE, LBRACKET, COMMA]
|
|
109 | . assoc_item
|
|
110 | . assoc_list COMMA
|
|
111 | . assoc_list assoc_item
|
|
112 assoc_item: . LBRACKET expr RBRACKET ASSIGN expr
|
|
113 | . IDENT ASSIGN expr
|
|
|
|
IDENT shift, and go to state 74
|
|
LBRACKET shift, and go to state 75
|
|
|
|
IDENT [reduce using rule 108 (assoc_list)]
|
|
LBRACKET [reduce using rule 108 (assoc_list)]
|
|
$default reduce using rule 108 (assoc_list)
|
|
|
|
assoc_list go to state 76
|
|
assoc_item go to state 77
|
|
|
|
|
|
State 22
|
|
|
|
115 any_lparen: BLPAREN .
|
|
|
|
$default reduce using rule 115 (any_lparen)
|
|
|
|
|
|
State 23
|
|
|
|
114 any_lparen: LPAREN .
|
|
|
|
$default reduce using rule 114 (any_lparen)
|
|
|
|
|
|
State 24
|
|
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
95 | LBRACKET . expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
99 expr_list: . %empty [IF, WHILE, FOR, FUNC, MACRO, LAMBDA, NONE, IDENT, INT, FLOAT, STRING, MINUS, BNOT, LNOT, LBRACE, BLPAREN, LPAREN, LBRACKET, RBRACKET, COMMA, POUND]
|
|
100 | . expr
|
|
101 | . expr_list COMMA
|
|
102 | . expr_list expr
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
IF [reduce using rule 99 (expr_list)]
|
|
WHILE [reduce using rule 99 (expr_list)]
|
|
FOR [reduce using rule 99 (expr_list)]
|
|
FUNC [reduce using rule 99 (expr_list)]
|
|
MACRO [reduce using rule 99 (expr_list)]
|
|
LAMBDA [reduce using rule 99 (expr_list)]
|
|
NONE [reduce using rule 99 (expr_list)]
|
|
IDENT [reduce using rule 99 (expr_list)]
|
|
INT [reduce using rule 99 (expr_list)]
|
|
FLOAT [reduce using rule 99 (expr_list)]
|
|
STRING [reduce using rule 99 (expr_list)]
|
|
MINUS [reduce using rule 99 (expr_list)]
|
|
BNOT [reduce using rule 99 (expr_list)]
|
|
LNOT [reduce using rule 99 (expr_list)]
|
|
LBRACE [reduce using rule 99 (expr_list)]
|
|
BLPAREN [reduce using rule 99 (expr_list)]
|
|
LPAREN [reduce using rule 99 (expr_list)]
|
|
LBRACKET [reduce using rule 99 (expr_list)]
|
|
POUND [reduce using rule 99 (expr_list)]
|
|
$default reduce using rule 99 (expr_list)
|
|
|
|
expr go to state 78
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
expr_list go to state 79
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 25
|
|
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
70 | POUND . ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
expr go to state 71
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 80
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 26
|
|
|
|
2 stmt_list: stmt_list stmt . [$end, IF, ELSEIF, ELSE, WHILE, FOR, FUNC, MACRO, LAMBDA, RETURN, BREAK, CONTINUE, END, NONE, IDENT, INT, FLOAT, STRING, MINUS, BNOT, LNOT, LBRACE, BLPAREN, LPAREN, LBRACKET, POUND]
|
|
11 stmt: stmt . SEMICOLON
|
|
|
|
SEMICOLON shift, and go to state 81
|
|
|
|
$default reduce using rule 2 (stmt_list)
|
|
|
|
|
|
State 27
|
|
|
|
4 stmt: expr . [$end, IF, ELSEIF, ELSE, WHILE, FOR, FUNC, MACRO, LAMBDA, RETURN, BREAK, CONTINUE, END, NONE, IDENT, INT, FLOAT, STRING, MINUS, BNOT, LNOT, LBRACE, BLPAREN, LPAREN, LBRACKET, SEMICOLON, POUND]
|
|
82 index_expr: expr . LBRACKET expr RBRACKET
|
|
83 | expr . DOT IDENT
|
|
85 ex_index_expr: expr . LBRACKET expr RBRACKET
|
|
86 | expr . DOT IDENT
|
|
|
|
LBRACKET shift, and go to state 82
|
|
DOT shift, and go to state 83
|
|
|
|
LBRACKET [reduce using rule 4 (stmt)]
|
|
$default reduce using rule 4 (stmt)
|
|
|
|
|
|
State 28
|
|
|
|
12 expr: control_expr .
|
|
|
|
$default reduce using rule 12 (expr)
|
|
|
|
|
|
State 29
|
|
|
|
16 control_expr: assign_expr .
|
|
|
|
$default reduce using rule 16 (control_expr)
|
|
|
|
|
|
State 30
|
|
|
|
38 assign_expr: logic_expr . [$end, IF, THEN, ELSEIF, ELSE, WHILE, FOR, DO, FUNC, MACRO, LAMBDA, RETURN, BREAK, CONTINUE, END, NONE, IDENT, INT, FLOAT, STRING, MINUS, STAR, BNOT, LNOT, LBRACE, RBRACE, BLPAREN, LPAREN, RPAREN, LBRACKET, RBRACKET, DOT, SEMICOLON, COMMA, POUND]
|
|
39 logic_expr: logic_expr . LAND ulogic_expr
|
|
40 | logic_expr . LOR ulogic_expr
|
|
|
|
LAND shift, and go to state 84
|
|
LOR shift, and go to state 85
|
|
|
|
$default reduce using rule 38 (assign_expr)
|
|
|
|
|
|
State 31
|
|
|
|
41 logic_expr: ulogic_expr .
|
|
|
|
$default reduce using rule 41 (logic_expr)
|
|
|
|
|
|
State 32
|
|
|
|
43 ulogic_expr: rel_expr .
|
|
|
|
$default reduce using rule 43 (ulogic_expr)
|
|
|
|
|
|
State 33
|
|
|
|
44 rel_expr: term_expr . EQUAL rel_expr
|
|
45 | term_expr . NEQUAL rel_expr
|
|
46 | term_expr . LESS rel_expr
|
|
47 | term_expr . GREATER rel_expr
|
|
48 | term_expr . LESSEQ rel_expr
|
|
49 | term_expr . GREATEREQ rel_expr
|
|
50 | term_expr . [$end, IF, THEN, ELSEIF, ELSE, WHILE, FOR, DO, FUNC, MACRO, LAMBDA, RETURN, BREAK, CONTINUE, END, NONE, IDENT, INT, FLOAT, STRING, MINUS, STAR, BNOT, LAND, LOR, LNOT, LBRACE, RBRACE, BLPAREN, LPAREN, RPAREN, LBRACKET, RBRACKET, DOT, SEMICOLON, COMMA, POUND]
|
|
51 term_expr: term_expr . PLUS factor_expr
|
|
52 | term_expr . MINUS factor_expr
|
|
|
|
PLUS shift, and go to state 86
|
|
MINUS shift, and go to state 87
|
|
EQUAL shift, and go to state 88
|
|
NEQUAL shift, and go to state 89
|
|
LESS shift, and go to state 90
|
|
GREATER shift, and go to state 91
|
|
LESSEQ shift, and go to state 92
|
|
GREATEREQ shift, and go to state 93
|
|
|
|
MINUS [reduce using rule 50 (rel_expr)]
|
|
$default reduce using rule 50 (rel_expr)
|
|
|
|
|
|
State 34
|
|
|
|
53 term_expr: factor_expr . [$end, IF, THEN, ELSEIF, ELSE, WHILE, FOR, DO, FUNC, MACRO, LAMBDA, RETURN, BREAK, CONTINUE, END, NONE, IDENT, INT, FLOAT, STRING, PLUS, MINUS, STAR, BNOT, LAND, LOR, LNOT, EQUAL, NEQUAL, LESS, GREATER, LESSEQ, GREATEREQ, LBRACE, RBRACE, BLPAREN, LPAREN, RPAREN, LBRACKET, RBRACKET, DOT, SEMICOLON, COMMA, POUND]
|
|
54 factor_expr: factor_expr . STAR power_expr
|
|
55 | factor_expr . SLASH power_expr
|
|
56 | factor_expr . PERCENT power_expr
|
|
|
|
STAR shift, and go to state 94
|
|
SLASH shift, and go to state 95
|
|
PERCENT shift, and go to state 96
|
|
|
|
STAR [reduce using rule 53 (term_expr)]
|
|
$default reduce using rule 53 (term_expr)
|
|
|
|
|
|
State 35
|
|
|
|
57 factor_expr: power_expr .
|
|
|
|
$default reduce using rule 57 (factor_expr)
|
|
|
|
|
|
State 36
|
|
|
|
58 power_expr: tbang_expr . DSTAR power_expr
|
|
59 | tbang_expr . [$end, IF, THEN, ELSEIF, ELSE, WHILE, FOR, DO, FUNC, MACRO, LAMBDA, RETURN, BREAK, CONTINUE, END, NONE, IDENT, INT, FLOAT, STRING, PLUS, MINUS, STAR, SLASH, PERCENT, BNOT, LAND, LOR, LNOT, EQUAL, NEQUAL, LESS, GREATER, LESSEQ, GREATEREQ, LBRACE, RBRACE, BLPAREN, LPAREN, RPAREN, LBRACKET, RBRACKET, DOT, SEMICOLON, COMMA, POUND]
|
|
|
|
DSTAR shift, and go to state 97
|
|
|
|
$default reduce using rule 59 (power_expr)
|
|
|
|
|
|
State 37
|
|
|
|
60 tbang_expr: binary_expr . TBANG tbang_expr
|
|
61 | binary_expr . [$end, IF, THEN, ELSEIF, ELSE, WHILE, FOR, DO, FUNC, MACRO, LAMBDA, RETURN, BREAK, CONTINUE, END, NONE, IDENT, INT, FLOAT, STRING, PLUS, MINUS, STAR, SLASH, PERCENT, DSTAR, BNOT, LAND, LOR, LNOT, EQUAL, NEQUAL, LESS, GREATER, LESSEQ, GREATEREQ, LBRACE, RBRACE, BLPAREN, LPAREN, RPAREN, LBRACKET, RBRACKET, DOT, SEMICOLON, COMMA, POUND]
|
|
62 binary_expr: binary_expr . BAND binary_expr
|
|
63 | binary_expr . BOR binary_expr
|
|
64 | binary_expr . BXOR binary_expr
|
|
65 | binary_expr . LSHIFT binary_expr
|
|
66 | binary_expr . RSHIFT binary_expr
|
|
|
|
BAND shift, and go to state 98
|
|
BOR shift, and go to state 99
|
|
BXOR shift, and go to state 100
|
|
RSHIFT shift, and go to state 101
|
|
LSHIFT shift, and go to state 102
|
|
TBANG shift, and go to state 103
|
|
|
|
$default reduce using rule 61 (tbang_expr)
|
|
|
|
|
|
State 38
|
|
|
|
67 binary_expr: ubinary_expr .
|
|
|
|
$default reduce using rule 67 (binary_expr)
|
|
|
|
|
|
State 39
|
|
|
|
69 ubinary_expr: ulen_expr .
|
|
|
|
$default reduce using rule 69 (ubinary_expr)
|
|
|
|
|
|
State 40
|
|
|
|
71 ulen_expr: call_expr . [$end, IF, THEN, ELSEIF, ELSE, WHILE, FOR, DO, FUNC, MACRO, LAMBDA, RETURN, BREAK, CONTINUE, END, NONE, IDENT, INT, FLOAT, STRING, PLUS, MINUS, STAR, SLASH, PERCENT, DSTAR, BAND, BOR, BXOR, BNOT, LAND, LOR, LNOT, EQUAL, NEQUAL, LESS, GREATER, LESSEQ, GREATEREQ, RSHIFT, LSHIFT, LBRACE, RBRACE, BLPAREN, LPAREN, RPAREN, LBRACKET, RBRACKET, DOT, SEMICOLON, COMMA, POUND, TBANG]
|
|
72 call_expr: call_expr . LPAREN expr_list RPAREN
|
|
73 | call_expr . COLON IDENT LPAREN expr_list RPAREN
|
|
|
|
LPAREN shift, and go to state 104
|
|
COLON shift, and go to state 105
|
|
|
|
LPAREN [reduce using rule 71 (ulen_expr)]
|
|
$default reduce using rule 71 (ulen_expr)
|
|
|
|
|
|
State 41
|
|
|
|
74 call_expr: funcdecl_expr .
|
|
|
|
$default reduce using rule 74 (call_expr)
|
|
|
|
|
|
State 42
|
|
|
|
81 funcdecl_expr: index_expr .
|
|
|
|
$default reduce using rule 81 (funcdecl_expr)
|
|
|
|
|
|
State 43
|
|
|
|
29 assign_expr: ex_index_expr . ASSIGN expr
|
|
30 | ex_index_expr . ASSIGNPLUS expr
|
|
31 | ex_index_expr . ASSIGNMINUS expr
|
|
32 | ex_index_expr . ASSIGNSTAR expr
|
|
33 | ex_index_expr . ASSIGNSLASH expr
|
|
34 | ex_index_expr . ASSIGNDSTAR expr
|
|
35 | ex_index_expr . ASSIGNBAND expr
|
|
36 | ex_index_expr . ASSIGNBOR expr
|
|
37 | ex_index_expr . ASSIGNBXOR expr
|
|
|
|
ASSIGN shift, and go to state 106
|
|
ASSIGNPLUS shift, and go to state 107
|
|
ASSIGNMINUS shift, and go to state 108
|
|
ASSIGNSTAR shift, and go to state 109
|
|
ASSIGNSLASH shift, and go to state 110
|
|
ASSIGNDSTAR shift, and go to state 111
|
|
ASSIGNBAND shift, and go to state 112
|
|
ASSIGNBOR shift, and go to state 113
|
|
ASSIGNBXOR shift, and go to state 114
|
|
|
|
|
|
State 44
|
|
|
|
84 index_expr: ref_expr .
|
|
|
|
$default reduce using rule 84 (index_expr)
|
|
|
|
|
|
State 45
|
|
|
|
88 ref_expr: lit_expr .
|
|
|
|
$default reduce using rule 88 (ref_expr)
|
|
|
|
|
|
State 46
|
|
|
|
94 lit_expr: gen_expr .
|
|
|
|
$default reduce using rule 94 (lit_expr)
|
|
|
|
|
|
State 47
|
|
|
|
97 gen_expr: paren_expr .
|
|
|
|
$default reduce using rule 97 (gen_expr)
|
|
|
|
|
|
State 48
|
|
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
98 | any_lparen . expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
expr go to state 115
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 49
|
|
|
|
13 control_expr: IF expr . THEN stmt_list if_termin
|
|
82 index_expr: expr . LBRACKET expr RBRACKET
|
|
83 | expr . DOT IDENT
|
|
85 ex_index_expr: expr . LBRACKET expr RBRACKET
|
|
86 | expr . DOT IDENT
|
|
|
|
THEN shift, and go to state 116
|
|
LBRACKET shift, and go to state 82
|
|
DOT shift, and go to state 83
|
|
|
|
|
|
State 50
|
|
|
|
14 control_expr: WHILE expr . DO stmt_list END
|
|
82 index_expr: expr . LBRACKET expr RBRACKET
|
|
83 | expr . DOT IDENT
|
|
85 ex_index_expr: expr . LBRACKET expr RBRACKET
|
|
86 | expr . DOT IDENT
|
|
|
|
DO shift, and go to state 117
|
|
LBRACKET shift, and go to state 82
|
|
DOT shift, and go to state 83
|
|
|
|
|
|
State 51
|
|
|
|
15 control_expr: FOR IDENT . IN expr DO stmt_list END
|
|
|
|
IN shift, and go to state 118
|
|
|
|
|
|
State 52
|
|
|
|
75 funcdecl_expr: FUNC IDENT . any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
|
|
any_lparen go to state 119
|
|
|
|
|
|
State 53
|
|
|
|
76 funcdecl_expr: FUNC any_lparen . param_list RPAREN maybe_anno stmt_list END
|
|
103 param_list: . %empty
|
|
104 | . param_list IDENT ASSIGN expr
|
|
105 | . param_list STAR IDENT
|
|
106 | . param_list IDENT maybe_anno
|
|
107 | . param_list COMMA
|
|
|
|
$default reduce using rule 103 (param_list)
|
|
|
|
param_list go to state 120
|
|
|
|
|
|
State 54
|
|
|
|
80 funcdecl_expr: MACRO LAMBDA . any_lparen param_list RPAREN maybe_anno expr END
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
|
|
any_lparen go to state 121
|
|
|
|
|
|
State 55
|
|
|
|
77 funcdecl_expr: MACRO IDENT . any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
|
|
any_lparen go to state 122
|
|
|
|
|
|
State 56
|
|
|
|
78 funcdecl_expr: MACRO any_lparen . param_list RPAREN maybe_anno stmt_list END
|
|
103 param_list: . %empty
|
|
104 | . param_list IDENT ASSIGN expr
|
|
105 | . param_list STAR IDENT
|
|
106 | . param_list IDENT maybe_anno
|
|
107 | . param_list COMMA
|
|
|
|
$default reduce using rule 103 (param_list)
|
|
|
|
param_list go to state 123
|
|
|
|
|
|
State 57
|
|
|
|
79 funcdecl_expr: LAMBDA any_lparen . param_list RPAREN maybe_anno expr END
|
|
103 param_list: . %empty
|
|
104 | . param_list IDENT ASSIGN expr
|
|
105 | . param_list STAR IDENT
|
|
106 | . param_list IDENT maybe_anno
|
|
107 | . param_list COMMA
|
|
|
|
$default reduce using rule 103 (param_list)
|
|
|
|
param_list go to state 124
|
|
|
|
|
|
State 58
|
|
|
|
5 stmt: RETURN expr . [$end, IF, ELSEIF, ELSE, WHILE, FOR, FUNC, MACRO, LAMBDA, RETURN, BREAK, CONTINUE, END, NONE, IDENT, INT, FLOAT, STRING, MINUS, BNOT, LNOT, LBRACE, BLPAREN, LPAREN, LBRACKET, SEMICOLON, POUND]
|
|
82 index_expr: expr . LBRACKET expr RBRACKET
|
|
83 | expr . DOT IDENT
|
|
85 ex_index_expr: expr . LBRACKET expr RBRACKET
|
|
86 | expr . DOT IDENT
|
|
|
|
LBRACKET shift, and go to state 82
|
|
DOT shift, and go to state 83
|
|
|
|
LBRACKET [reduce using rule 5 (stmt)]
|
|
$default reduce using rule 5 (stmt)
|
|
|
|
|
|
State 59
|
|
|
|
8 stmt: BREAK expr . [$end, IF, ELSEIF, ELSE, WHILE, FOR, FUNC, MACRO, LAMBDA, RETURN, BREAK, CONTINUE, END, NONE, IDENT, INT, FLOAT, STRING, MINUS, BNOT, LNOT, LBRACE, BLPAREN, LPAREN, LBRACKET, SEMICOLON, POUND]
|
|
82 index_expr: expr . LBRACKET expr RBRACKET
|
|
83 | expr . DOT IDENT
|
|
85 ex_index_expr: expr . LBRACKET expr RBRACKET
|
|
86 | expr . DOT IDENT
|
|
|
|
LBRACKET shift, and go to state 82
|
|
DOT shift, and go to state 83
|
|
|
|
LBRACKET [reduce using rule 8 (stmt)]
|
|
$default reduce using rule 8 (stmt)
|
|
|
|
|
|
State 60
|
|
|
|
10 stmt: CONTINUE expr . [$end, IF, ELSEIF, ELSE, WHILE, FOR, FUNC, MACRO, LAMBDA, RETURN, BREAK, CONTINUE, END, NONE, IDENT, INT, FLOAT, STRING, MINUS, BNOT, LNOT, LBRACE, BLPAREN, LPAREN, LBRACKET, SEMICOLON, POUND]
|
|
82 index_expr: expr . LBRACKET expr RBRACKET
|
|
83 | expr . DOT IDENT
|
|
85 ex_index_expr: expr . LBRACKET expr RBRACKET
|
|
86 | expr . DOT IDENT
|
|
|
|
LBRACKET shift, and go to state 82
|
|
DOT shift, and go to state 83
|
|
|
|
LBRACKET [reduce using rule 10 (stmt)]
|
|
$default reduce using rule 10 (stmt)
|
|
|
|
|
|
State 61
|
|
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
20 | IDENT ASSIGN . expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
expr go to state 125
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 62
|
|
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
21 | IDENT ASSIGNPLUS . expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
expr go to state 126
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 63
|
|
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
22 | IDENT ASSIGNMINUS . expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
expr go to state 127
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 64
|
|
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
23 | IDENT ASSIGNSTAR . expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
expr go to state 128
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 65
|
|
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
24 | IDENT ASSIGNSLASH . expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
expr go to state 129
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 66
|
|
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
25 | IDENT ASSIGNDSTAR . expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
expr go to state 130
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 67
|
|
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
26 | IDENT ASSIGNBAND . expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
expr go to state 131
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 68
|
|
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
27 | IDENT ASSIGNBOR . expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
78 | . MACRO any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
79 | . LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
80 | . MACRO LAMBDA any_lparen param_list RPAREN maybe_anno expr END
|
|
81 | . index_expr
|
|
82 index_expr: . expr LBRACKET expr RBRACKET
|
|
83 | . expr DOT IDENT
|
|
84 | . ref_expr
|
|
85 ex_index_expr: . expr LBRACKET expr RBRACKET
|
|
86 | . expr DOT IDENT
|
|
87 ref_expr: . IDENT
|
|
88 | . lit_expr
|
|
89 lit_expr: . INT
|
|
90 | . MINUS INT
|
|
91 | . FLOAT
|
|
92 | . STRING
|
|
93 | . NONE
|
|
94 | . gen_expr
|
|
95 gen_expr: . LBRACKET expr_list RBRACKET
|
|
96 | . LBRACE assoc_list RBRACE
|
|
97 | . paren_expr
|
|
98 paren_expr: . any_lparen expr RPAREN
|
|
114 any_lparen: . LPAREN
|
|
115 | . BLPAREN
|
|
|
|
IF shift, and go to state 4
|
|
WHILE shift, and go to state 5
|
|
FOR shift, and go to state 6
|
|
FUNC shift, and go to state 7
|
|
MACRO shift, and go to state 8
|
|
LAMBDA shift, and go to state 9
|
|
NONE shift, and go to state 13
|
|
IDENT shift, and go to state 14
|
|
INT shift, and go to state 15
|
|
FLOAT shift, and go to state 16
|
|
STRING shift, and go to state 17
|
|
MINUS shift, and go to state 18
|
|
BNOT shift, and go to state 19
|
|
LNOT shift, and go to state 20
|
|
LBRACE shift, and go to state 21
|
|
BLPAREN shift, and go to state 22
|
|
LPAREN shift, and go to state 23
|
|
LBRACKET shift, and go to state 24
|
|
POUND shift, and go to state 25
|
|
|
|
expr go to state 132
|
|
control_expr go to state 28
|
|
assign_expr go to state 29
|
|
logic_expr go to state 30
|
|
ulogic_expr go to state 31
|
|
rel_expr go to state 32
|
|
term_expr go to state 33
|
|
factor_expr go to state 34
|
|
power_expr go to state 35
|
|
tbang_expr go to state 36
|
|
binary_expr go to state 37
|
|
ubinary_expr go to state 38
|
|
ulen_expr go to state 39
|
|
call_expr go to state 40
|
|
funcdecl_expr go to state 41
|
|
index_expr go to state 42
|
|
ex_index_expr go to state 43
|
|
ref_expr go to state 44
|
|
lit_expr go to state 45
|
|
gen_expr go to state 46
|
|
paren_expr go to state 47
|
|
any_lparen go to state 48
|
|
|
|
|
|
State 69
|
|
|
|
12 expr: . control_expr
|
|
13 control_expr: . IF expr THEN stmt_list if_termin
|
|
14 | . WHILE expr DO stmt_list END
|
|
15 | . FOR IDENT IN expr DO stmt_list END
|
|
16 | . assign_expr
|
|
20 assign_expr: . IDENT ASSIGN expr
|
|
21 | . IDENT ASSIGNPLUS expr
|
|
22 | . IDENT ASSIGNMINUS expr
|
|
23 | . IDENT ASSIGNSTAR expr
|
|
24 | . IDENT ASSIGNSLASH expr
|
|
25 | . IDENT ASSIGNDSTAR expr
|
|
26 | . IDENT ASSIGNBAND expr
|
|
27 | . IDENT ASSIGNBOR expr
|
|
28 | . IDENT ASSIGNBXOR expr
|
|
28 | IDENT ASSIGNBXOR . expr
|
|
29 | . ex_index_expr ASSIGN expr
|
|
30 | . ex_index_expr ASSIGNPLUS expr
|
|
31 | . ex_index_expr ASSIGNMINUS expr
|
|
32 | . ex_index_expr ASSIGNSTAR expr
|
|
33 | . ex_index_expr ASSIGNSLASH expr
|
|
34 | . ex_index_expr ASSIGNDSTAR expr
|
|
35 | . ex_index_expr ASSIGNBAND expr
|
|
36 | . ex_index_expr ASSIGNBOR expr
|
|
37 | . ex_index_expr ASSIGNBXOR expr
|
|
38 | . logic_expr
|
|
39 logic_expr: . logic_expr LAND ulogic_expr
|
|
40 | . logic_expr LOR ulogic_expr
|
|
41 | . ulogic_expr
|
|
42 ulogic_expr: . LNOT ulogic_expr
|
|
43 | . rel_expr
|
|
44 rel_expr: . term_expr EQUAL rel_expr
|
|
45 | . term_expr NEQUAL rel_expr
|
|
46 | . term_expr LESS rel_expr
|
|
47 | . term_expr GREATER rel_expr
|
|
48 | . term_expr LESSEQ rel_expr
|
|
49 | . term_expr GREATEREQ rel_expr
|
|
50 | . term_expr
|
|
51 term_expr: . term_expr PLUS factor_expr
|
|
52 | . term_expr MINUS factor_expr
|
|
53 | . factor_expr
|
|
54 factor_expr: . factor_expr STAR power_expr
|
|
55 | . factor_expr SLASH power_expr
|
|
56 | . factor_expr PERCENT power_expr
|
|
57 | . power_expr
|
|
58 power_expr: . tbang_expr DSTAR power_expr
|
|
59 | . tbang_expr
|
|
60 tbang_expr: . binary_expr TBANG tbang_expr
|
|
61 | . binary_expr
|
|
62 binary_expr: . binary_expr BAND binary_expr
|
|
63 | . binary_expr BOR binary_expr
|
|
64 | . binary_expr BXOR binary_expr
|
|
65 | . binary_expr LSHIFT binary_expr
|
|
66 | . binary_expr RSHIFT binary_expr
|
|
67 | . ubinary_expr
|
|
68 ubinary_expr: . BNOT ubinary_expr
|
|
69 | . ulen_expr
|
|
70 ulen_expr: . POUND ulen_expr
|
|
71 | . call_expr
|
|
72 call_expr: . call_expr LPAREN expr_list RPAREN
|
|
73 | . call_expr COLON IDENT LPAREN expr_list RPAREN
|
|
74 | . funcdecl_expr
|
|
75 funcdecl_expr: . FUNC IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
76 | . FUNC any_lparen param_list RPAREN maybe_anno stmt_list END
|
|
77 | . MACRO IDENT any_lparen param_list RPAREN maybe_anno stmt_list END
|
|