-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparser.out
More file actions
5966 lines (5215 loc) · 223 KB
/
parser.out
File metadata and controls
5966 lines (5215 loc) · 223 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
Created by PLY version 3.11 (http://www.dabeaz.com/ply)
Unused terminals:
ERROR
Grammar
Rule 0 S' -> program
Rule 1 program -> declist MAIN LRB RRB block
Rule 2 declist -> <empty>
Rule 3 declist -> declist dec
Rule 4 dec -> vardec
Rule 5 vardec -> idlist COLON type SEMICOLON
Rule 6 type -> INTEGER
Rule 7 type -> FLOAT
Rule 8 type -> BOOLEAN
Rule 9 iddec -> ID
Rule 10 iddec -> ID ASSIGN exp
Rule 11 iddec -> ID LSB exp RSB
Rule 12 idlist -> iddec
Rule 13 idlist -> idlist COMMA iddec
Rule 14 exp -> ID ASSIGN exp
Rule 15 exp -> exp SUM exp
Rule 16 exp -> exp SUB exp
Rule 17 exp -> exp DIV exp
Rule 18 exp -> exp MOD exp
Rule 19 exp -> exp MUL exp
Rule 20 exp -> const
Rule 21 exp -> ID
Rule 22 exp -> ID LSB exp RSB
Rule 23 exp -> ID LSB exp RSB ASSIGN exp
Rule 24 exp -> SUB exp
Rule 25 exp -> LRB exp RRB
Rule 26 const -> FLOATNUMBER
Rule 27 const -> INTEGERNUMBER
Rule 28 block -> LCB stmtlist RCB
Rule 29 stmtlist -> stmtlist stmt
Rule 30 stmtlist -> <empty>
Rule 31 stmt -> exp SEMICOLON
Rule 32 stmt -> block
Rule 33 stmt -> vardec
Rule 34 stmt -> PRINT LRB ID RRB SEMICOLON
Rule 35 stmt -> IF LRB exp RRB stmt elseiflist
Rule 36 stmt -> WHILE LRB exp RRB stmt
Rule 37 stmt -> IF LRB exp RRB stmt elseiflist ELSE stmt
Rule 38 stmt -> FOR LRB exp SEMICOLON exp SEMICOLON exp RRB stmt
Rule 39 stmt -> FOR LRB ID IN ID RRB stmt
Rule 40 stmt -> ON LRB exp RRB LCB cases RCB SEMICOLON
Rule 41 case -> WHERE const COLON stmtlist
Rule 42 cases -> cases case
Rule 43 cases -> <empty>
Rule 44 elseiflist -> elseiflist ELSEIF LRB exp RRB stmt
Rule 45 elseiflist -> <empty>
Rule 46 exp -> relopexp
Rule 47 relopexp -> exp GT exp
Rule 48 relopexp -> exp LT exp
Rule 49 relopexp -> exp NE exp
Rule 50 relopexp -> exp EQ exp
Rule 51 relopexp -> exp LE exp
Rule 52 relopexp -> exp GE exp
Rule 53 relopexp -> relopexp GT exp
Rule 54 relopexp -> relopexp LT exp
Rule 55 relopexp -> relopexp NE exp
Rule 56 relopexp -> relopexp EQ exp
Rule 57 relopexp -> relopexp LE exp
Rule 58 relopexp -> relopexp GE exp
Rule 59 exp -> exp AND exp
Rule 60 exp -> exp OR exp
Rule 61 exp -> NOT exp
Rule 62 const -> TRUE
Rule 63 const -> FALSE
Rule 64 paramdecs -> paramdecslist
Rule 65 paramdecs -> <empty>
Rule 66 paramdecslist -> paramdec
Rule 67 paramdecslist -> paramdecslist COMMA paramdec
Rule 68 paramdec -> ID COLON type
Rule 69 paramdec -> ID LSB RSB COLON type
Rule 70 exp -> ID LRB RRB
Rule 71 exp -> ID LRB explist RRB
Rule 72 funcdec -> FUNCTION ID LRB paramdecs RRB block
Rule 73 funcdec -> FUNCTION ID LRB paramdecs RRB COLON type block
Rule 74 explist -> exp
Rule 75 explist -> explist COMMA exp
Rule 76 dec -> funcdec
Rule 77 stmt -> RETURN exp SEMICOLON
Terminals, with rules where they appear
AND : 59
ASSIGN : 10 14 23
BOOLEAN : 8
COLON : 5 41 68 69 73
COMMA : 13 67 75
DIV : 17
ELSE : 37
ELSEIF : 44
EQ : 50 56
ERROR :
FALSE : 63
FLOAT : 7
FLOATNUMBER : 26
FOR : 38 39
FUNCTION : 72 73
GE : 52 58
GT : 47 53
ID : 9 10 11 14 21 22 23 34 39 39 68 69 70 71 72 73
IF : 35 37
IN : 39
INTEGER : 6
INTEGERNUMBER : 27
LCB : 28 40
LE : 51 57
LRB : 1 25 34 35 36 37 38 39 40 44 70 71 72 73
LSB : 11 22 23 69
LT : 48 54
MAIN : 1
MOD : 18
MUL : 19
NE : 49 55
NOT : 61
ON : 40
OR : 60
PRINT : 34
RCB : 28 40
RETURN : 77
RRB : 1 25 34 35 36 37 38 39 40 44 70 71 72 73
RSB : 11 22 23 69
SEMICOLON : 5 31 34 38 38 40 77
SUB : 16 24
SUM : 15
TRUE : 62
WHERE : 41
WHILE : 36
error :
Nonterminals, with rules where they appear
block : 1 32 72 73
case : 42
cases : 40 42
const : 20 41
dec : 3
declist : 1 3
elseiflist : 35 37 44
exp : 10 11 14 15 15 16 16 17 17 18 18 19 19 22 23 23 24 25 31 35 36 37 38 38 38 40 44 47 47 48 48 49 49 50 50 51 51 52 52 53 54 55 56 57 58 59 59 60 60 61 74 75 77
explist : 71 75
funcdec : 76
iddec : 12 13
idlist : 5 13
paramdec : 66 67
paramdecs : 72 73
paramdecslist : 64 67
program : 0
relopexp : 46 53 54 55 56 57 58
stmt : 29 35 36 37 37 38 39 44
stmtlist : 28 29 41
type : 5 68 69 73
vardec : 4 33
Parsing method: LALR
state 0
(0) S' -> . program
(1) program -> . declist MAIN LRB RRB block
(2) declist -> .
(3) declist -> . declist dec
MAIN reduce using rule 2 (declist -> .)
FUNCTION reduce using rule 2 (declist -> .)
ID reduce using rule 2 (declist -> .)
program shift and go to state 1
declist shift and go to state 2
state 1
(0) S' -> program .
state 2
(1) program -> declist . MAIN LRB RRB block
(3) declist -> declist . dec
(4) dec -> . vardec
(76) dec -> . funcdec
(5) vardec -> . idlist COLON type SEMICOLON
(72) funcdec -> . FUNCTION ID LRB paramdecs RRB block
(73) funcdec -> . FUNCTION ID LRB paramdecs RRB COLON type block
(12) idlist -> . iddec
(13) idlist -> . idlist COMMA iddec
(9) iddec -> . ID
(10) iddec -> . ID ASSIGN exp
(11) iddec -> . ID LSB exp RSB
MAIN shift and go to state 3
FUNCTION shift and go to state 8
ID shift and go to state 9
dec shift and go to state 4
vardec shift and go to state 5
funcdec shift and go to state 6
idlist shift and go to state 7
iddec shift and go to state 10
state 3
(1) program -> declist MAIN . LRB RRB block
LRB shift and go to state 11
state 4
(3) declist -> declist dec .
MAIN reduce using rule 3 (declist -> declist dec .)
FUNCTION reduce using rule 3 (declist -> declist dec .)
ID reduce using rule 3 (declist -> declist dec .)
state 5
(4) dec -> vardec .
MAIN reduce using rule 4 (dec -> vardec .)
FUNCTION reduce using rule 4 (dec -> vardec .)
ID reduce using rule 4 (dec -> vardec .)
state 6
(76) dec -> funcdec .
MAIN reduce using rule 76 (dec -> funcdec .)
FUNCTION reduce using rule 76 (dec -> funcdec .)
ID reduce using rule 76 (dec -> funcdec .)
state 7
(5) vardec -> idlist . COLON type SEMICOLON
(13) idlist -> idlist . COMMA iddec
COLON shift and go to state 12
COMMA shift and go to state 13
state 8
(72) funcdec -> FUNCTION . ID LRB paramdecs RRB block
(73) funcdec -> FUNCTION . ID LRB paramdecs RRB COLON type block
ID shift and go to state 14
state 9
(9) iddec -> ID .
(10) iddec -> ID . ASSIGN exp
(11) iddec -> ID . LSB exp RSB
COLON reduce using rule 9 (iddec -> ID .)
COMMA reduce using rule 9 (iddec -> ID .)
ASSIGN shift and go to state 15
LSB shift and go to state 16
state 10
(12) idlist -> iddec .
COLON reduce using rule 12 (idlist -> iddec .)
COMMA reduce using rule 12 (idlist -> iddec .)
state 11
(1) program -> declist MAIN LRB . RRB block
RRB shift and go to state 17
state 12
(5) vardec -> idlist COLON . type SEMICOLON
(6) type -> . INTEGER
(7) type -> . FLOAT
(8) type -> . BOOLEAN
INTEGER shift and go to state 19
FLOAT shift and go to state 20
BOOLEAN shift and go to state 21
type shift and go to state 18
state 13
(13) idlist -> idlist COMMA . iddec
(9) iddec -> . ID
(10) iddec -> . ID ASSIGN exp
(11) iddec -> . ID LSB exp RSB
ID shift and go to state 9
iddec shift and go to state 22
state 14
(72) funcdec -> FUNCTION ID . LRB paramdecs RRB block
(73) funcdec -> FUNCTION ID . LRB paramdecs RRB COLON type block
LRB shift and go to state 23
state 15
(10) iddec -> ID ASSIGN . exp
(14) exp -> . ID ASSIGN exp
(15) exp -> . exp SUM exp
(16) exp -> . exp SUB exp
(17) exp -> . exp DIV exp
(18) exp -> . exp MOD exp
(19) exp -> . exp MUL exp
(20) exp -> . const
(21) exp -> . ID
(22) exp -> . ID LSB exp RSB
(23) exp -> . ID LSB exp RSB ASSIGN exp
(24) exp -> . SUB exp
(25) exp -> . LRB exp RRB
(46) exp -> . relopexp
(59) exp -> . exp AND exp
(60) exp -> . exp OR exp
(61) exp -> . NOT exp
(70) exp -> . ID LRB RRB
(71) exp -> . ID LRB explist RRB
(26) const -> . FLOATNUMBER
(27) const -> . INTEGERNUMBER
(62) const -> . TRUE
(63) const -> . FALSE
(47) relopexp -> . exp GT exp
(48) relopexp -> . exp LT exp
(49) relopexp -> . exp NE exp
(50) relopexp -> . exp EQ exp
(51) relopexp -> . exp LE exp
(52) relopexp -> . exp GE exp
(53) relopexp -> . relopexp GT exp
(54) relopexp -> . relopexp LT exp
(55) relopexp -> . relopexp NE exp
(56) relopexp -> . relopexp EQ exp
(57) relopexp -> . relopexp LE exp
(58) relopexp -> . relopexp GE exp
ID shift and go to state 24
SUB shift and go to state 26
LRB shift and go to state 28
NOT shift and go to state 30
FLOATNUMBER shift and go to state 31
INTEGERNUMBER shift and go to state 32
TRUE shift and go to state 33
FALSE shift and go to state 34
exp shift and go to state 25
const shift and go to state 27
relopexp shift and go to state 29
state 16
(11) iddec -> ID LSB . exp RSB
(14) exp -> . ID ASSIGN exp
(15) exp -> . exp SUM exp
(16) exp -> . exp SUB exp
(17) exp -> . exp DIV exp
(18) exp -> . exp MOD exp
(19) exp -> . exp MUL exp
(20) exp -> . const
(21) exp -> . ID
(22) exp -> . ID LSB exp RSB
(23) exp -> . ID LSB exp RSB ASSIGN exp
(24) exp -> . SUB exp
(25) exp -> . LRB exp RRB
(46) exp -> . relopexp
(59) exp -> . exp AND exp
(60) exp -> . exp OR exp
(61) exp -> . NOT exp
(70) exp -> . ID LRB RRB
(71) exp -> . ID LRB explist RRB
(26) const -> . FLOATNUMBER
(27) const -> . INTEGERNUMBER
(62) const -> . TRUE
(63) const -> . FALSE
(47) relopexp -> . exp GT exp
(48) relopexp -> . exp LT exp
(49) relopexp -> . exp NE exp
(50) relopexp -> . exp EQ exp
(51) relopexp -> . exp LE exp
(52) relopexp -> . exp GE exp
(53) relopexp -> . relopexp GT exp
(54) relopexp -> . relopexp LT exp
(55) relopexp -> . relopexp NE exp
(56) relopexp -> . relopexp EQ exp
(57) relopexp -> . relopexp LE exp
(58) relopexp -> . relopexp GE exp
ID shift and go to state 24
SUB shift and go to state 26
LRB shift and go to state 28
NOT shift and go to state 30
FLOATNUMBER shift and go to state 31
INTEGERNUMBER shift and go to state 32
TRUE shift and go to state 33
FALSE shift and go to state 34
exp shift and go to state 35
const shift and go to state 27
relopexp shift and go to state 29
state 17
(1) program -> declist MAIN LRB RRB . block
(28) block -> . LCB stmtlist RCB
LCB shift and go to state 37
block shift and go to state 36
state 18
(5) vardec -> idlist COLON type . SEMICOLON
SEMICOLON shift and go to state 38
state 19
(6) type -> INTEGER .
SEMICOLON reduce using rule 6 (type -> INTEGER .)
COMMA reduce using rule 6 (type -> INTEGER .)
RRB reduce using rule 6 (type -> INTEGER .)
LCB reduce using rule 6 (type -> INTEGER .)
state 20
(7) type -> FLOAT .
SEMICOLON reduce using rule 7 (type -> FLOAT .)
COMMA reduce using rule 7 (type -> FLOAT .)
RRB reduce using rule 7 (type -> FLOAT .)
LCB reduce using rule 7 (type -> FLOAT .)
state 21
(8) type -> BOOLEAN .
SEMICOLON reduce using rule 8 (type -> BOOLEAN .)
COMMA reduce using rule 8 (type -> BOOLEAN .)
RRB reduce using rule 8 (type -> BOOLEAN .)
LCB reduce using rule 8 (type -> BOOLEAN .)
state 22
(13) idlist -> idlist COMMA iddec .
COLON reduce using rule 13 (idlist -> idlist COMMA iddec .)
COMMA reduce using rule 13 (idlist -> idlist COMMA iddec .)
state 23
(72) funcdec -> FUNCTION ID LRB . paramdecs RRB block
(73) funcdec -> FUNCTION ID LRB . paramdecs RRB COLON type block
(64) paramdecs -> . paramdecslist
(65) paramdecs -> .
(66) paramdecslist -> . paramdec
(67) paramdecslist -> . paramdecslist COMMA paramdec
(68) paramdec -> . ID COLON type
(69) paramdec -> . ID LSB RSB COLON type
RRB reduce using rule 65 (paramdecs -> .)
ID shift and go to state 39
paramdecs shift and go to state 40
paramdecslist shift and go to state 41
paramdec shift and go to state 42
state 24
(14) exp -> ID . ASSIGN exp
(21) exp -> ID .
(22) exp -> ID . LSB exp RSB
(23) exp -> ID . LSB exp RSB ASSIGN exp
(70) exp -> ID . LRB RRB
(71) exp -> ID . LRB explist RRB
ASSIGN shift and go to state 43
SUM reduce using rule 21 (exp -> ID .)
SUB reduce using rule 21 (exp -> ID .)
DIV reduce using rule 21 (exp -> ID .)
MOD reduce using rule 21 (exp -> ID .)
MUL reduce using rule 21 (exp -> ID .)
AND reduce using rule 21 (exp -> ID .)
OR reduce using rule 21 (exp -> ID .)
GT reduce using rule 21 (exp -> ID .)
LT reduce using rule 21 (exp -> ID .)
NE reduce using rule 21 (exp -> ID .)
EQ reduce using rule 21 (exp -> ID .)
LE reduce using rule 21 (exp -> ID .)
GE reduce using rule 21 (exp -> ID .)
COLON reduce using rule 21 (exp -> ID .)
COMMA reduce using rule 21 (exp -> ID .)
RSB reduce using rule 21 (exp -> ID .)
RRB reduce using rule 21 (exp -> ID .)
SEMICOLON reduce using rule 21 (exp -> ID .)
LSB shift and go to state 44
LRB shift and go to state 45
state 25
(10) iddec -> ID ASSIGN exp .
(15) exp -> exp . SUM exp
(16) exp -> exp . SUB exp
(17) exp -> exp . DIV exp
(18) exp -> exp . MOD exp
(19) exp -> exp . MUL exp
(59) exp -> exp . AND exp
(60) exp -> exp . OR exp
(47) relopexp -> exp . GT exp
(48) relopexp -> exp . LT exp
(49) relopexp -> exp . NE exp
(50) relopexp -> exp . EQ exp
(51) relopexp -> exp . LE exp
(52) relopexp -> exp . GE exp
COLON reduce using rule 10 (iddec -> ID ASSIGN exp .)
COMMA reduce using rule 10 (iddec -> ID ASSIGN exp .)
SUM shift and go to state 46
SUB shift and go to state 47
DIV shift and go to state 48
MOD shift and go to state 49
MUL shift and go to state 50
AND shift and go to state 51
OR shift and go to state 52
GT shift and go to state 53
LT shift and go to state 54
NE shift and go to state 55
EQ shift and go to state 56
LE shift and go to state 57
GE shift and go to state 58
state 26
(24) exp -> SUB . exp
(14) exp -> . ID ASSIGN exp
(15) exp -> . exp SUM exp
(16) exp -> . exp SUB exp
(17) exp -> . exp DIV exp
(18) exp -> . exp MOD exp
(19) exp -> . exp MUL exp
(20) exp -> . const
(21) exp -> . ID
(22) exp -> . ID LSB exp RSB
(23) exp -> . ID LSB exp RSB ASSIGN exp
(24) exp -> . SUB exp
(25) exp -> . LRB exp RRB
(46) exp -> . relopexp
(59) exp -> . exp AND exp
(60) exp -> . exp OR exp
(61) exp -> . NOT exp
(70) exp -> . ID LRB RRB
(71) exp -> . ID LRB explist RRB
(26) const -> . FLOATNUMBER
(27) const -> . INTEGERNUMBER
(62) const -> . TRUE
(63) const -> . FALSE
(47) relopexp -> . exp GT exp
(48) relopexp -> . exp LT exp
(49) relopexp -> . exp NE exp
(50) relopexp -> . exp EQ exp
(51) relopexp -> . exp LE exp
(52) relopexp -> . exp GE exp
(53) relopexp -> . relopexp GT exp
(54) relopexp -> . relopexp LT exp
(55) relopexp -> . relopexp NE exp
(56) relopexp -> . relopexp EQ exp
(57) relopexp -> . relopexp LE exp
(58) relopexp -> . relopexp GE exp
ID shift and go to state 24
SUB shift and go to state 26
LRB shift and go to state 28
NOT shift and go to state 30
FLOATNUMBER shift and go to state 31
INTEGERNUMBER shift and go to state 32
TRUE shift and go to state 33
FALSE shift and go to state 34
exp shift and go to state 59
const shift and go to state 27
relopexp shift and go to state 29
state 27
(20) exp -> const .
SUM reduce using rule 20 (exp -> const .)
SUB reduce using rule 20 (exp -> const .)
DIV reduce using rule 20 (exp -> const .)
MOD reduce using rule 20 (exp -> const .)
MUL reduce using rule 20 (exp -> const .)
AND reduce using rule 20 (exp -> const .)
OR reduce using rule 20 (exp -> const .)
GT reduce using rule 20 (exp -> const .)
LT reduce using rule 20 (exp -> const .)
NE reduce using rule 20 (exp -> const .)
EQ reduce using rule 20 (exp -> const .)
LE reduce using rule 20 (exp -> const .)
GE reduce using rule 20 (exp -> const .)
COLON reduce using rule 20 (exp -> const .)
COMMA reduce using rule 20 (exp -> const .)
RSB reduce using rule 20 (exp -> const .)
RRB reduce using rule 20 (exp -> const .)
SEMICOLON reduce using rule 20 (exp -> const .)
state 28
(25) exp -> LRB . exp RRB
(14) exp -> . ID ASSIGN exp
(15) exp -> . exp SUM exp
(16) exp -> . exp SUB exp
(17) exp -> . exp DIV exp
(18) exp -> . exp MOD exp
(19) exp -> . exp MUL exp
(20) exp -> . const
(21) exp -> . ID
(22) exp -> . ID LSB exp RSB
(23) exp -> . ID LSB exp RSB ASSIGN exp
(24) exp -> . SUB exp
(25) exp -> . LRB exp RRB
(46) exp -> . relopexp
(59) exp -> . exp AND exp
(60) exp -> . exp OR exp
(61) exp -> . NOT exp
(70) exp -> . ID LRB RRB
(71) exp -> . ID LRB explist RRB
(26) const -> . FLOATNUMBER
(27) const -> . INTEGERNUMBER
(62) const -> . TRUE
(63) const -> . FALSE
(47) relopexp -> . exp GT exp
(48) relopexp -> . exp LT exp
(49) relopexp -> . exp NE exp
(50) relopexp -> . exp EQ exp
(51) relopexp -> . exp LE exp
(52) relopexp -> . exp GE exp
(53) relopexp -> . relopexp GT exp
(54) relopexp -> . relopexp LT exp
(55) relopexp -> . relopexp NE exp
(56) relopexp -> . relopexp EQ exp
(57) relopexp -> . relopexp LE exp
(58) relopexp -> . relopexp GE exp
ID shift and go to state 24
SUB shift and go to state 26
LRB shift and go to state 28
NOT shift and go to state 30
FLOATNUMBER shift and go to state 31
INTEGERNUMBER shift and go to state 32
TRUE shift and go to state 33
FALSE shift and go to state 34
exp shift and go to state 60
const shift and go to state 27
relopexp shift and go to state 29
state 29
(46) exp -> relopexp .
(53) relopexp -> relopexp . GT exp
(54) relopexp -> relopexp . LT exp
(55) relopexp -> relopexp . NE exp
(56) relopexp -> relopexp . EQ exp
(57) relopexp -> relopexp . LE exp
(58) relopexp -> relopexp . GE exp
SUM reduce using rule 46 (exp -> relopexp .)
SUB reduce using rule 46 (exp -> relopexp .)
DIV reduce using rule 46 (exp -> relopexp .)
MOD reduce using rule 46 (exp -> relopexp .)
MUL reduce using rule 46 (exp -> relopexp .)
AND reduce using rule 46 (exp -> relopexp .)
OR reduce using rule 46 (exp -> relopexp .)
COLON reduce using rule 46 (exp -> relopexp .)
COMMA reduce using rule 46 (exp -> relopexp .)
RSB reduce using rule 46 (exp -> relopexp .)
RRB reduce using rule 46 (exp -> relopexp .)
SEMICOLON reduce using rule 46 (exp -> relopexp .)
GT shift and go to state 61
LT shift and go to state 62
NE shift and go to state 63
EQ shift and go to state 64
LE shift and go to state 65
GE shift and go to state 66
! GT [ reduce using rule 46 (exp -> relopexp .) ]
! LT [ reduce using rule 46 (exp -> relopexp .) ]
! NE [ reduce using rule 46 (exp -> relopexp .) ]
! EQ [ reduce using rule 46 (exp -> relopexp .) ]
! LE [ reduce using rule 46 (exp -> relopexp .) ]
! GE [ reduce using rule 46 (exp -> relopexp .) ]
state 30
(61) exp -> NOT . exp
(14) exp -> . ID ASSIGN exp
(15) exp -> . exp SUM exp
(16) exp -> . exp SUB exp
(17) exp -> . exp DIV exp
(18) exp -> . exp MOD exp
(19) exp -> . exp MUL exp
(20) exp -> . const
(21) exp -> . ID
(22) exp -> . ID LSB exp RSB
(23) exp -> . ID LSB exp RSB ASSIGN exp
(24) exp -> . SUB exp
(25) exp -> . LRB exp RRB
(46) exp -> . relopexp
(59) exp -> . exp AND exp
(60) exp -> . exp OR exp
(61) exp -> . NOT exp
(70) exp -> . ID LRB RRB
(71) exp -> . ID LRB explist RRB
(26) const -> . FLOATNUMBER
(27) const -> . INTEGERNUMBER
(62) const -> . TRUE
(63) const -> . FALSE
(47) relopexp -> . exp GT exp
(48) relopexp -> . exp LT exp
(49) relopexp -> . exp NE exp
(50) relopexp -> . exp EQ exp
(51) relopexp -> . exp LE exp
(52) relopexp -> . exp GE exp
(53) relopexp -> . relopexp GT exp
(54) relopexp -> . relopexp LT exp
(55) relopexp -> . relopexp NE exp
(56) relopexp -> . relopexp EQ exp
(57) relopexp -> . relopexp LE exp
(58) relopexp -> . relopexp GE exp
ID shift and go to state 24
SUB shift and go to state 26
LRB shift and go to state 28
NOT shift and go to state 30
FLOATNUMBER shift and go to state 31
INTEGERNUMBER shift and go to state 32
TRUE shift and go to state 33
FALSE shift and go to state 34
exp shift and go to state 67
const shift and go to state 27
relopexp shift and go to state 29
state 31
(26) const -> FLOATNUMBER .
SUM reduce using rule 26 (const -> FLOATNUMBER .)
SUB reduce using rule 26 (const -> FLOATNUMBER .)
DIV reduce using rule 26 (const -> FLOATNUMBER .)
MOD reduce using rule 26 (const -> FLOATNUMBER .)
MUL reduce using rule 26 (const -> FLOATNUMBER .)
AND reduce using rule 26 (const -> FLOATNUMBER .)
OR reduce using rule 26 (const -> FLOATNUMBER .)
GT reduce using rule 26 (const -> FLOATNUMBER .)
LT reduce using rule 26 (const -> FLOATNUMBER .)
NE reduce using rule 26 (const -> FLOATNUMBER .)
EQ reduce using rule 26 (const -> FLOATNUMBER .)
LE reduce using rule 26 (const -> FLOATNUMBER .)
GE reduce using rule 26 (const -> FLOATNUMBER .)
COLON reduce using rule 26 (const -> FLOATNUMBER .)
COMMA reduce using rule 26 (const -> FLOATNUMBER .)
RSB reduce using rule 26 (const -> FLOATNUMBER .)
RRB reduce using rule 26 (const -> FLOATNUMBER .)
SEMICOLON reduce using rule 26 (const -> FLOATNUMBER .)
state 32
(27) const -> INTEGERNUMBER .
SUM reduce using rule 27 (const -> INTEGERNUMBER .)
SUB reduce using rule 27 (const -> INTEGERNUMBER .)
DIV reduce using rule 27 (const -> INTEGERNUMBER .)
MOD reduce using rule 27 (const -> INTEGERNUMBER .)
MUL reduce using rule 27 (const -> INTEGERNUMBER .)
AND reduce using rule 27 (const -> INTEGERNUMBER .)
OR reduce using rule 27 (const -> INTEGERNUMBER .)
GT reduce using rule 27 (const -> INTEGERNUMBER .)
LT reduce using rule 27 (const -> INTEGERNUMBER .)
NE reduce using rule 27 (const -> INTEGERNUMBER .)
EQ reduce using rule 27 (const -> INTEGERNUMBER .)
LE reduce using rule 27 (const -> INTEGERNUMBER .)
GE reduce using rule 27 (const -> INTEGERNUMBER .)
COLON reduce using rule 27 (const -> INTEGERNUMBER .)
COMMA reduce using rule 27 (const -> INTEGERNUMBER .)
RSB reduce using rule 27 (const -> INTEGERNUMBER .)
RRB reduce using rule 27 (const -> INTEGERNUMBER .)
SEMICOLON reduce using rule 27 (const -> INTEGERNUMBER .)
state 33
(62) const -> TRUE .
SUM reduce using rule 62 (const -> TRUE .)
SUB reduce using rule 62 (const -> TRUE .)
DIV reduce using rule 62 (const -> TRUE .)
MOD reduce using rule 62 (const -> TRUE .)
MUL reduce using rule 62 (const -> TRUE .)
AND reduce using rule 62 (const -> TRUE .)
OR reduce using rule 62 (const -> TRUE .)
GT reduce using rule 62 (const -> TRUE .)
LT reduce using rule 62 (const -> TRUE .)
NE reduce using rule 62 (const -> TRUE .)
EQ reduce using rule 62 (const -> TRUE .)
LE reduce using rule 62 (const -> TRUE .)
GE reduce using rule 62 (const -> TRUE .)
COLON reduce using rule 62 (const -> TRUE .)
COMMA reduce using rule 62 (const -> TRUE .)
RSB reduce using rule 62 (const -> TRUE .)
RRB reduce using rule 62 (const -> TRUE .)
SEMICOLON reduce using rule 62 (const -> TRUE .)
state 34
(63) const -> FALSE .
SUM reduce using rule 63 (const -> FALSE .)
SUB reduce using rule 63 (const -> FALSE .)
DIV reduce using rule 63 (const -> FALSE .)
MOD reduce using rule 63 (const -> FALSE .)
MUL reduce using rule 63 (const -> FALSE .)
AND reduce using rule 63 (const -> FALSE .)
OR reduce using rule 63 (const -> FALSE .)
GT reduce using rule 63 (const -> FALSE .)
LT reduce using rule 63 (const -> FALSE .)
NE reduce using rule 63 (const -> FALSE .)
EQ reduce using rule 63 (const -> FALSE .)
LE reduce using rule 63 (const -> FALSE .)
GE reduce using rule 63 (const -> FALSE .)
COLON reduce using rule 63 (const -> FALSE .)
COMMA reduce using rule 63 (const -> FALSE .)
RSB reduce using rule 63 (const -> FALSE .)
RRB reduce using rule 63 (const -> FALSE .)
SEMICOLON reduce using rule 63 (const -> FALSE .)
state 35
(11) iddec -> ID LSB exp . RSB
(15) exp -> exp . SUM exp
(16) exp -> exp . SUB exp
(17) exp -> exp . DIV exp
(18) exp -> exp . MOD exp
(19) exp -> exp . MUL exp
(59) exp -> exp . AND exp
(60) exp -> exp . OR exp
(47) relopexp -> exp . GT exp
(48) relopexp -> exp . LT exp
(49) relopexp -> exp . NE exp
(50) relopexp -> exp . EQ exp
(51) relopexp -> exp . LE exp
(52) relopexp -> exp . GE exp
RSB shift and go to state 68
SUM shift and go to state 46
SUB shift and go to state 47
DIV shift and go to state 48
MOD shift and go to state 49
MUL shift and go to state 50
AND shift and go to state 51
OR shift and go to state 52
GT shift and go to state 53
LT shift and go to state 54
NE shift and go to state 55
EQ shift and go to state 56
LE shift and go to state 57
GE shift and go to state 58
state 36
(1) program -> declist MAIN LRB RRB block .
$end reduce using rule 1 (program -> declist MAIN LRB RRB block .)
state 37
(28) block -> LCB . stmtlist RCB
(29) stmtlist -> . stmtlist stmt
(30) stmtlist -> .
RCB reduce using rule 30 (stmtlist -> .)
PRINT reduce using rule 30 (stmtlist -> .)
IF reduce using rule 30 (stmtlist -> .)
WHILE reduce using rule 30 (stmtlist -> .)
FOR reduce using rule 30 (stmtlist -> .)
ON reduce using rule 30 (stmtlist -> .)
RETURN reduce using rule 30 (stmtlist -> .)
ID reduce using rule 30 (stmtlist -> .)
SUB reduce using rule 30 (stmtlist -> .)
LRB reduce using rule 30 (stmtlist -> .)
NOT reduce using rule 30 (stmtlist -> .)
LCB reduce using rule 30 (stmtlist -> .)
FLOATNUMBER reduce using rule 30 (stmtlist -> .)
INTEGERNUMBER reduce using rule 30 (stmtlist -> .)
TRUE reduce using rule 30 (stmtlist -> .)
FALSE reduce using rule 30 (stmtlist -> .)
stmtlist shift and go to state 69
state 38
(5) vardec -> idlist COLON type SEMICOLON .
MAIN reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
FUNCTION reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
ID reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
RCB reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
PRINT reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
IF reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
WHILE reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
FOR reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
ON reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
RETURN reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
SUB reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
LRB reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
NOT reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
LCB reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
FLOATNUMBER reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
INTEGERNUMBER reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
TRUE reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
FALSE reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
ELSE reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
ELSEIF reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
WHERE reduce using rule 5 (vardec -> idlist COLON type SEMICOLON .)
state 39
(68) paramdec -> ID . COLON type
(69) paramdec -> ID . LSB RSB COLON type
COLON shift and go to state 70
LSB shift and go to state 71
state 40
(72) funcdec -> FUNCTION ID LRB paramdecs . RRB block
(73) funcdec -> FUNCTION ID LRB paramdecs . RRB COLON type block
RRB shift and go to state 72
state 41
(64) paramdecs -> paramdecslist .
(67) paramdecslist -> paramdecslist . COMMA paramdec
RRB reduce using rule 64 (paramdecs -> paramdecslist .)
COMMA shift and go to state 73
state 42
(66) paramdecslist -> paramdec .
COMMA reduce using rule 66 (paramdecslist -> paramdec .)
RRB reduce using rule 66 (paramdecslist -> paramdec .)
state 43
(14) exp -> ID ASSIGN . exp
(14) exp -> . ID ASSIGN exp
(15) exp -> . exp SUM exp
(16) exp -> . exp SUB exp
(17) exp -> . exp DIV exp