@@ -78,15 +78,17 @@ fn yy_action_1(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positio
78
78
}
79
79
80
80
// file:///./inline.mbty
81
- // 14| a=a b=b x b { a + b + $3 + $4 }
81
+ // 14| a=a b=b x x b { a + b + $3 + $4 + $5 }
82
82
fn yy_action_2 (_last_pos : Position , _args : ArrayView [(YYObj , Position , Position )]) -> YYObj {
83
83
let _sub_action_0_result = yy_action_0 (_last_pos , _args [0 :1 ])
84
+ let _sub_action_3_result = yy_action_1 (_args [2 ].2 , _args [3 :4 ])
84
85
let _sub_action_2_result = yy_action_3 (_args [1 ].2 , _args [2 :3 ])
85
86
guard _sub_action_0_result is YYObj_String (a )
86
87
guard _args [1 ].0 is YYObj_String (b )
87
88
guard _sub_action_2_result is YYObj_String (_dollar3 )
88
- guard _args [3 ].0 is YYObj_String (_dollar4 )
89
- YYObj_String ({(); a + b + _dollar3 + _dollar4 })
89
+ guard _sub_action_3_result is YYObj_String (_dollar4 )
90
+ guard _args [4 ].0 is YYObj_String (_dollar5 )
91
+ YYObj_String ({(); a + b + _dollar3 + _dollar4 + _dollar5 })
90
92
}
91
93
92
94
// file:///./inline.mbty
@@ -95,22 +97,52 @@ fn yy_action_4(_last_pos : Position, _args : ArrayView[(YYObj, Position, Positio
95
97
YYObj_String ({(); "b" })
96
98
}
97
99
100
+ // file:///./inline.mbty
101
+ // 14| a=a b=b x x b { a + b + $3 + $4 + $5 }
102
+ fn yy_action_5 (_last_pos : Position , _args : ArrayView [(YYObj , Position , Position )]) -> YYObj {
103
+ let _sub_action_0_result = yy_action_0 (_last_pos , _args [0 :1 ])
104
+ let _sub_action_3_result = yy_action_3 (_args [2 ].2 , _args [3 :4 ])
105
+ let _sub_action_2_result = yy_action_1 (_args [1 ].2 , _args [2 :3 ])
106
+ guard _sub_action_0_result is YYObj_String (a )
107
+ guard _args [1 ].0 is YYObj_String (b )
108
+ guard _sub_action_2_result is YYObj_String (_dollar3 )
109
+ guard _sub_action_3_result is YYObj_String (_dollar4 )
110
+ guard _args [4 ].0 is YYObj_String (_dollar5 )
111
+ YYObj_String ({(); a + b + _dollar3 + _dollar4 + _dollar5 })
112
+ }
113
+
98
114
// file:///./inline.mbty
99
115
// 27| B { "b" }
100
116
fn yy_action_3 (_last_pos : Position , _args : ArrayView [(YYObj , Position , Position )]) -> YYObj {
101
117
YYObj_String ({(); "b" })
102
118
}
103
119
104
120
// file:///./inline.mbty
105
- // 14| a=a b=b x b { a + b + $3 + $4 }
106
- fn yy_action_5 (_last_pos : Position , _args : ArrayView [(YYObj , Position , Position )]) -> YYObj {
121
+ // 14| a=a b=b x x b { a + b + $3 + $4 + $5 }
122
+ fn yy_action_6 (_last_pos : Position , _args : ArrayView [(YYObj , Position , Position )]) -> YYObj {
123
+ let _sub_action_0_result = yy_action_0 (_last_pos , _args [0 :1 ])
124
+ let _sub_action_3_result = yy_action_3 (_args [2 ].2 , _args [3 :4 ])
125
+ let _sub_action_2_result = yy_action_3 (_args [1 ].2 , _args [2 :3 ])
126
+ guard _sub_action_0_result is YYObj_String (a )
127
+ guard _args [1 ].0 is YYObj_String (b )
128
+ guard _sub_action_2_result is YYObj_String (_dollar3 )
129
+ guard _sub_action_3_result is YYObj_String (_dollar4 )
130
+ guard _args [4 ].0 is YYObj_String (_dollar5 )
131
+ YYObj_String ({(); a + b + _dollar3 + _dollar4 + _dollar5 })
132
+ }
133
+
134
+ // file:///./inline.mbty
135
+ // 14| a=a b=b x x b { a + b + $3 + $4 + $5 }
136
+ fn yy_action_7 (_last_pos : Position , _args : ArrayView [(YYObj , Position , Position )]) -> YYObj {
107
137
let _sub_action_0_result = yy_action_0 (_last_pos , _args [0 :1 ])
138
+ let _sub_action_3_result = yy_action_1 (_args [2 ].2 , _args [3 :4 ])
108
139
let _sub_action_2_result = yy_action_1 (_args [1 ].2 , _args [2 :3 ])
109
140
guard _sub_action_0_result is YYObj_String (a )
110
141
guard _args [1 ].0 is YYObj_String (b )
111
142
guard _sub_action_2_result is YYObj_String (_dollar3 )
112
- guard _args [3 ].0 is YYObj_String (_dollar4 )
113
- YYObj_String ({(); a + b + _dollar3 + _dollar4 })
143
+ guard _sub_action_3_result is YYObj_String (_dollar4 )
144
+ guard _args [4 ].0 is YYObj_String (_dollar5 )
145
+ YYObj_String ({(); a + b + _dollar3 + _dollar4 + _dollar5 })
114
146
}
115
147
116
148
fn yy_input (token : Token , _start_pos : Position , _end_pos : Position ) -> (YYSymbol , YYObj ) {
@@ -120,9 +152,11 @@ fn yy_input(token : Token, _start_pos : Position, _end_pos : Position) -> (YYSym
120
152
}
121
153
}
122
154
123
- // [0, start → • A b A b, $]
124
- // [1, start → • A b B b, $]
125
- // [3, start_prime → • start, $]
155
+ // [0, start → • A b A A b, $]
156
+ // [1, start → • A b A B b, $]
157
+ // [2, start → • A b B A b, $]
158
+ // [3, start → • A b B B b, $]
159
+ // [5, start_prime → • start, $]
126
160
fn yy_state_0 (_lookahead : YYSymbol ) -> YYDecision {
127
161
match _lookahead {
128
162
NT_start => Shift (yy_state_1 )
@@ -131,14 +165,16 @@ fn yy_state_0(_lookahead : YYSymbol) -> YYDecision {
131
165
}
132
166
}
133
167
134
- // [3 , start_prime → start •, $]
168
+ // [5 , start_prime → start •, $]
135
169
fn yy_state_1 (_lookahead : YYSymbol ) -> YYDecision {
136
170
Accept
137
171
}
138
172
139
- // [0, start → A • b A b, $]
140
- // [1, start → A • b B b, $]
141
- // [2, b → • B, A / B]
173
+ // [0, start → A • b A A b, $]
174
+ // [1, start → A • b A B b, $]
175
+ // [2, start → A • b B A b, $]
176
+ // [3, start → A • b B B b, $]
177
+ // [4, b → • B, A / B]
142
178
fn yy_state_2 (_lookahead : YYSymbol ) -> YYDecision {
143
179
match _lookahead {
144
180
T_B => Shift (yy_state_3 )
@@ -147,49 +183,101 @@ fn yy_state_2(_lookahead : YYSymbol) -> YYDecision {
147
183
}
148
184
}
149
185
150
- // [2 , b → B •, $ / A / B]
186
+ // [4 , b → B •, $ / A / B]
151
187
fn yy_state_3 (_lookahead : YYSymbol ) -> YYDecision {
152
188
ReduceNoLookahead (1 , NT_b , yy_action_4 )
153
189
}
154
190
155
- // [0, start → A b • A b, $]
156
- // [1, start → A b • B b, $]
191
+ // [0, start → A b • A A b, $]
192
+ // [1, start → A b • A B b, $]
193
+ // [2, start → A b • B A b, $]
194
+ // [3, start → A b • B B b, $]
157
195
fn yy_state_4 (_lookahead : YYSymbol ) -> YYDecision {
158
196
match _lookahead {
159
197
T_B => Shift (yy_state_5 )
160
- T_A => Shift (yy_state_7 )
198
+ T_A => Shift (yy_state_10 )
161
199
_ => Error
162
200
}
163
201
}
164
202
165
- // [1 , start → A b B • b, $]
166
- // [2, b → • B, $]
203
+ // [2 , start → A b B • A b, $]
204
+ // [3, start → A b B • B b , $]
167
205
fn yy_state_5 (_lookahead : YYSymbol ) -> YYDecision {
168
206
match _lookahead {
169
- T_B => Shift (yy_state_3 )
170
- NT_b => Shift (yy_state_6 )
207
+ T_B => Shift (yy_state_6 )
208
+ T_A => Shift (yy_state_8 )
171
209
_ => Error
172
210
}
173
211
}
174
212
175
- // [1, start → A b B b •, $]
213
+ // [3, start → A b B B • b, $]
214
+ // [4, b → • B, $]
176
215
fn yy_state_6 (_lookahead : YYSymbol ) -> YYDecision {
177
- ReduceNoLookahead (4 , NT_start , yy_action_2 )
216
+ match _lookahead {
217
+ T_B => Shift (yy_state_3 )
218
+ NT_b => Shift (yy_state_7 )
219
+ _ => Error
220
+ }
178
221
}
179
222
180
- // [0, start → A b A • b, $]
181
- // [2, b → • B, $]
223
+ // [3, start → A b B B b •, $]
182
224
fn yy_state_7 (_lookahead : YYSymbol ) -> YYDecision {
225
+ ReduceNoLookahead (5 , NT_start , yy_action_6 )
226
+ }
227
+
228
+ // [2, start → A b B A • b, $]
229
+ // [4, b → • B, $]
230
+ fn yy_state_8 (_lookahead : YYSymbol ) -> YYDecision {
183
231
match _lookahead {
184
232
T_B => Shift (yy_state_3 )
185
- NT_b => Shift (yy_state_8 )
233
+ NT_b => Shift (yy_state_9 )
186
234
_ => Error
187
235
}
188
236
}
189
237
190
- // [0, start → A b A b •, $]
191
- fn yy_state_8 (_lookahead : YYSymbol ) -> YYDecision {
192
- ReduceNoLookahead (4 , NT_start , yy_action_5 )
238
+ // [2, start → A b B A b •, $]
239
+ fn yy_state_9 (_lookahead : YYSymbol ) -> YYDecision {
240
+ ReduceNoLookahead (5 , NT_start , yy_action_2 )
241
+ }
242
+
243
+ // [0, start → A b A • A b, $]
244
+ // [1, start → A b A • B b, $]
245
+ fn yy_state_10 (_lookahead : YYSymbol ) -> YYDecision {
246
+ match _lookahead {
247
+ T_B => Shift (yy_state_11 )
248
+ T_A => Shift (yy_state_13 )
249
+ _ => Error
250
+ }
251
+ }
252
+
253
+ // [1, start → A b A B • b, $]
254
+ // [4, b → • B, $]
255
+ fn yy_state_11 (_lookahead : YYSymbol ) -> YYDecision {
256
+ match _lookahead {
257
+ T_B => Shift (yy_state_3 )
258
+ NT_b => Shift (yy_state_12 )
259
+ _ => Error
260
+ }
261
+ }
262
+
263
+ // [1, start → A b A B b •, $]
264
+ fn yy_state_12 (_lookahead : YYSymbol ) -> YYDecision {
265
+ ReduceNoLookahead (5 , NT_start , yy_action_5 )
266
+ }
267
+
268
+ // [0, start → A b A A • b, $]
269
+ // [4, b → • B, $]
270
+ fn yy_state_13 (_lookahead : YYSymbol ) -> YYDecision {
271
+ match _lookahead {
272
+ T_B => Shift (yy_state_3 )
273
+ NT_b => Shift (yy_state_14 )
274
+ _ => Error
275
+ }
276
+ }
277
+
278
+ // [0, start → A b A A b •, $]
279
+ fn yy_state_14 (_lookahead : YYSymbol ) -> YYDecision {
280
+ ReduceNoLookahead (5 , NT_start , yy_action_7 )
193
281
}
194
282
195
283
fn yy_parse [T ](
0 commit comments