/
SHLang.output
3413 lines (2322 loc) · 102 KB
/
SHLang.output
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
Grammar
0 $accept: program $end
1 program: PROGRAM_KW saved_identifier declarations_list procedure_list MAIN_KW block
2 | PROGRAM_KW saved_identifier procedure_list MAIN_KW block
3 | PROGRAM_KW saved_identifier declarations_list MAIN_KW block
4 | PROGRAM_KW saved_identifier MAIN_KW block
5 declarations_list: declarations_list declarations
6 | declarations
7 declarations: type_specifiers declarator_list
8 type_specifiers: INTEGER_KW
9 | REAL_KW
10 | CHAR_KW
11 | BOOLEAN_KW
12 declarator_list: declarator_list declarator
13 | declarator_end
14 declarator: dec COMMA_KW
15 | dec ASS_KW initializer
16 declarator_end: dec SEMICOLON_KW
17 | dec ASS_KW initializer SEMICOLON_KW
18 | dec ASS_KW initializer_end
19 dec: saved_identifier
20 | saved_identifier LB_KW range RB_KW
21 | saved_identifier LB_KW saved_integer RB_KW
22 range: saved_identifier TWO_DOTS_KW saved_identifier
23 | saved_integer TWO_DOTS_KW saved_integer
24 | arithmatic_expressions TWO_DOTS_KW arithmatic_expressions
25 initializer: LCB_KW initializer_list_in_cb
26 | initializer_list
27 initializer_list_in_cb: initializer_list constant_expressions RCB_KW
28 | constant_expressions RCB_KW
29 initializer_list: initializer_list constant_expressions COMMA_KW
30 | constant_expressions COMMA_KW
31 initializer_end: initializer_list constant_expressions SEMICOLON_KW
32 | constant_expressions SEMICOLON_KW
33 procedure_list: procedure
34 | procedure_list procedure
35 procedure: PROCEDURE_KW saved_identifier parameters LCB_KW declarations_list block RCB_KW
36 | PROCEDURE_KW saved_identifier parameters LCB_KW block RCB_KW
37 parameters: LP_KW declarations_list RP_KW
38 | LP_KW RP_KW
39 block: LCB_KW statement_list RCB_KW
40 | LCB_KW RCB_KW
41 statement_list: SEMICOLON_KW M
42 | statement SEMICOLON_KW M
43 | statement_list M statement SEMICOLON_KW
44 statement: matched
45 | unmatched
46 matched: IF_KW bool_expressions THEN_KW M matched N ELSE_KW M matched
47 | other_statement
48 unmatched: IF_KW bool_expressions THEN_KW M matched N ELSE_KW M unmatched
49 | IF_KW bool_expressions THEN_KW M statement
50 other_statement: saved_identifier ASS_KW expressions
51 | saved_identifier LB_KW expressions RB_KW ASS_KW expressions
52 | DO_KW M statement WHILE_KW M bool_expressions
53 | FOR_KW saved_identifier IN_KW range N REPEAT_KW M block
54 | SWITCH_KW expressions N caseelement default END_KW
55 | SWITCH_KW expressions N caseelement END_KW
56 | saved_identifier LP_KW arguments RP_KW
57 | saved_identifier LP_KW RP_KW
58 | RETURN_KW expressions
59 | EXIT_KW WHEN_KW LP_KW bool_expressions RP_KW
60 | block
61 arguments: declarator_list
62 caseelement: CASE_KW M saved_integer N COLON_KW M block SEMICOLON_KW
63 | caseelement CASE_KW M saved_integer N COLON_KW M block SEMICOLON_KW
64 default: DEFAULT_KW COLON_KW M block N SEMICOLON_KW
65 expressions: constant_expressions
66 | bool_expressions
67 | arithmatic_expressions
68 | saved_identifier
69 | saved_identifier LB_KW expressions RB_KW
70 | LP_KW expressions RP_KW
71 constant_expressions: saved_integer
72 | saved_real
73 | saved_char
74 | saved_boolean
75 bool_expressions: expressions LT_KW expressions
76 | expressions LE_KW expressions
77 | expressions GT_KW expressions
78 | expressions GE_KW expressions
79 | expressions EQ_KW expressions
80 | expressions NE_KW expressions
81 | expressions AND_KW M expressions
82 | expressions OR_KW M expressions
83 | expressions AND_THEN_KW M expressions
84 | expressions OR_ELSE_KW M expressions
85 | NOT_KW expressions
86 arithmatic_expressions: expressions ADD_KW expressions
87 | expressions SUB_KW expressions
88 | expressions MUL_KW expressions
89 | expressions DIV_KW expressions
90 | expressions MOD_KW expressions
91 | SUB_KW expressions
92 saved_identifier: IDENTIFIER
93 saved_integer: INTEGER_CONSTANT
94 saved_real: REAL_CONSTANT
95 saved_char: CHAR_CONSTANT
96 saved_boolean: BOOLEAN_CONSTANT
97 M: /* empty */
98 N: /* empty */
Terminals, with rules where they appear
$end (0) 0
error (256)
PROGRAM_KW (258) 1 2 3 4
MAIN_KW (259) 1 2 3 4
PROCEDURE_KW (260) 35 36
INTEGER_KW (261) 8
REAL_KW (262) 9
CHAR_KW (263) 10
BOOLEAN_KW (264) 11
IF_KW (265) 46 48 49
THEN_KW (266) 46 48 49
ELSE_KW (267) 46 48
DO_KW (268) 52
WHILE_KW (269) 52
FOR_KW (270) 53
IN_KW (271) 53
REPEAT_KW (272) 53
SWITCH_KW (273) 54 55
CASE_KW (274) 62 63
DEFAULT_KW (275) 64
END_KW (276) 54 55
RETURN_KW (277) 58
EXIT_KW (278) 59
WHEN_KW (279) 59
AND_KW (280) 81
AND_THEN_KW (281) 83
OR_KW (282) 82
OR_ELSE_KW (283) 84
NOT_KW (284) 85
SEMICOLON_KW (285) 16 17 31 32 41 42 43 62 63 64
COLON_KW (286) 62 63 64
COMMA_KW (287) 14 29 30
ASS_KW (288) 15 17 18 50 51
LP_KW (289) 37 38 56 57 59 70
RP_KW (290) 37 38 56 57 59 70
LB_KW (291) 20 21 51 69
RB_KW (292) 20 21 51 69
LCB_KW (293) 25 35 36 39 40
RCB_KW (294) 27 28 35 36 39 40
TWO_DOTS_KW (295) 22 23 24
EQ_KW (296) 79
NE_KW (297) 80
LE_KW (298) 76
LT_KW (299) 75
GE_KW (300) 78
GT_KW (301) 77
ADD_KW (302) 86
SUB_KW (303) 87 91
MUL_KW (304) 88
DIV_KW (305) 89
MOD_KW (306) 90
IDENTIFIER (307) 92
INTEGER_CONSTANT (308) 93
REAL_CONSTANT (309) 94
CHAR_CONSTANT (310) 95
BOOLEAN_CONSTANT (311) 96
usub (312)
Nonterminals, with rules where they appear
$accept (58)
on left: 0
program (59)
on left: 1 2 3 4, on right: 0
declarations_list (60)
on left: 5 6, on right: 1 3 5 35 37
declarations (61)
on left: 7, on right: 5 6
type_specifiers (62)
on left: 8 9 10 11, on right: 7
declarator_list (63)
on left: 12 13, on right: 7 12 61
declarator (64)
on left: 14 15, on right: 12
declarator_end (65)
on left: 16 17 18, on right: 13
dec (66)
on left: 19 20 21, on right: 14 15 16 17 18
range (67)
on left: 22 23 24, on right: 20 53
initializer (68)
on left: 25 26, on right: 15 17
initializer_list_in_cb (69)
on left: 27 28, on right: 25
initializer_list (70)
on left: 29 30, on right: 26 27 29 31
initializer_end (71)
on left: 31 32, on right: 18
procedure_list (72)
on left: 33 34, on right: 1 2 34
procedure (73)
on left: 35 36, on right: 33 34
parameters (74)
on left: 37 38, on right: 35 36
block (75)
on left: 39 40, on right: 1 2 3 4 35 36 53 60 62 63 64
statement_list (76)
on left: 41 42 43, on right: 39 43
statement (77)
on left: 44 45, on right: 42 43 49 52
matched (78)
on left: 46 47, on right: 44 46 48
unmatched (79)
on left: 48 49, on right: 45 48
other_statement (80)
on left: 50 51 52 53 54 55 56 57 58 59 60, on right: 47
arguments (81)
on left: 61, on right: 56
caseelement (82)
on left: 62 63, on right: 54 55 63
default (83)
on left: 64, on right: 54
expressions (84)
on left: 65 66 67 68 69 70, on right: 50 51 54 55 58 69 70 75 76
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
constant_expressions (85)
on left: 71 72 73 74, on right: 27 28 29 30 31 32 65
bool_expressions (86)
on left: 75 76 77 78 79 80 81 82 83 84 85, on right: 46 48 49 52
59 66
arithmatic_expressions (87)
on left: 86 87 88 89 90 91, on right: 24 67
saved_identifier (88)
on left: 92, on right: 1 2 3 4 19 20 21 22 35 36 50 51 53 56 57
68 69
saved_integer (89)
on left: 93, on right: 21 23 62 63 71
saved_real (90)
on left: 94, on right: 72
saved_char (91)
on left: 95, on right: 73
saved_boolean (92)
on left: 96, on right: 74
M (93)
on left: 97, on right: 41 42 43 46 48 49 52 53 62 63 64 81 82 83
84
N (94)
on left: 98, on right: 46 48 53 54 55 62 63 64
state 0
0 $accept: . program $end
PROGRAM_KW shift, and go to state 1
program go to state 2
state 1
1 program: PROGRAM_KW . saved_identifier declarations_list procedure_list MAIN_KW block
2 | PROGRAM_KW . saved_identifier procedure_list MAIN_KW block
3 | PROGRAM_KW . saved_identifier declarations_list MAIN_KW block
4 | PROGRAM_KW . saved_identifier MAIN_KW block
IDENTIFIER shift, and go to state 3
saved_identifier go to state 4
state 2
0 $accept: program . $end
$end shift, and go to state 5
state 3
92 saved_identifier: IDENTIFIER .
$default reduce using rule 92 (saved_identifier)
state 4
1 program: PROGRAM_KW saved_identifier . declarations_list procedure_list MAIN_KW block
2 | PROGRAM_KW saved_identifier . procedure_list MAIN_KW block
3 | PROGRAM_KW saved_identifier . declarations_list MAIN_KW block
4 | PROGRAM_KW saved_identifier . MAIN_KW block
MAIN_KW shift, and go to state 6
PROCEDURE_KW shift, and go to state 7
INTEGER_KW shift, and go to state 8
REAL_KW shift, and go to state 9
CHAR_KW shift, and go to state 10
BOOLEAN_KW shift, and go to state 11
declarations_list go to state 12
declarations go to state 13
type_specifiers go to state 14
procedure_list go to state 15
procedure go to state 16
state 5
0 $accept: program $end .
$default accept
state 6
4 program: PROGRAM_KW saved_identifier MAIN_KW . block
LCB_KW shift, and go to state 17
block go to state 18
state 7
35 procedure: PROCEDURE_KW . saved_identifier parameters LCB_KW declarations_list block RCB_KW
36 | PROCEDURE_KW . saved_identifier parameters LCB_KW block RCB_KW
IDENTIFIER shift, and go to state 3
saved_identifier go to state 19
state 8
8 type_specifiers: INTEGER_KW .
$default reduce using rule 8 (type_specifiers)
state 9
9 type_specifiers: REAL_KW .
$default reduce using rule 9 (type_specifiers)
state 10
10 type_specifiers: CHAR_KW .
$default reduce using rule 10 (type_specifiers)
state 11
11 type_specifiers: BOOLEAN_KW .
$default reduce using rule 11 (type_specifiers)
state 12
1 program: PROGRAM_KW saved_identifier declarations_list . procedure_list MAIN_KW block
3 | PROGRAM_KW saved_identifier declarations_list . MAIN_KW block
5 declarations_list: declarations_list . declarations
MAIN_KW shift, and go to state 20
PROCEDURE_KW shift, and go to state 7
INTEGER_KW shift, and go to state 8
REAL_KW shift, and go to state 9
CHAR_KW shift, and go to state 10
BOOLEAN_KW shift, and go to state 11
declarations go to state 21
type_specifiers go to state 14
procedure_list go to state 22
procedure go to state 16
state 13
6 declarations_list: declarations .
$default reduce using rule 6 (declarations_list)
state 14
7 declarations: type_specifiers . declarator_list
IDENTIFIER shift, and go to state 3
declarator_list go to state 23
declarator_end go to state 24
dec go to state 25
saved_identifier go to state 26
state 15
2 program: PROGRAM_KW saved_identifier procedure_list . MAIN_KW block
34 procedure_list: procedure_list . procedure
MAIN_KW shift, and go to state 27
PROCEDURE_KW shift, and go to state 7
procedure go to state 28
state 16
33 procedure_list: procedure .
$default reduce using rule 33 (procedure_list)
state 17
39 block: LCB_KW . statement_list RCB_KW
40 | LCB_KW . RCB_KW
IF_KW shift, and go to state 29
DO_KW shift, and go to state 30
FOR_KW shift, and go to state 31
SWITCH_KW shift, and go to state 32
RETURN_KW shift, and go to state 33
EXIT_KW shift, and go to state 34
SEMICOLON_KW shift, and go to state 35
LCB_KW shift, and go to state 17
RCB_KW shift, and go to state 36
IDENTIFIER shift, and go to state 3
block go to state 37
statement_list go to state 38
statement go to state 39
matched go to state 40
unmatched go to state 41
other_statement go to state 42
saved_identifier go to state 43
state 18
4 program: PROGRAM_KW saved_identifier MAIN_KW block .
$default reduce using rule 4 (program)
state 19
35 procedure: PROCEDURE_KW saved_identifier . parameters LCB_KW declarations_list block RCB_KW
36 | PROCEDURE_KW saved_identifier . parameters LCB_KW block RCB_KW
LP_KW shift, and go to state 44
parameters go to state 45
state 20
3 program: PROGRAM_KW saved_identifier declarations_list MAIN_KW . block
LCB_KW shift, and go to state 17
block go to state 46
state 21
5 declarations_list: declarations_list declarations .
$default reduce using rule 5 (declarations_list)
state 22
1 program: PROGRAM_KW saved_identifier declarations_list procedure_list . MAIN_KW block
34 procedure_list: procedure_list . procedure
MAIN_KW shift, and go to state 47
PROCEDURE_KW shift, and go to state 7
procedure go to state 28
state 23
7 declarations: type_specifiers declarator_list .
12 declarator_list: declarator_list . declarator
IDENTIFIER shift, and go to state 3
$default reduce using rule 7 (declarations)
declarator go to state 48
dec go to state 49
saved_identifier go to state 26
state 24
13 declarator_list: declarator_end .
$default reduce using rule 13 (declarator_list)
state 25
16 declarator_end: dec . SEMICOLON_KW
17 | dec . ASS_KW initializer SEMICOLON_KW
18 | dec . ASS_KW initializer_end
SEMICOLON_KW shift, and go to state 50
ASS_KW shift, and go to state 51
state 26
19 dec: saved_identifier .
20 | saved_identifier . LB_KW range RB_KW
21 | saved_identifier . LB_KW saved_integer RB_KW
LB_KW shift, and go to state 52
$default reduce using rule 19 (dec)
state 27
2 program: PROGRAM_KW saved_identifier procedure_list MAIN_KW . block
LCB_KW shift, and go to state 17
block go to state 53
state 28
34 procedure_list: procedure_list procedure .
$default reduce using rule 34 (procedure_list)
state 29
46 matched: IF_KW . bool_expressions THEN_KW M matched N ELSE_KW M matched
48 unmatched: IF_KW . bool_expressions THEN_KW M matched N ELSE_KW M unmatched
49 | IF_KW . bool_expressions THEN_KW M statement
NOT_KW shift, and go to state 54
LP_KW shift, and go to state 55
SUB_KW shift, and go to state 56
IDENTIFIER shift, and go to state 3
INTEGER_CONSTANT shift, and go to state 57
REAL_CONSTANT shift, and go to state 58
CHAR_CONSTANT shift, and go to state 59
BOOLEAN_CONSTANT shift, and go to state 60
expressions go to state 61
constant_expressions go to state 62
bool_expressions go to state 63
arithmatic_expressions go to state 64
saved_identifier go to state 65
saved_integer go to state 66
saved_real go to state 67
saved_char go to state 68
saved_boolean go to state 69
state 30
52 other_statement: DO_KW . M statement WHILE_KW M bool_expressions
$default reduce using rule 97 (M)
M go to state 70
state 31
53 other_statement: FOR_KW . saved_identifier IN_KW range N REPEAT_KW M block
IDENTIFIER shift, and go to state 3
saved_identifier go to state 71
state 32
54 other_statement: SWITCH_KW . expressions N caseelement default END_KW
55 | SWITCH_KW . expressions N caseelement END_KW
NOT_KW shift, and go to state 54
LP_KW shift, and go to state 55
SUB_KW shift, and go to state 56
IDENTIFIER shift, and go to state 3
INTEGER_CONSTANT shift, and go to state 57
REAL_CONSTANT shift, and go to state 58
CHAR_CONSTANT shift, and go to state 59
BOOLEAN_CONSTANT shift, and go to state 60
expressions go to state 72
constant_expressions go to state 62
bool_expressions go to state 73
arithmatic_expressions go to state 64
saved_identifier go to state 65
saved_integer go to state 66
saved_real go to state 67
saved_char go to state 68
saved_boolean go to state 69
state 33
58 other_statement: RETURN_KW . expressions
NOT_KW shift, and go to state 54
LP_KW shift, and go to state 55
SUB_KW shift, and go to state 56
IDENTIFIER shift, and go to state 3
INTEGER_CONSTANT shift, and go to state 57
REAL_CONSTANT shift, and go to state 58
CHAR_CONSTANT shift, and go to state 59
BOOLEAN_CONSTANT shift, and go to state 60
expressions go to state 74
constant_expressions go to state 62
bool_expressions go to state 73
arithmatic_expressions go to state 64
saved_identifier go to state 65
saved_integer go to state 66
saved_real go to state 67
saved_char go to state 68
saved_boolean go to state 69
state 34
59 other_statement: EXIT_KW . WHEN_KW LP_KW bool_expressions RP_KW
WHEN_KW shift, and go to state 75
state 35
41 statement_list: SEMICOLON_KW . M
$default reduce using rule 97 (M)
M go to state 76
state 36
40 block: LCB_KW RCB_KW .
$default reduce using rule 40 (block)
state 37
60 other_statement: block .
$default reduce using rule 60 (other_statement)
state 38
39 block: LCB_KW statement_list . RCB_KW
43 statement_list: statement_list . M statement SEMICOLON_KW
RCB_KW shift, and go to state 77
$default reduce using rule 97 (M)
M go to state 78
state 39
42 statement_list: statement . SEMICOLON_KW M
SEMICOLON_KW shift, and go to state 79
state 40
44 statement: matched .
$default reduce using rule 44 (statement)
state 41
45 statement: unmatched .
$default reduce using rule 45 (statement)
state 42
47 matched: other_statement .
$default reduce using rule 47 (matched)
state 43
50 other_statement: saved_identifier . ASS_KW expressions
51 | saved_identifier . LB_KW expressions RB_KW ASS_KW expressions
56 | saved_identifier . LP_KW arguments RP_KW
57 | saved_identifier . LP_KW RP_KW
ASS_KW shift, and go to state 80
LP_KW shift, and go to state 81
LB_KW shift, and go to state 82
state 44
37 parameters: LP_KW . declarations_list RP_KW
38 | LP_KW . RP_KW
INTEGER_KW shift, and go to state 8
REAL_KW shift, and go to state 9
CHAR_KW shift, and go to state 10
BOOLEAN_KW shift, and go to state 11
RP_KW shift, and go to state 83
declarations_list go to state 84
declarations go to state 13
type_specifiers go to state 14
state 45
35 procedure: PROCEDURE_KW saved_identifier parameters . LCB_KW declarations_list block RCB_KW
36 | PROCEDURE_KW saved_identifier parameters . LCB_KW block RCB_KW
LCB_KW shift, and go to state 85
state 46
3 program: PROGRAM_KW saved_identifier declarations_list MAIN_KW block .
$default reduce using rule 3 (program)
state 47
1 program: PROGRAM_KW saved_identifier declarations_list procedure_list MAIN_KW . block
LCB_KW shift, and go to state 17
block go to state 86
state 48
12 declarator_list: declarator_list declarator .
$default reduce using rule 12 (declarator_list)
state 49
14 declarator: dec . COMMA_KW
15 | dec . ASS_KW initializer
COMMA_KW shift, and go to state 87
ASS_KW shift, and go to state 88
state 50
16 declarator_end: dec SEMICOLON_KW .
$default reduce using rule 16 (declarator_end)
state 51
17 declarator_end: dec ASS_KW . initializer SEMICOLON_KW
18 | dec ASS_KW . initializer_end
LCB_KW shift, and go to state 89
INTEGER_CONSTANT shift, and go to state 57
REAL_CONSTANT shift, and go to state 58
CHAR_CONSTANT shift, and go to state 59
BOOLEAN_CONSTANT shift, and go to state 60
initializer go to state 90
initializer_list go to state 91
initializer_end go to state 92
constant_expressions go to state 93
saved_integer go to state 66
saved_real go to state 67
saved_char go to state 68
saved_boolean go to state 69
state 52
20 dec: saved_identifier LB_KW . range RB_KW
21 | saved_identifier LB_KW . saved_integer RB_KW
NOT_KW shift, and go to state 54
LP_KW shift, and go to state 55
SUB_KW shift, and go to state 56
IDENTIFIER shift, and go to state 3
INTEGER_CONSTANT shift, and go to state 57
REAL_CONSTANT shift, and go to state 58
CHAR_CONSTANT shift, and go to state 59
BOOLEAN_CONSTANT shift, and go to state 60
range go to state 94
expressions go to state 61
constant_expressions go to state 62
bool_expressions go to state 73
arithmatic_expressions go to state 95
saved_identifier go to state 96
saved_integer go to state 97
saved_real go to state 67
saved_char go to state 68
saved_boolean go to state 69
state 53
2 program: PROGRAM_KW saved_identifier procedure_list MAIN_KW block .
$default reduce using rule 2 (program)
state 54
85 bool_expressions: NOT_KW . expressions
NOT_KW shift, and go to state 54
LP_KW shift, and go to state 55
SUB_KW shift, and go to state 56
IDENTIFIER shift, and go to state 3
INTEGER_CONSTANT shift, and go to state 57
REAL_CONSTANT shift, and go to state 58
CHAR_CONSTANT shift, and go to state 59
BOOLEAN_CONSTANT shift, and go to state 60
expressions go to state 98
constant_expressions go to state 62
bool_expressions go to state 73
arithmatic_expressions go to state 64
saved_identifier go to state 65
saved_integer go to state 66
saved_real go to state 67
saved_char go to state 68
saved_boolean go to state 69
state 55
70 expressions: LP_KW . expressions RP_KW
NOT_KW shift, and go to state 54
LP_KW shift, and go to state 55
SUB_KW shift, and go to state 56
IDENTIFIER shift, and go to state 3
INTEGER_CONSTANT shift, and go to state 57
REAL_CONSTANT shift, and go to state 58
CHAR_CONSTANT shift, and go to state 59
BOOLEAN_CONSTANT shift, and go to state 60
expressions go to state 99
constant_expressions go to state 62
bool_expressions go to state 73
arithmatic_expressions go to state 64
saved_identifier go to state 65
saved_integer go to state 66
saved_real go to state 67
saved_char go to state 68
saved_boolean go to state 69
state 56
91 arithmatic_expressions: SUB_KW . expressions
NOT_KW shift, and go to state 54
LP_KW shift, and go to state 55
SUB_KW shift, and go to state 56
IDENTIFIER shift, and go to state 3
INTEGER_CONSTANT shift, and go to state 57
REAL_CONSTANT shift, and go to state 58
CHAR_CONSTANT shift, and go to state 59
BOOLEAN_CONSTANT shift, and go to state 60
expressions go to state 100
constant_expressions go to state 62
bool_expressions go to state 73
arithmatic_expressions go to state 64
saved_identifier go to state 65
saved_integer go to state 66
saved_real go to state 67
saved_char go to state 68
saved_boolean go to state 69
state 57
93 saved_integer: INTEGER_CONSTANT .
$default reduce using rule 93 (saved_integer)
state 58
94 saved_real: REAL_CONSTANT .
$default reduce using rule 94 (saved_real)
state 59
95 saved_char: CHAR_CONSTANT .
$default reduce using rule 95 (saved_char)
state 60
96 saved_boolean: BOOLEAN_CONSTANT .
$default reduce using rule 96 (saved_boolean)
state 61
75 bool_expressions: expressions . LT_KW expressions
76 | expressions . LE_KW expressions
77 | expressions . GT_KW expressions
78 | expressions . GE_KW expressions
79 | expressions . EQ_KW expressions
80 | expressions . NE_KW expressions
81 | expressions . AND_KW M expressions
82 | expressions . OR_KW M expressions
83 | expressions . AND_THEN_KW M expressions
84 | expressions . OR_ELSE_KW M expressions
86 arithmatic_expressions: expressions . ADD_KW expressions
87 | expressions . SUB_KW expressions
88 | expressions . MUL_KW expressions
89 | expressions . DIV_KW expressions
90 | expressions . MOD_KW expressions
AND_KW shift, and go to state 101
AND_THEN_KW shift, and go to state 102
OR_KW shift, and go to state 103
OR_ELSE_KW shift, and go to state 104
EQ_KW shift, and go to state 105
NE_KW shift, and go to state 106
LE_KW shift, and go to state 107
LT_KW shift, and go to state 108
GE_KW shift, and go to state 109
GT_KW shift, and go to state 110
ADD_KW shift, and go to state 111
SUB_KW shift, and go to state 112
MUL_KW shift, and go to state 113
DIV_KW shift, and go to state 114
MOD_KW shift, and go to state 115