178 |
1 exp: . exp OP exp |
1 exp: . exp OP exp |
179 |
2 | . NUM |
2 | . NUM |
180 |
|
|
181 |
NUM shift, and go to state 1 |
NUM shift, and go to state 1 |
|
|
|
|
exp go to state 2 |
|
182 |
|
|
183 |
|
exp go to state 2 |
184 |
|
|
185 |
|
|
186 |
state 1 |
state 1 |
187 |
|
|
188 |
2 exp: NUM . |
2 exp: NUM . |
189 |
|
|
190 |
$default reduce using rule 2 (exp) |
$default reduce using rule 2 (exp) |
|
|
|
191 |
|
|
192 |
|
|
193 |
state 2 |
state 2 |
195 |
0 $axiom: exp . $ |
0 $axiom: exp . $ |
196 |
1 exp: exp . OP exp |
1 exp: exp . OP exp |
197 |
|
|
198 |
$ shift, and go to state 3 |
$ shift, and go to state 3 |
199 |
OP shift, and go to state 4 |
OP shift, and go to state 4 |
|
|
|
200 |
|
|
201 |
|
|
202 |
state 3 |
state 3 |
212 |
1 | exp OP . exp |
1 | exp OP . exp |
213 |
2 | . NUM |
2 | . NUM |
214 |
|
|
215 |
NUM shift, and go to state 1 |
NUM shift, and go to state 1 |
|
|
|
|
exp go to state 5 |
|
216 |
|
|
217 |
|
exp go to state 5 |
218 |
|
|
219 |
|
|
220 |
state 5 |
state 5 |
222 |
1 exp: exp . OP exp [$, OP] |
1 exp: exp . OP exp [$, OP] |
223 |
1 | exp OP exp . [$, OP] |
1 | exp OP exp . [$, OP] |
224 |
|
|
225 |
OP shift, and go to state 4 |
OP shift, and go to state 4 |
|
|
|
|
OP [reduce using rule 1 (exp)] |
|
|
$default reduce using rule 1 (exp) |
|
|
|
|
|
|
|
226 |
|
|
227 |
|
OP [reduce using rule 1 (exp)] |
228 |
|
$default reduce using rule 1 (exp) |
229 |
]]) |
]]) |
230 |
|
|
231 |
AT_CLEANUP |
AT_CLEANUP |
281 |
1 exp: . exp OP exp |
1 exp: . exp OP exp |
282 |
2 | . NUM |
2 | . NUM |
283 |
|
|
284 |
NUM shift, and go to state 1 |
NUM shift, and go to state 1 |
|
|
|
|
exp go to state 2 |
|
285 |
|
|
286 |
|
exp go to state 2 |
287 |
|
|
288 |
|
|
289 |
state 1 |
state 1 |
290 |
|
|
291 |
2 exp: NUM . |
2 exp: NUM . |
292 |
|
|
293 |
$default reduce using rule 2 (exp) |
$default reduce using rule 2 (exp) |
|
|
|
294 |
|
|
295 |
|
|
296 |
state 2 |
state 2 |
298 |
0 $axiom: exp . $ |
0 $axiom: exp . $ |
299 |
1 exp: exp . OP exp |
1 exp: exp . OP exp |
300 |
|
|
301 |
$ shift, and go to state 3 |
$ shift, and go to state 3 |
302 |
OP shift, and go to state 4 |
OP shift, and go to state 4 |
|
|
|
303 |
|
|
304 |
|
|
305 |
state 3 |
state 3 |
315 |
1 | exp OP . exp |
1 | exp OP . exp |
316 |
2 | . NUM |
2 | . NUM |
317 |
|
|
318 |
NUM shift, and go to state 1 |
NUM shift, and go to state 1 |
|
|
|
|
exp go to state 5 |
|
319 |
|
|
320 |
|
exp go to state 5 |
321 |
|
|
322 |
|
|
323 |
state 5 |
state 5 |
325 |
1 exp: exp . OP exp [$, OP] |
1 exp: exp . OP exp [$, OP] |
326 |
1 | exp OP exp . [$, OP] |
1 | exp OP exp . [$, OP] |
327 |
|
|
328 |
|
$default reduce using rule 1 (exp) |
|
$default reduce using rule 1 (exp) |
|
|
|
|
329 |
Conflict between rule 2 and token OP resolved as shift (%left OP). |
Conflict between rule 2 and token OP resolved as shift (%left OP). |
|
|
|
|
|
|
330 |
]]) |
]]) |
331 |
|
|
332 |
AT_CLEANUP |
AT_CLEANUP |
416 |
3 num: . '0' |
3 num: . '0' |
417 |
4 id: . '0' |
4 id: . '0' |
418 |
|
|
419 |
'0' shift, and go to state 1 |
'0' shift, and go to state 1 |
|
|
|
|
exp go to state 2 |
|
|
num go to state 3 |
|
|
id go to state 4 |
|
420 |
|
|
421 |
|
exp go to state 2 |
422 |
|
num go to state 3 |
423 |
|
id go to state 4 |
424 |
|
|
425 |
|
|
426 |
state 1 |
state 1 |
428 |
3 num: '0' . [$] |
3 num: '0' . [$] |
429 |
4 id: '0' . [$] |
4 id: '0' . [$] |
430 |
|
|
431 |
$ reduce using rule 3 (num) |
$ reduce using rule 3 (num) |
432 |
$ [reduce using rule 4 (id)] |
$ [reduce using rule 4 (id)] |
433 |
$default reduce using rule 3 (num) |
$default reduce using rule 3 (num) |
|
|
|
434 |
|
|
435 |
|
|
436 |
state 2 |
state 2 |
437 |
|
|
438 |
0 $axiom: exp . $ |
0 $axiom: exp . $ |
439 |
|
|
440 |
$ shift, and go to state 5 |
$ shift, and go to state 5 |
|
|
|
441 |
|
|
442 |
|
|
443 |
state 3 |
state 3 |
444 |
|
|
445 |
1 exp: num . |
1 exp: num . |
446 |
|
|
447 |
$default reduce using rule 1 (exp) |
$default reduce using rule 1 (exp) |
|
|
|
448 |
|
|
449 |
|
|
450 |
state 4 |
state 4 |
451 |
|
|
452 |
2 exp: id . |
2 exp: id . |
453 |
|
|
454 |
$default reduce using rule 2 (exp) |
$default reduce using rule 2 (exp) |
|
|
|
455 |
|
|
456 |
|
|
457 |
state 5 |
state 5 |
459 |
0 $axiom: exp $ . |
0 $axiom: exp $ . |
460 |
|
|
461 |
$default accept |
$default accept |
|
|
|
|
|
|
462 |
]]) |
]]) |
463 |
|
|
464 |
AT_CLEANUP |
AT_CLEANUP |