-
Notifications
You must be signed in to change notification settings - Fork 0
/
parser.out
645 lines (374 loc) · 17.5 KB
/
parser.out
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
Created by PLY version 3.5 (http://www.dabeaz.com/ply)
Grammar
Rule 0 S' -> main
Rule 1 main -> COREDICT SEPARATOR ORENAME TARGET ingredientlist
Rule 2 main -> CSHAPELESSORE SEPARATOR ingredientlist TARGET ingredient
Rule 3 main -> CSHAPELESS SEPARATOR ingredientlist TARGET ingredient
Rule 4 main -> CSHAPED SEPARATOR recipesize ingredientlist TARGET ingredient
Rule 5 main -> CSHAPEDORE SEPARATOR recipesize ingredientlist TARGET ingredient
Rule 6 main -> CITEM SEPARATOR ITEMID ITEMDESCRIPTION
Rule 7 main -> CFURNACE SEPARATOR ingredient TARGET ingredient
Rule 8 main -> CFLUID SEPARATOR ORENAME TARGET fluid fluid booleanst ITEMDESCRIPTION
Rule 9 booleanst -> LPAREN BOOLEAN RPAREN
Rule 10 fluid -> LPAREN ITEMID RPAREN
Rule 11 ingredientlist -> ingredient
Rule 12 ingredientlist -> ingredientlist ingredient
Rule 13 ingredient -> LPAREN ITEMID AMOUNT RPAREN
Rule 14 ingredient -> LPAREN NONE RPAREN
Rule 15 ingredient -> LPAREN ORENAME AMOUNT RPAREN
Rule 16 recipesize -> LPAREN SIZE RPAREN
Terminals, with rules where they appear
AMOUNT : 13 15
BOOLEAN : 9
CFLUID : 8
CFURNACE : 7
CITEM : 6
COREDICT : 1
CSHAPED : 4
CSHAPEDORE : 5
CSHAPELESS : 3
CSHAPELESSORE : 2
ITEMDESCRIPTION : 6 8
ITEMID : 6 10 13
LPAREN : 9 10 13 14 15 16
NONE : 14
ORENAME : 1 8 15
RPAREN : 9 10 13 14 15 16
SEPARATOR : 1 2 3 4 5 6 7 8
SIZE : 16
TARGET : 1 2 3 4 5 7 8
error :
Nonterminals, with rules where they appear
booleanst : 8
fluid : 8 8
ingredient : 2 3 4 5 7 7 11 12
ingredientlist : 1 2 3 4 5 12
main : 0
recipesize : 4 5
Parsing method: LALR
state 0
(0) S' -> . main
(1) main -> . COREDICT SEPARATOR ORENAME TARGET ingredientlist
(2) main -> . CSHAPELESSORE SEPARATOR ingredientlist TARGET ingredient
(3) main -> . CSHAPELESS SEPARATOR ingredientlist TARGET ingredient
(4) main -> . CSHAPED SEPARATOR recipesize ingredientlist TARGET ingredient
(5) main -> . CSHAPEDORE SEPARATOR recipesize ingredientlist TARGET ingredient
(6) main -> . CITEM SEPARATOR ITEMID ITEMDESCRIPTION
(7) main -> . CFURNACE SEPARATOR ingredient TARGET ingredient
(8) main -> . CFLUID SEPARATOR ORENAME TARGET fluid fluid booleanst ITEMDESCRIPTION
COREDICT shift and go to state 7
CSHAPELESSORE shift and go to state 8
CSHAPELESS shift and go to state 3
CSHAPED shift and go to state 9
CSHAPEDORE shift and go to state 1
CITEM shift and go to state 5
CFURNACE shift and go to state 6
CFLUID shift and go to state 4
main shift and go to state 2
state 1
(5) main -> CSHAPEDORE . SEPARATOR recipesize ingredientlist TARGET ingredient
SEPARATOR shift and go to state 10
state 2
(0) S' -> main .
state 3
(3) main -> CSHAPELESS . SEPARATOR ingredientlist TARGET ingredient
SEPARATOR shift and go to state 11
state 4
(8) main -> CFLUID . SEPARATOR ORENAME TARGET fluid fluid booleanst ITEMDESCRIPTION
SEPARATOR shift and go to state 12
state 5
(6) main -> CITEM . SEPARATOR ITEMID ITEMDESCRIPTION
SEPARATOR shift and go to state 13
state 6
(7) main -> CFURNACE . SEPARATOR ingredient TARGET ingredient
SEPARATOR shift and go to state 14
state 7
(1) main -> COREDICT . SEPARATOR ORENAME TARGET ingredientlist
SEPARATOR shift and go to state 15
state 8
(2) main -> CSHAPELESSORE . SEPARATOR ingredientlist TARGET ingredient
SEPARATOR shift and go to state 16
state 9
(4) main -> CSHAPED . SEPARATOR recipesize ingredientlist TARGET ingredient
SEPARATOR shift and go to state 17
state 10
(5) main -> CSHAPEDORE SEPARATOR . recipesize ingredientlist TARGET ingredient
(16) recipesize -> . LPAREN SIZE RPAREN
LPAREN shift and go to state 18
recipesize shift and go to state 19
state 11
(3) main -> CSHAPELESS SEPARATOR . ingredientlist TARGET ingredient
(11) ingredientlist -> . ingredient
(12) ingredientlist -> . ingredientlist ingredient
(13) ingredient -> . LPAREN ITEMID AMOUNT RPAREN
(14) ingredient -> . LPAREN NONE RPAREN
(15) ingredient -> . LPAREN ORENAME AMOUNT RPAREN
LPAREN shift and go to state 21
ingredientlist shift and go to state 20
ingredient shift and go to state 22
state 12
(8) main -> CFLUID SEPARATOR . ORENAME TARGET fluid fluid booleanst ITEMDESCRIPTION
ORENAME shift and go to state 23
state 13
(6) main -> CITEM SEPARATOR . ITEMID ITEMDESCRIPTION
ITEMID shift and go to state 24
state 14
(7) main -> CFURNACE SEPARATOR . ingredient TARGET ingredient
(13) ingredient -> . LPAREN ITEMID AMOUNT RPAREN
(14) ingredient -> . LPAREN NONE RPAREN
(15) ingredient -> . LPAREN ORENAME AMOUNT RPAREN
LPAREN shift and go to state 21
ingredient shift and go to state 25
state 15
(1) main -> COREDICT SEPARATOR . ORENAME TARGET ingredientlist
ORENAME shift and go to state 26
state 16
(2) main -> CSHAPELESSORE SEPARATOR . ingredientlist TARGET ingredient
(11) ingredientlist -> . ingredient
(12) ingredientlist -> . ingredientlist ingredient
(13) ingredient -> . LPAREN ITEMID AMOUNT RPAREN
(14) ingredient -> . LPAREN NONE RPAREN
(15) ingredient -> . LPAREN ORENAME AMOUNT RPAREN
LPAREN shift and go to state 21
ingredientlist shift and go to state 27
ingredient shift and go to state 22
state 17
(4) main -> CSHAPED SEPARATOR . recipesize ingredientlist TARGET ingredient
(16) recipesize -> . LPAREN SIZE RPAREN
LPAREN shift and go to state 18
recipesize shift and go to state 28
state 18
(16) recipesize -> LPAREN . SIZE RPAREN
SIZE shift and go to state 29
state 19
(5) main -> CSHAPEDORE SEPARATOR recipesize . ingredientlist TARGET ingredient
(11) ingredientlist -> . ingredient
(12) ingredientlist -> . ingredientlist ingredient
(13) ingredient -> . LPAREN ITEMID AMOUNT RPAREN
(14) ingredient -> . LPAREN NONE RPAREN
(15) ingredient -> . LPAREN ORENAME AMOUNT RPAREN
LPAREN shift and go to state 21
ingredientlist shift and go to state 30
ingredient shift and go to state 22
state 20
(3) main -> CSHAPELESS SEPARATOR ingredientlist . TARGET ingredient
(12) ingredientlist -> ingredientlist . ingredient
(13) ingredient -> . LPAREN ITEMID AMOUNT RPAREN
(14) ingredient -> . LPAREN NONE RPAREN
(15) ingredient -> . LPAREN ORENAME AMOUNT RPAREN
TARGET shift and go to state 31
LPAREN shift and go to state 21
ingredient shift and go to state 32
state 21
(13) ingredient -> LPAREN . ITEMID AMOUNT RPAREN
(14) ingredient -> LPAREN . NONE RPAREN
(15) ingredient -> LPAREN . ORENAME AMOUNT RPAREN
ITEMID shift and go to state 34
NONE shift and go to state 33
ORENAME shift and go to state 35
state 22
(11) ingredientlist -> ingredient .
TARGET reduce using rule 11 (ingredientlist -> ingredient .)
LPAREN reduce using rule 11 (ingredientlist -> ingredient .)
$end reduce using rule 11 (ingredientlist -> ingredient .)
state 23
(8) main -> CFLUID SEPARATOR ORENAME . TARGET fluid fluid booleanst ITEMDESCRIPTION
TARGET shift and go to state 36
state 24
(6) main -> CITEM SEPARATOR ITEMID . ITEMDESCRIPTION
ITEMDESCRIPTION shift and go to state 37
state 25
(7) main -> CFURNACE SEPARATOR ingredient . TARGET ingredient
TARGET shift and go to state 38
state 26
(1) main -> COREDICT SEPARATOR ORENAME . TARGET ingredientlist
TARGET shift and go to state 39
state 27
(2) main -> CSHAPELESSORE SEPARATOR ingredientlist . TARGET ingredient
(12) ingredientlist -> ingredientlist . ingredient
(13) ingredient -> . LPAREN ITEMID AMOUNT RPAREN
(14) ingredient -> . LPAREN NONE RPAREN
(15) ingredient -> . LPAREN ORENAME AMOUNT RPAREN
TARGET shift and go to state 40
LPAREN shift and go to state 21
ingredient shift and go to state 32
state 28
(4) main -> CSHAPED SEPARATOR recipesize . ingredientlist TARGET ingredient
(11) ingredientlist -> . ingredient
(12) ingredientlist -> . ingredientlist ingredient
(13) ingredient -> . LPAREN ITEMID AMOUNT RPAREN
(14) ingredient -> . LPAREN NONE RPAREN
(15) ingredient -> . LPAREN ORENAME AMOUNT RPAREN
LPAREN shift and go to state 21
ingredientlist shift and go to state 41
ingredient shift and go to state 22
state 29
(16) recipesize -> LPAREN SIZE . RPAREN
RPAREN shift and go to state 42
state 30
(5) main -> CSHAPEDORE SEPARATOR recipesize ingredientlist . TARGET ingredient
(12) ingredientlist -> ingredientlist . ingredient
(13) ingredient -> . LPAREN ITEMID AMOUNT RPAREN
(14) ingredient -> . LPAREN NONE RPAREN
(15) ingredient -> . LPAREN ORENAME AMOUNT RPAREN
TARGET shift and go to state 43
LPAREN shift and go to state 21
ingredient shift and go to state 32
state 31
(3) main -> CSHAPELESS SEPARATOR ingredientlist TARGET . ingredient
(13) ingredient -> . LPAREN ITEMID AMOUNT RPAREN
(14) ingredient -> . LPAREN NONE RPAREN
(15) ingredient -> . LPAREN ORENAME AMOUNT RPAREN
LPAREN shift and go to state 21
ingredient shift and go to state 44
state 32
(12) ingredientlist -> ingredientlist ingredient .
TARGET reduce using rule 12 (ingredientlist -> ingredientlist ingredient .)
LPAREN reduce using rule 12 (ingredientlist -> ingredientlist ingredient .)
$end reduce using rule 12 (ingredientlist -> ingredientlist ingredient .)
state 33
(14) ingredient -> LPAREN NONE . RPAREN
RPAREN shift and go to state 45
state 34
(13) ingredient -> LPAREN ITEMID . AMOUNT RPAREN
AMOUNT shift and go to state 46
state 35
(15) ingredient -> LPAREN ORENAME . AMOUNT RPAREN
AMOUNT shift and go to state 47
state 36
(8) main -> CFLUID SEPARATOR ORENAME TARGET . fluid fluid booleanst ITEMDESCRIPTION
(10) fluid -> . LPAREN ITEMID RPAREN
LPAREN shift and go to state 48
fluid shift and go to state 49
state 37
(6) main -> CITEM SEPARATOR ITEMID ITEMDESCRIPTION .
$end reduce using rule 6 (main -> CITEM SEPARATOR ITEMID ITEMDESCRIPTION .)
state 38
(7) main -> CFURNACE SEPARATOR ingredient TARGET . ingredient
(13) ingredient -> . LPAREN ITEMID AMOUNT RPAREN
(14) ingredient -> . LPAREN NONE RPAREN
(15) ingredient -> . LPAREN ORENAME AMOUNT RPAREN
LPAREN shift and go to state 21
ingredient shift and go to state 50
state 39
(1) main -> COREDICT SEPARATOR ORENAME TARGET . ingredientlist
(11) ingredientlist -> . ingredient
(12) ingredientlist -> . ingredientlist ingredient
(13) ingredient -> . LPAREN ITEMID AMOUNT RPAREN
(14) ingredient -> . LPAREN NONE RPAREN
(15) ingredient -> . LPAREN ORENAME AMOUNT RPAREN
LPAREN shift and go to state 21
ingredientlist shift and go to state 51
ingredient shift and go to state 22
state 40
(2) main -> CSHAPELESSORE SEPARATOR ingredientlist TARGET . ingredient
(13) ingredient -> . LPAREN ITEMID AMOUNT RPAREN
(14) ingredient -> . LPAREN NONE RPAREN
(15) ingredient -> . LPAREN ORENAME AMOUNT RPAREN
LPAREN shift and go to state 21
ingredient shift and go to state 52
state 41
(4) main -> CSHAPED SEPARATOR recipesize ingredientlist . TARGET ingredient
(12) ingredientlist -> ingredientlist . ingredient
(13) ingredient -> . LPAREN ITEMID AMOUNT RPAREN
(14) ingredient -> . LPAREN NONE RPAREN
(15) ingredient -> . LPAREN ORENAME AMOUNT RPAREN
TARGET shift and go to state 53
LPAREN shift and go to state 21
ingredient shift and go to state 32
state 42
(16) recipesize -> LPAREN SIZE RPAREN .
LPAREN reduce using rule 16 (recipesize -> LPAREN SIZE RPAREN .)
state 43
(5) main -> CSHAPEDORE SEPARATOR recipesize ingredientlist TARGET . ingredient
(13) ingredient -> . LPAREN ITEMID AMOUNT RPAREN
(14) ingredient -> . LPAREN NONE RPAREN
(15) ingredient -> . LPAREN ORENAME AMOUNT RPAREN
LPAREN shift and go to state 21
ingredient shift and go to state 54
state 44
(3) main -> CSHAPELESS SEPARATOR ingredientlist TARGET ingredient .
$end reduce using rule 3 (main -> CSHAPELESS SEPARATOR ingredientlist TARGET ingredient .)
state 45
(14) ingredient -> LPAREN NONE RPAREN .
LPAREN reduce using rule 14 (ingredient -> LPAREN NONE RPAREN .)
$end reduce using rule 14 (ingredient -> LPAREN NONE RPAREN .)
TARGET reduce using rule 14 (ingredient -> LPAREN NONE RPAREN .)
state 46
(13) ingredient -> LPAREN ITEMID AMOUNT . RPAREN
RPAREN shift and go to state 55
state 47
(15) ingredient -> LPAREN ORENAME AMOUNT . RPAREN
RPAREN shift and go to state 56
state 48
(10) fluid -> LPAREN . ITEMID RPAREN
ITEMID shift and go to state 57
state 49
(8) main -> CFLUID SEPARATOR ORENAME TARGET fluid . fluid booleanst ITEMDESCRIPTION
(10) fluid -> . LPAREN ITEMID RPAREN
LPAREN shift and go to state 48
fluid shift and go to state 58
state 50
(7) main -> CFURNACE SEPARATOR ingredient TARGET ingredient .
$end reduce using rule 7 (main -> CFURNACE SEPARATOR ingredient TARGET ingredient .)
state 51
(1) main -> COREDICT SEPARATOR ORENAME TARGET ingredientlist .
(12) ingredientlist -> ingredientlist . ingredient
(13) ingredient -> . LPAREN ITEMID AMOUNT RPAREN
(14) ingredient -> . LPAREN NONE RPAREN
(15) ingredient -> . LPAREN ORENAME AMOUNT RPAREN
$end reduce using rule 1 (main -> COREDICT SEPARATOR ORENAME TARGET ingredientlist .)
LPAREN shift and go to state 21
ingredient shift and go to state 32
state 52
(2) main -> CSHAPELESSORE SEPARATOR ingredientlist TARGET ingredient .
$end reduce using rule 2 (main -> CSHAPELESSORE SEPARATOR ingredientlist TARGET ingredient .)
state 53
(4) main -> CSHAPED SEPARATOR recipesize ingredientlist TARGET . ingredient
(13) ingredient -> . LPAREN ITEMID AMOUNT RPAREN
(14) ingredient -> . LPAREN NONE RPAREN
(15) ingredient -> . LPAREN ORENAME AMOUNT RPAREN
LPAREN shift and go to state 21
ingredient shift and go to state 59
state 54
(5) main -> CSHAPEDORE SEPARATOR recipesize ingredientlist TARGET ingredient .
$end reduce using rule 5 (main -> CSHAPEDORE SEPARATOR recipesize ingredientlist TARGET ingredient .)
state 55
(13) ingredient -> LPAREN ITEMID AMOUNT RPAREN .
LPAREN reduce using rule 13 (ingredient -> LPAREN ITEMID AMOUNT RPAREN .)
$end reduce using rule 13 (ingredient -> LPAREN ITEMID AMOUNT RPAREN .)
TARGET reduce using rule 13 (ingredient -> LPAREN ITEMID AMOUNT RPAREN .)
state 56
(15) ingredient -> LPAREN ORENAME AMOUNT RPAREN .
LPAREN reduce using rule 15 (ingredient -> LPAREN ORENAME AMOUNT RPAREN .)
$end reduce using rule 15 (ingredient -> LPAREN ORENAME AMOUNT RPAREN .)
TARGET reduce using rule 15 (ingredient -> LPAREN ORENAME AMOUNT RPAREN .)
state 57
(10) fluid -> LPAREN ITEMID . RPAREN
RPAREN shift and go to state 60
state 58
(8) main -> CFLUID SEPARATOR ORENAME TARGET fluid fluid . booleanst ITEMDESCRIPTION
(9) booleanst -> . LPAREN BOOLEAN RPAREN
LPAREN shift and go to state 62
booleanst shift and go to state 61
state 59
(4) main -> CSHAPED SEPARATOR recipesize ingredientlist TARGET ingredient .
$end reduce using rule 4 (main -> CSHAPED SEPARATOR recipesize ingredientlist TARGET ingredient .)
state 60
(10) fluid -> LPAREN ITEMID RPAREN .
LPAREN reduce using rule 10 (fluid -> LPAREN ITEMID RPAREN .)
state 61
(8) main -> CFLUID SEPARATOR ORENAME TARGET fluid fluid booleanst . ITEMDESCRIPTION
ITEMDESCRIPTION shift and go to state 63
state 62
(9) booleanst -> LPAREN . BOOLEAN RPAREN
BOOLEAN shift and go to state 64
state 63
(8) main -> CFLUID SEPARATOR ORENAME TARGET fluid fluid booleanst ITEMDESCRIPTION .
$end reduce using rule 8 (main -> CFLUID SEPARATOR ORENAME TARGET fluid fluid booleanst ITEMDESCRIPTION .)
state 64
(9) booleanst -> LPAREN BOOLEAN . RPAREN
RPAREN shift and go to state 65
state 65
(9) booleanst -> LPAREN BOOLEAN RPAREN .
ITEMDESCRIPTION reduce using rule 9 (booleanst -> LPAREN BOOLEAN RPAREN .)