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