-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug.txt
More file actions
1512 lines (1292 loc) · 26.5 KB
/
debug.txt
File metadata and controls
1512 lines (1292 loc) · 26.5 KB
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
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
0 g76493 = (g76494)
1 g76494 = (statements EOF)
2 statements = (statement semicolon)
3 statements = (statements statement semicolon)
4 statement = (compoundstm)
5 statement = (simplestm)
6 simplestm = (VAR assign exp)
7 simplestm = (return exp)
8 simplestm = (return)
9 simplestm = (global VAR)
10 simplestm = (pass)
11 simplestm = (break)
12 simplestm = (continue)
13 compoundstm = (print op atom cp)
14 compoundstm = (def VAR op params cp colon statements)
15 compoundstm = (def VAR op cp colon statements)
16 compoundstm = (if exp colon statements else colon statements)
17 compoundstm = (for VAR in exp colon statements)
18 params = (VAR assign exp)
19 params = (params comma VAR assign exp)
20 exp = (disj)
21 disj = (conj)
22 disj = (disj or conj)
23 conj = (inversion)
24 conj = (conj and inversion)
25 inversion = (not inversion)
26 inversion = (comparison)
27 comparison = (sum compareopsumpairs)
28 comparison = (sum)
29 compareopsumpairs = (compareopsumpair)
30 compareopsumpairs = (compareopsumpairs compareopsumpair)
31 compareopsumpair = (COMP sum)
32 sum = (sum plus term)
33 sum = (sum minus term)
34 sum = (term)
35 term = (term mult factor)
36 term = (term div factor)
37 term = (factor)
38 factor = (plus factor)
39 factor = (minus factor)
40 factor = (power)
41 power = (atom pow factor)
42 power = (primary)
43 primary = (atom)
44 primary = (primary ob exp cb)
45 primary = (primary op cp)
46 primary = (primary op args cp)
47 args = (exp)
48 args = (args comma exp)
49 atom = (VAR)
50 atom = (BOOL)
51 atom = (None)
52 atom = (NUM)
53 atom = (ob exps cb)
54 atom = (ob cb)
55 exps = (exps comma exp)
56 exps = (exp)
State 0
g76493 -> . g76494
pass shift 10
VAR shift 6
for shift 14
continue shift 12
g76494 goto 1
if shift 8
return shift 9
global shift 15
simplestm goto 4
compoundstm goto 5
statements goto 2
def shift 13
print shift 7
break shift 11
statement goto 3
State 1
g76493 -> g76494 .
State 2
g76494 -> statements . EOF
statements -> statements . statement semicolon
pass shift 10
VAR shift 6
for shift 14
continue shift 12
if shift 8
return shift 9
global shift 15
simplestm goto 4
compoundstm goto 5
def shift 13
print shift 7
break shift 11
statement goto 16
EOF accept
State 3
statements -> statement . semicolon
semicolon shift 18
State 4
statement -> simplestm .
semicolon reduce 5
State 5
statement -> compoundstm .
semicolon reduce 4
State 6
simplestm -> VAR . assign exp
assign shift 19
State 7
compoundstm -> print . op atom cp
op shift 20
State 8
compoundstm -> if . exp colon statements else colon statements
conj goto 23
disj goto 22
not shift 39
term goto 27
ob shift 38
None shift 37
minus shift 36
factor goto 28
primary goto 30
BOOL shift 34
atom goto 31
VAR shift 33
NUM shift 32
plus shift 35
comparison goto 25
inversion goto 24
exp goto 21
power goto 29
sum goto 26
State 9
simplestm -> return . exp
simplestm -> return .
conj goto 23
disj goto 22
not shift 39
term goto 27
ob shift 38
None shift 37
semicolon reduce 8
minus shift 36
factor goto 28
primary goto 30
BOOL shift 34
atom goto 31
VAR shift 33
NUM shift 32
plus shift 35
comparison goto 25
inversion goto 24
exp goto 40
sum goto 26
power goto 29
State 10
simplestm -> pass .
semicolon reduce 10
State 11
simplestm -> break .
semicolon reduce 11
State 12
simplestm -> continue .
semicolon reduce 12
State 13
compoundstm -> def . VAR op params cp colon statements
compoundstm -> def . VAR op cp colon statements
VAR shift 41
State 14
compoundstm -> for . VAR in exp colon statements
VAR shift 42
State 15
simplestm -> global . VAR
VAR shift 43
State 16
statements -> statements statement . semicolon
semicolon shift 44
State 17
g76494 -> statements EOF .
State 18
statements -> statement semicolon .
pass reduce 2
VAR reduce 2
for reduce 2
if reduce 2
continue reduce 2
return reduce 2
global reduce 2
def reduce 2
semicolon reduce 2
else reduce 2
print reduce 2
break reduce 2
EOF reduce 2
State 19
simplestm -> VAR assign . exp
conj goto 23
disj goto 22
not shift 39
term goto 27
ob shift 38
None shift 37
minus shift 36
factor goto 28
primary goto 30
BOOL shift 34
atom goto 31
VAR shift 33
NUM shift 32
plus shift 35
comparison goto 25
inversion goto 24
exp goto 45
power goto 29
sum goto 26
State 20
compoundstm -> print op . atom cp
ob shift 38
BOOL shift 34
None shift 37
VAR shift 33
atom goto 46
NUM shift 32
State 21
compoundstm -> if exp . colon statements else colon statements
colon shift 47
State 22
exp -> disj .
disj -> disj . or conj
or shift 48
semicolon reduce 20
comma reduce 20
cp reduce 20
colon reduce 20
cb reduce 20
State 23
disj -> conj .
conj -> conj . and inversion
and shift 49
semicolon reduce 21
or reduce 21
comma reduce 21
cp reduce 21
colon reduce 21
cb reduce 21
State 24
conj -> inversion .
and reduce 23
semicolon reduce 23
or reduce 23
comma reduce 23
cp reduce 23
colon reduce 23
cb reduce 23
State 25
inversion -> comparison .
and reduce 26
semicolon reduce 26
or reduce 26
comma reduce 26
cp reduce 26
colon reduce 26
cb reduce 26
State 26
comparison -> sum . compareopsumpairs
comparison -> sum .
sum -> sum . plus term
sum -> sum . minus term
and reduce 28
or reduce 28
colon reduce 28
plus shift 53
cb reduce 28
compareopsumpairs goto 50
minus shift 54
semicolon reduce 28
cp reduce 28
comma reduce 28
compareopsumpair goto 51
COMP shift 52
State 27
sum -> term .
term -> term . mult factor
term -> term . div factor
and reduce 34
or reduce 34
colon reduce 34
plus reduce 34
cb reduce 34
semicolon reduce 34
minus reduce 34
cp reduce 34
comma reduce 34
mult shift 55
div shift 56
COMP reduce 34
State 28
term -> factor .
and reduce 37
or reduce 37
colon reduce 37
plus reduce 37
cb reduce 37
minus reduce 37
semicolon reduce 37
cp reduce 37
comma reduce 37
mult reduce 37
div reduce 37
COMP reduce 37
State 29
factor -> power .
and reduce 40
or reduce 40
colon reduce 40
plus reduce 40
cb reduce 40
minus reduce 40
semicolon reduce 40
cp reduce 40
comma reduce 40
mult reduce 40
div reduce 40
COMP reduce 40
State 30
power -> primary .
primary -> primary . ob exp cb
primary -> primary . op cp
primary -> primary . op args cp
and reduce 42
or reduce 42
colon reduce 42
op shift 58
plus reduce 42
cb reduce 42
ob shift 57
minus reduce 42
semicolon reduce 42
cp reduce 42
comma reduce 42
mult reduce 42
div reduce 42
COMP reduce 42
State 31
power -> atom . pow factor
primary -> atom .
and reduce 43
or reduce 43
colon reduce 43
op reduce 43
plus reduce 43
cb reduce 43
ob reduce 43
minus reduce 43
semicolon reduce 43
pow shift 59
cp reduce 43
comma reduce 43
mult reduce 43
div reduce 43
COMP reduce 43
State 32
atom -> NUM .
and reduce 52
or reduce 52
colon reduce 52
op reduce 52
plus reduce 52
cb reduce 52
ob reduce 52
minus reduce 52
semicolon reduce 52
pow reduce 52
cp reduce 52
comma reduce 52
mult reduce 52
div reduce 52
COMP reduce 52
State 33
atom -> VAR .
and reduce 49
or reduce 49
colon reduce 49
op reduce 49
plus reduce 49
cb reduce 49
ob reduce 49
minus reduce 49
semicolon reduce 49
pow reduce 49
cp reduce 49
comma reduce 49
mult reduce 49
div reduce 49
COMP reduce 49
State 34
atom -> BOOL .
and reduce 50
or reduce 50
colon reduce 50
op reduce 50
plus reduce 50
cb reduce 50
ob reduce 50
minus reduce 50
semicolon reduce 50
pow reduce 50
cp reduce 50
comma reduce 50
mult reduce 50
div reduce 50
COMP reduce 50
State 35
factor -> plus . factor
BOOL shift 34
atom goto 31
VAR shift 33
NUM shift 32
plus shift 35
ob shift 38
None shift 37
minus shift 36
factor goto 60
power goto 29
primary goto 30
State 36
factor -> minus . factor
BOOL shift 34
atom goto 31
VAR shift 33
NUM shift 32
plus shift 35
ob shift 38
None shift 37
minus shift 36
factor goto 61
power goto 29
primary goto 30
State 37
atom -> None .
and reduce 51
or reduce 51
colon reduce 51
op reduce 51
plus reduce 51
cb reduce 51
ob reduce 51
minus reduce 51
semicolon reduce 51
pow reduce 51
cp reduce 51
comma reduce 51
mult reduce 51
div reduce 51
COMP reduce 51
State 38
atom -> ob . exps cb
atom -> ob . cb
conj goto 23
disj goto 22
not shift 39
term goto 27
cb shift 64
ob shift 38
None shift 37
minus shift 36
factor goto 28
exps goto 63
primary goto 30
BOOL shift 34
atom goto 31
VAR shift 33
NUM shift 32
plus shift 35
comparison goto 25
inversion goto 24
exp goto 62
power goto 29
sum goto 26
State 39
inversion -> not . inversion
BOOL shift 34
VAR shift 33
atom goto 31
NUM shift 32
not shift 39
term goto 27
plus shift 35
comparison goto 25
ob shift 38
inversion goto 65
None shift 37
minus shift 36
factor goto 28
sum goto 26
power goto 29
primary goto 30
State 40
simplestm -> return exp .
semicolon reduce 7
State 41
compoundstm -> def VAR . op params cp colon statements
compoundstm -> def VAR . op cp colon statements
op shift 66
State 42
compoundstm -> for VAR . in exp colon statements
in shift 67
State 43
simplestm -> global VAR .
semicolon reduce 9
State 44
statements -> statements statement semicolon .
pass reduce 3
VAR reduce 3
for reduce 3
if reduce 3
continue reduce 3
return reduce 3
global reduce 3
def reduce 3
semicolon reduce 3
else reduce 3
print reduce 3
break reduce 3
EOF reduce 3
State 45
simplestm -> VAR assign exp .
semicolon reduce 6
State 46
compoundstm -> print op atom . cp
cp shift 68
State 47
compoundstm -> if exp colon . statements else colon statements
pass shift 10
VAR shift 6
for shift 14
continue shift 12
if shift 8
return shift 9
global shift 15
simplestm goto 4
compoundstm goto 5
statements goto 69
def shift 13
print shift 7
break shift 11
statement goto 3
State 48
disj -> disj or . conj
conj goto 70
term goto 27
not shift 39
ob shift 38
None shift 37
minus shift 36
factor goto 28
primary goto 30
BOOL shift 34
atom goto 31
VAR shift 33
NUM shift 32
plus shift 35
comparison goto 25
inversion goto 24
power goto 29
sum goto 26
State 49
conj -> conj and . inversion
BOOL shift 34
VAR shift 33
atom goto 31
NUM shift 32
not shift 39
term goto 27
plus shift 35
comparison goto 25
ob shift 38
inversion goto 71
None shift 37
minus shift 36
factor goto 28
sum goto 26
power goto 29
primary goto 30
State 50
comparison -> sum compareopsumpairs .
compareopsumpairs -> compareopsumpairs . compareopsumpair
and reduce 27
or reduce 27
colon reduce 27
cb reduce 27
semicolon reduce 27
cp reduce 27
comma reduce 27
compareopsumpair goto 72
COMP shift 52
State 51
compareopsumpairs -> compareopsumpair .
and reduce 29
semicolon reduce 29
or reduce 29
comma reduce 29
cp reduce 29
colon reduce 29
COMP reduce 29
cb reduce 29
State 52
compareopsumpair -> COMP . sum
BOOL shift 34
atom goto 31
VAR shift 33
NUM shift 32
term goto 27
plus shift 35
ob shift 38
None shift 37
minus shift 36
factor goto 28
sum goto 73
power goto 29
primary goto 30
State 53
sum -> sum plus . term
BOOL shift 34
atom goto 31
VAR shift 33
NUM shift 32
term goto 74
plus shift 35
ob shift 38
None shift 37
minus shift 36
factor goto 28
power goto 29
primary goto 30
State 54
sum -> sum minus . term
BOOL shift 34
atom goto 31
VAR shift 33
NUM shift 32
term goto 75
plus shift 35
ob shift 38
None shift 37
minus shift 36
factor goto 28
power goto 29
primary goto 30
State 55
term -> term mult . factor
BOOL shift 34
atom goto 31
VAR shift 33
NUM shift 32
plus shift 35
ob shift 38
None shift 37
minus shift 36
factor goto 76
power goto 29
primary goto 30
State 56
term -> term div . factor
BOOL shift 34
atom goto 31
VAR shift 33
NUM shift 32
plus shift 35
ob shift 38
None shift 37
minus shift 36
factor goto 77
power goto 29
primary goto 30
State 57
primary -> primary ob . exp cb
conj goto 23
disj goto 22
not shift 39
term goto 27
ob shift 38
None shift 37
minus shift 36
factor goto 28
primary goto 30
BOOL shift 34
atom goto 31
VAR shift 33
NUM shift 32
plus shift 35
comparison goto 25
inversion goto 24
exp goto 78
power goto 29
sum goto 26
State 58
primary -> primary op . cp
primary -> primary op . args cp
conj goto 23
disj goto 22
not shift 39
term goto 27
ob shift 38
None shift 37
minus shift 36
cp shift 81
factor goto 28
primary goto 30
BOOL shift 34
atom goto 31
VAR shift 33
NUM shift 32
plus shift 35
comparison goto 25
inversion goto 24
exp goto 79
args goto 80
power goto 29
sum goto 26
State 59
power -> atom pow . factor
BOOL shift 34
atom goto 31
VAR shift 33
NUM shift 32
plus shift 35
ob shift 38
None shift 37
minus shift 36
factor goto 82
power goto 29
primary goto 30
State 60
factor -> plus factor .
and reduce 38
or reduce 38
colon reduce 38
plus reduce 38
cb reduce 38
minus reduce 38
semicolon reduce 38
cp reduce 38
comma reduce 38
mult reduce 38
div reduce 38
COMP reduce 38
State 61
factor -> minus factor .
and reduce 39
or reduce 39
colon reduce 39
plus reduce 39
cb reduce 39
minus reduce 39
semicolon reduce 39
cp reduce 39
comma reduce 39
mult reduce 39
div reduce 39
COMP reduce 39
State 62
exps -> exp .
comma reduce 56
cb reduce 56
State 63
atom -> ob exps . cb
exps -> exps . comma exp
comma shift 83
cb shift 84
State 64
atom -> ob cb .
and reduce 54
or reduce 54
colon reduce 54
op reduce 54
plus reduce 54
cb reduce 54
ob reduce 54
minus reduce 54
semicolon reduce 54
pow reduce 54
cp reduce 54
comma reduce 54
mult reduce 54
div reduce 54
COMP reduce 54
State 65
inversion -> not inversion .
and reduce 25
semicolon reduce 25
or reduce 25
comma reduce 25
cp reduce 25
colon reduce 25
cb reduce 25
State 66
compoundstm -> def VAR op . params cp colon statements
compoundstm -> def VAR op . cp colon statements
VAR shift 86
cp shift 87
params goto 85
State 67
compoundstm -> for VAR in . exp colon statements
conj goto 23
disj goto 22
not shift 39
term goto 27
ob shift 38
None shift 37
minus shift 36
factor goto 28
primary goto 30
BOOL shift 34
atom goto 31
VAR shift 33
NUM shift 32
plus shift 35
comparison goto 25
inversion goto 24
exp goto 88
power goto 29
sum goto 26
State 68
compoundstm -> print op atom cp .
semicolon reduce 13
State 69
statements -> statements . statement semicolon
compoundstm -> if exp colon statements . else colon statements
pass shift 10
VAR shift 6
for shift 14
continue shift 12
if shift 8
return shift 9
global shift 15
simplestm goto 4
compoundstm goto 5
def shift 13
else shift 89
print shift 7
break shift 11
statement goto 16
State 70
disj -> disj or conj .
conj -> conj . and inversion
and shift 49
semicolon reduce 22
or reduce 22
comma reduce 22
cp reduce 22
colon reduce 22
cb reduce 22
State 71
conj -> conj and inversion .
and reduce 24
semicolon reduce 24
or reduce 24
comma reduce 24
cp reduce 24