-
Notifications
You must be signed in to change notification settings - Fork 56
/
y.output
4688 lines (3223 loc) · 132 KB
/
y.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
Terminals which are not used:
CONSTANT
STRING_LITERAL
SIZEOF
PTR_OP
TYPE_NAME
'?'
Conflict in state 246 between rule 132 and token ELSE resolved as shift.
Grammar
rule 1 Program -> translation_unit
rule 2 primary_expression -> IDENTIFIER
rule 3 primary_expression -> TRUE
rule 4 primary_expression -> FALSE
rule 5 primary_expression -> CONSTANT_INT
rule 6 primary_expression -> CONSTANT_DOUBLE
rule 7 primary_expression -> '(' expression ')'
rule 8 postfix_expression -> primary_expression
rule 9 postfix_expression -> postfix_expression '[' expression ']'
rule 10 postfix_expression -> postfix_expression '(' ')'
rule 11 postfix_expression -> postfix_expression '(' argument_expression_list ')'
rule 12 postfix_expression -> postfix_expression INC_OP
rule 13 postfix_expression -> postfix_expression DEC_OP
rule 14 argument_expression_list -> assignment_expression
rule 15 argument_expression_list -> argument_expression_list ',' assignment_expression
rule 16 unary_expression -> postfix_expression
rule 17 unary_expression -> INC_OP unary_expression
rule 18 unary_expression -> DEC_OP unary_expression
rule 19 unary_expression -> unary_operator unary_expression
rule 20 unary_operator -> '+'
rule 21 unary_operator -> '-'
rule 22 unary_operator -> '~'
rule 23 unary_operator -> '!'
rule 24 multiplicative_expression -> unary_expression
rule 25 multiplicative_expression -> multiplicative_expression '*' unary_expression
rule 26 multiplicative_expression -> multiplicative_expression '/' unary_expression
rule 27 multiplicative_expression -> multiplicative_expression '%' unary_expression
rule 28 additive_expression -> multiplicative_expression
rule 29 additive_expression -> additive_expression '+' multiplicative_expression
rule 30 additive_expression -> additive_expression '-' multiplicative_expression
rule 31 shift_expression -> additive_expression
rule 32 shift_expression -> shift_expression LEFT_OP additive_expression
rule 33 shift_expression -> shift_expression RIGHT_OP additive_expression
rule 34 relational_expression -> shift_expression
rule 35 relational_expression -> relational_expression '<' shift_expression
rule 36 relational_expression -> relational_expression '>' shift_expression
rule 37 relational_expression -> relational_expression LE_OP shift_expression
rule 38 relational_expression -> relational_expression GE_OP shift_expression
rule 39 equality_expression -> relational_expression
rule 40 equality_expression -> equality_expression EQ_OP relational_expression
rule 41 equality_expression -> equality_expression NE_OP relational_expression
rule 42 and_expression -> equality_expression
rule 43 and_expression -> and_expression '&' equality_expression
rule 44 exclusive_or_expression -> and_expression
rule 45 exclusive_or_expression -> exclusive_or_expression '^' and_expression
rule 46 inclusive_or_expression -> exclusive_or_expression
rule 47 inclusive_or_expression -> inclusive_or_expression '|' exclusive_or_expression
rule 48 logical_and_expression -> inclusive_or_expression
rule 49 logical_and_expression -> logical_and_expression AND_OP inclusive_or_expression
rule 50 logical_or_expression -> logical_and_expression
rule 51 logical_or_expression -> logical_or_expression OR_OP logical_and_expression
rule 52 assignment_expression -> logical_or_expression
rule 53 assignment_expression -> unary_expression assignment_operator assignment_expression
rule 54 assignment_operator -> '='
rule 55 assignment_operator -> MUL_ASSIGN
rule 56 assignment_operator -> DIV_ASSIGN
rule 57 assignment_operator -> MOD_ASSIGN
rule 58 assignment_operator -> ADD_ASSIGN
rule 59 assignment_operator -> SUB_ASSIGN
rule 60 assignment_operator -> LEFT_ASSIGN
rule 61 assignment_operator -> RIGHT_ASSIGN
rule 62 assignment_operator -> AND_ASSIGN
rule 63 assignment_operator -> XOR_ASSIGN
rule 64 assignment_operator -> OR_ASSIGN
rule 65 expression -> assignment_expression
rule 66 expression -> expression ',' assignment_expression
rule 67 declaration -> type_specifier ';'
rule 68 declaration -> type_specifier init_declarator_list ';'
rule 69 init_declarator_list -> init_declarator
rule 70 init_declarator_list -> init_declarator_list ',' init_declarator
rule 71 init_declarator -> declarator
rule 72 init_declarator -> declarator '=' initializer
rule 73 type_specifier -> VOID
rule 74 type_specifier -> CHAR
rule 75 type_specifier -> INT
rule 76 type_specifier -> DOUBLE
rule 77 type_specifier -> BOOL
rule 78 declarator -> IDENTIFIER
rule 79 declarator -> '(' declarator ')'
rule 80 declarator -> declarator '[' assignment_expression ']'
rule 81 declarator -> declarator '[' '*' ']'
rule 82 declarator -> declarator '[' ']'
rule 83 declarator -> declarator '(' parameter_list ')'
rule 84 declarator -> declarator '(' identifier_list ')'
rule 85 declarator -> declarator '(' ')'
rule 86 parameter_list -> parameter_declaration
rule 87 parameter_list -> parameter_list ',' parameter_declaration
rule 88 parameter_declaration -> type_specifier declarator
rule 89 parameter_declaration -> type_specifier abstract_declarator
rule 90 parameter_declaration -> type_specifier
rule 91 identifier_list -> IDENTIFIER
rule 92 identifier_list -> identifier_list ',' IDENTIFIER
rule 93 abstract_declarator -> '(' abstract_declarator ')'
rule 94 abstract_declarator -> '[' ']'
rule 95 abstract_declarator -> '[' assignment_expression ']'
rule 96 abstract_declarator -> abstract_declarator '[' ']'
rule 97 abstract_declarator -> abstract_declarator '[' assignment_expression ']'
rule 98 abstract_declarator -> '[' '*' ']'
rule 99 abstract_declarator -> abstract_declarator '[' '*' ']'
rule 100 abstract_declarator -> '(' ')'
rule 101 abstract_declarator -> '(' parameter_list ')'
rule 102 abstract_declarator -> abstract_declarator '(' ')'
rule 103 abstract_declarator -> abstract_declarator '(' parameter_list ')'
rule 104 initializer -> assignment_expression
rule 105 initializer -> '{' initializer_list '}'
rule 106 initializer -> '{' initializer_list ',' '}'
rule 107 initializer_list -> initializer
rule 108 initializer_list -> designation initializer
rule 109 initializer_list -> initializer_list ',' initializer
rule 110 initializer_list -> initializer_list ',' designation initializer
rule 111 designation -> designator_list '='
rule 112 designator_list -> designator
rule 113 designator_list -> designator_list designator
rule 114 designator -> '[' logical_or_expression ']'
rule 115 designator -> '.' IDENTIFIER
rule 116 statement -> labeled_statement
rule 117 statement -> compound_statement
rule 118 statement -> expression_statement
rule 119 statement -> selection_statement
rule 120 statement -> iteration_statement
rule 121 statement -> jump_statement
rule 122 labeled_statement -> IDENTIFIER ':' statement
rule 123 labeled_statement -> CASE logical_or_expression ':' statement
rule 124 compound_statement -> '{' '}'
rule 125 compound_statement -> '{' block_item_list '}'
rule 126 block_item_list -> block_item
rule 127 block_item_list -> block_item_list block_item
rule 128 block_item -> declaration
rule 129 block_item -> statement
rule 130 expression_statement -> ';'
rule 131 expression_statement -> expression ';'
rule 132 selection_statement -> IF '(' expression ')' statement
rule 133 selection_statement -> IF '(' expression ')' statement ELSE statement
rule 134 selection_statement -> SWITCH '(' expression ')' statement
rule 135 iteration_statement -> WHILE '(' expression ')' statement
rule 136 iteration_statement -> DO statement WHILE '(' expression ')' ';'
rule 137 iteration_statement -> FOR '(' expression_statement expression_statement ')' statement
rule 138 iteration_statement -> FOR '(' expression_statement expression_statement expression ')' statement
rule 139 iteration_statement -> FOR '(' declaration expression_statement ')' statement
rule 140 iteration_statement -> FOR '(' declaration expression_statement expression ')' statement
rule 141 jump_statement -> GOTO IDENTIFIER ';'
rule 142 jump_statement -> CONTINUE ';'
rule 143 jump_statement -> BREAK ';'
rule 144 jump_statement -> RETURN ';'
rule 145 jump_statement -> RETURN expression ';'
rule 146 translation_unit -> external_declaration
rule 147 translation_unit -> translation_unit external_declaration
rule 148 external_declaration -> function_definition
rule 149 external_declaration -> declaration
rule 150 function_definition -> type_specifier declarator declaration_list compound_statement
rule 151 function_definition -> type_specifier declarator compound_statement
rule 152 declaration_list -> declaration
rule 153 declaration_list -> declaration_list declaration
Terminals, with rules where they appear
$ (-1)
'!' (33) 23
'%' (37) 27
'&' (38) 43
'(' (40) 7 10 11 79 83 84 85 93 100 101 102 103 132 133 134 135 136
137 138 139 140
')' (41) 7 10 11 79 83 84 85 93 100 101 102 103 132 133 134 135 136
137 138 139 140
'*' (42) 25 81 98 99
'+' (43) 20 29
',' (44) 15 66 70 87 92 106 109 110
'-' (45) 21 30
'.' (46) 115
'/' (47) 26
':' (58) 122 123
';' (59) 67 68 130 131 136 141 142 143 144 145
'<' (60) 35
'=' (61) 54 72 111
'>' (62) 36
'?' (63)
'[' (91) 9 80 81 82 94 95 96 97 98 99 114
']' (93) 9 80 81 82 94 95 96 97 98 99 114
'^' (94) 45
'{' (123) 105 106 124 125
'|' (124) 47
'}' (125) 105 106 124 125
'~' (126) 22
error (256)
IDENTIFIER (257) 2 78 91 92 115 122 141
CONSTANT (258)
STRING_LITERAL (259)
SIZEOF (260)
CONSTANT_INT (261) 5
CONSTANT_DOUBLE (262) 6
PTR_OP (263)
INC_OP (264) 12 17
DEC_OP (265) 13 18
LEFT_OP (266) 32
RIGHT_OP (267) 33
LE_OP (268) 37
GE_OP (269) 38
EQ_OP (270) 40
NE_OP (271) 41
AND_OP (272) 49
OR_OP (273) 51
MUL_ASSIGN (274) 55
DIV_ASSIGN (275) 56
MOD_ASSIGN (276) 57
ADD_ASSIGN (277) 58
SUB_ASSIGN (278) 59
LEFT_ASSIGN (279) 60
RIGHT_ASSIGN (280) 61
AND_ASSIGN (281) 62
XOR_ASSIGN (282) 63
OR_ASSIGN (283) 64
TYPE_NAME (284)
CHAR (285) 74
INT (286) 75
DOUBLE (287) 76
VOID (288) 73
BOOL (289) 77
CASE (290) 123
IF (291) 132 133
ELSE (292) 133
SWITCH (293) 134
WHILE (294) 135 136
DO (295) 136
FOR (296) 137 138 139 140
GOTO (297) 141
CONTINUE (298) 142
BREAK (299) 143
RETURN (300) 144 145
TRUE (301) 3
FALSE (302) 4
LOWER_THAN_ELSE (303)
Nonterminals, with rules where they appear
Program (74)
on left: 1
primary_expression (75)
on left: 2 3 4 5 6 7, on right: 8
postfix_expression (76)
on left: 8 9 10 11 12 13, on right: 9 10 11 12 13 16
argument_expression_list (77)
on left: 14 15, on right: 11 15
unary_expression (78)
on left: 16 17 18 19, on right: 17 18 19 24 25 26 27 53
unary_operator (79)
on left: 20 21 22 23, on right: 19
multiplicative_expression (80)
on left: 24 25 26 27, on right: 25 26 27 28 29 30
additive_expression (81)
on left: 28 29 30, on right: 29 30 31 32 33
shift_expression (82)
on left: 31 32 33, on right: 32 33 34 35 36 37 38
relational_expression (83)
on left: 34 35 36 37 38, on right: 35 36 37 38 39 40 41
equality_expression (84)
on left: 39 40 41, on right: 40 41 42 43
and_expression (85)
on left: 42 43, on right: 43 44 45
exclusive_or_expression (86)
on left: 44 45, on right: 45 46 47
inclusive_or_expression (87)
on left: 46 47, on right: 47 48 49
logical_and_expression (88)
on left: 48 49, on right: 49 50 51
logical_or_expression (89)
on left: 50 51, on right: 51 52 114 123
assignment_expression (90)
on left: 52 53, on right: 14 15 53 65 66 80 95 97 104
assignment_operator (91)
on left: 54 55 56 57 58 59 60 61 62 63 64, on right: 53
expression (92)
on left: 65 66, on right: 7 9 66 131 132 133 134 135 136 138 140
145
declaration (93)
on left: 67 68, on right: 128 139 140 149 152 153
init_declarator_list (94)
on left: 69 70, on right: 68 70
init_declarator (95)
on left: 71 72, on right: 69 70
type_specifier (96)
on left: 73 74 75 76 77, on right: 67 68 88 89 90 150 151
declarator (97)
on left: 78 79 80 81 82 83 84 85, on right: 71 72 79 80 81 82 83
84 85 88 150 151
parameter_list (98)
on left: 86 87, on right: 83 87 101 103
parameter_declaration (99)
on left: 88 89 90, on right: 86 87
identifier_list (100)
on left: 91 92, on right: 84 92
abstract_declarator (101)
on left: 93 94 95 96 97 98 99 100 101 102 103, on right: 89 93
96 97 99 102 103
initializer (102)
on left: 104 105 106, on right: 72 107 108 109 110
initializer_list (103)
on left: 107 108 109 110, on right: 105 106 109 110
designation (104)
on left: 111, on right: 108 110
designator_list (105)
on left: 112 113, on right: 111 113
designator (106)
on left: 114 115, on right: 112 113
statement (107)
on left: 116 117 118 119 120 121, on right: 122 123 129 132 133
134 135 136 137 138 139 140
labeled_statement (108)
on left: 122 123, on right: 116
compound_statement (109)
on left: 124 125, on right: 117 150 151
block_item_list (110)
on left: 126 127, on right: 125 127
block_item (111)
on left: 128 129, on right: 126 127
expression_statement (112)
on left: 130 131, on right: 118 137 138 139 140
selection_statement (113)
on left: 132 133 134, on right: 119
iteration_statement (114)
on left: 135 136 137 138 139 140, on right: 120
jump_statement (115)
on left: 141 142 143 144 145, on right: 121
translation_unit (116)
on left: 146 147, on right: 1 147
external_declaration (117)
on left: 148 149, on right: 146 147
function_definition (118)
on left: 150 151, on right: 148
declaration_list (119)
on left: 152 153, on right: 150 153
state 0
CHAR shift, and go to state 1
INT shift, and go to state 2
DOUBLE shift, and go to state 3
VOID shift, and go to state 4
BOOL shift, and go to state 5
Program go to state 267
declaration go to state 6
type_specifier go to state 7
translation_unit go to state 8
external_declaration go to state 9
function_definition go to state 10
state 1
type_specifier -> CHAR . (rule 74)
$default reduce using rule 74 (type_specifier)
state 2
type_specifier -> INT . (rule 75)
$default reduce using rule 75 (type_specifier)
state 3
type_specifier -> DOUBLE . (rule 76)
$default reduce using rule 76 (type_specifier)
state 4
type_specifier -> VOID . (rule 73)
$default reduce using rule 73 (type_specifier)
state 5
type_specifier -> BOOL . (rule 77)
$default reduce using rule 77 (type_specifier)
state 6
external_declaration -> declaration . (rule 149)
$default reduce using rule 149 (external_declaration)
state 7
declaration -> type_specifier . ';' (rule 67)
declaration -> type_specifier . init_declarator_list ';' (rule 68)
function_definition -> type_specifier . declarator declaration_list compound_statement (rule 150)
function_definition -> type_specifier . declarator compound_statement (rule 151)
IDENTIFIER shift, and go to state 11
';' shift, and go to state 12
'(' shift, and go to state 13
init_declarator_list go to state 14
init_declarator go to state 15
declarator go to state 16
state 8
Program -> translation_unit . (rule 1)
translation_unit -> translation_unit . external_declaration (rule 147)
CHAR shift, and go to state 1
INT shift, and go to state 2
DOUBLE shift, and go to state 3
VOID shift, and go to state 4
BOOL shift, and go to state 5
$default reduce using rule 1 (Program)
declaration go to state 6
type_specifier go to state 7
external_declaration go to state 17
function_definition go to state 10
state 9
translation_unit -> external_declaration . (rule 146)
$default reduce using rule 146 (translation_unit)
state 10
external_declaration -> function_definition . (rule 148)
$default reduce using rule 148 (external_declaration)
state 11
declarator -> IDENTIFIER . (rule 78)
$default reduce using rule 78 (declarator)
state 12
declaration -> type_specifier ';' . (rule 67)
$default reduce using rule 67 (declaration)
state 13
declarator -> '(' . declarator ')' (rule 79)
IDENTIFIER shift, and go to state 11
'(' shift, and go to state 13
declarator go to state 18
state 14
declaration -> type_specifier init_declarator_list . ';' (rule 68)
init_declarator_list -> init_declarator_list . ',' init_declarator (rule 70)
';' shift, and go to state 19
',' shift, and go to state 20
state 15
init_declarator_list -> init_declarator . (rule 69)
$default reduce using rule 69 (init_declarator_list)
state 16
init_declarator -> declarator . (rule 71)
init_declarator -> declarator . '=' initializer (rule 72)
declarator -> declarator . '[' assignment_expression ']' (rule 80)
declarator -> declarator . '[' '*' ']' (rule 81)
declarator -> declarator . '[' ']' (rule 82)
declarator -> declarator . '(' parameter_list ')' (rule 83)
declarator -> declarator . '(' identifier_list ')' (rule 84)
declarator -> declarator . '(' ')' (rule 85)
function_definition -> type_specifier declarator . declaration_list compound_statement (rule 150)
function_definition -> type_specifier declarator . compound_statement (rule 151)
CHAR shift, and go to state 1
INT shift, and go to state 2
DOUBLE shift, and go to state 3
VOID shift, and go to state 4
BOOL shift, and go to state 5
'=' shift, and go to state 21
'[' shift, and go to state 22
'{' shift, and go to state 23
'(' shift, and go to state 24
$default reduce using rule 71 (init_declarator)
declaration go to state 25
type_specifier go to state 26
compound_statement go to state 27
declaration_list go to state 28
state 17
translation_unit -> translation_unit external_declaration . (rule 147)
$default reduce using rule 147 (translation_unit)
state 18
declarator -> '(' declarator . ')' (rule 79)
declarator -> declarator . '[' assignment_expression ']' (rule 80)
declarator -> declarator . '[' '*' ']' (rule 81)
declarator -> declarator . '[' ']' (rule 82)
declarator -> declarator . '(' parameter_list ')' (rule 83)
declarator -> declarator . '(' identifier_list ')' (rule 84)
declarator -> declarator . '(' ')' (rule 85)
'[' shift, and go to state 22
'(' shift, and go to state 24
')' shift, and go to state 29
state 19
declaration -> type_specifier init_declarator_list ';' . (rule 68)
$default reduce using rule 68 (declaration)
state 20
init_declarator_list -> init_declarator_list ',' . init_declarator (rule 70)
IDENTIFIER shift, and go to state 11
'(' shift, and go to state 13
init_declarator go to state 30
declarator go to state 31
state 21
init_declarator -> declarator '=' . initializer (rule 72)
IDENTIFIER shift, and go to state 32
CONSTANT_INT shift, and go to state 33
CONSTANT_DOUBLE shift, and go to state 34
INC_OP shift, and go to state 35
DEC_OP shift, and go to state 36
TRUE shift, and go to state 37
FALSE shift, and go to state 38
'!' shift, and go to state 39
'~' shift, and go to state 40
'-' shift, and go to state 41
'+' shift, and go to state 42
'{' shift, and go to state 43
'(' shift, and go to state 44
primary_expression go to state 45
postfix_expression go to state 46
unary_expression go to state 47
unary_operator go to state 48
multiplicative_expression go to state 49
additive_expression go to state 50
shift_expression go to state 51
relational_expression go to state 52
equality_expression go to state 53
and_expression go to state 54
exclusive_or_expression go to state 55
inclusive_or_expression go to state 56
logical_and_expression go to state 57
logical_or_expression go to state 58
assignment_expression go to state 59
initializer go to state 60
state 22
declarator -> declarator '[' . assignment_expression ']' (rule 80)
declarator -> declarator '[' . '*' ']' (rule 81)
declarator -> declarator '[' . ']' (rule 82)
IDENTIFIER shift, and go to state 32
CONSTANT_INT shift, and go to state 33
CONSTANT_DOUBLE shift, and go to state 34
INC_OP shift, and go to state 35
DEC_OP shift, and go to state 36
TRUE shift, and go to state 37
FALSE shift, and go to state 38
']' shift, and go to state 61
'!' shift, and go to state 39
'~' shift, and go to state 40
'-' shift, and go to state 41
'+' shift, and go to state 42
'*' shift, and go to state 62
'(' shift, and go to state 44
primary_expression go to state 45
postfix_expression go to state 46
unary_expression go to state 47
unary_operator go to state 48
multiplicative_expression go to state 49
additive_expression go to state 50
shift_expression go to state 51
relational_expression go to state 52
equality_expression go to state 53
and_expression go to state 54
exclusive_or_expression go to state 55
inclusive_or_expression go to state 56
logical_and_expression go to state 57
logical_or_expression go to state 58
assignment_expression go to state 63
state 23
compound_statement -> '{' . '}' (rule 124)
compound_statement -> '{' . block_item_list '}' (rule 125)
IDENTIFIER shift, and go to state 64
CONSTANT_INT shift, and go to state 33
CONSTANT_DOUBLE shift, and go to state 34
INC_OP shift, and go to state 35
DEC_OP shift, and go to state 36
CHAR shift, and go to state 1
INT shift, and go to state 2
DOUBLE shift, and go to state 3
VOID shift, and go to state 4
BOOL shift, and go to state 5
CASE shift, and go to state 65
IF shift, and go to state 66
SWITCH shift, and go to state 67
WHILE shift, and go to state 68
DO shift, and go to state 69
FOR shift, and go to state 70
GOTO shift, and go to state 71
CONTINUE shift, and go to state 72
BREAK shift, and go to state 73
RETURN shift, and go to state 74
TRUE shift, and go to state 37
FALSE shift, and go to state 38
';' shift, and go to state 75
'!' shift, and go to state 39
'~' shift, and go to state 40
'-' shift, and go to state 41
'+' shift, and go to state 42
'{' shift, and go to state 23
'}' shift, and go to state 76
'(' shift, and go to state 44
primary_expression go to state 45
postfix_expression go to state 46
unary_expression go to state 47
unary_operator go to state 48
multiplicative_expression go to state 49
additive_expression go to state 50
shift_expression go to state 51
relational_expression go to state 52
equality_expression go to state 53
and_expression go to state 54
exclusive_or_expression go to state 55
inclusive_or_expression go to state 56
logical_and_expression go to state 57
logical_or_expression go to state 58
assignment_expression go to state 77
expression go to state 78
declaration go to state 79
type_specifier go to state 26
statement go to state 80
labeled_statement go to state 81
compound_statement go to state 82
block_item_list go to state 83
block_item go to state 84
expression_statement go to state 85
selection_statement go to state 86
iteration_statement go to state 87
jump_statement go to state 88
state 24
declarator -> declarator '(' . parameter_list ')' (rule 83)
declarator -> declarator '(' . identifier_list ')' (rule 84)
declarator -> declarator '(' . ')' (rule 85)
IDENTIFIER shift, and go to state 89
CHAR shift, and go to state 1
INT shift, and go to state 2
DOUBLE shift, and go to state 3
VOID shift, and go to state 4
BOOL shift, and go to state 5
')' shift, and go to state 90
type_specifier go to state 91
parameter_list go to state 92
parameter_declaration go to state 93
identifier_list go to state 94
state 25
declaration_list -> declaration . (rule 152)
$default reduce using rule 152 (declaration_list)
state 26
declaration -> type_specifier . ';' (rule 67)
declaration -> type_specifier . init_declarator_list ';' (rule 68)
IDENTIFIER shift, and go to state 11
';' shift, and go to state 12
'(' shift, and go to state 13
init_declarator_list go to state 14
init_declarator go to state 15
declarator go to state 31
state 27
function_definition -> type_specifier declarator compound_statement . (rule 151)
$default reduce using rule 151 (function_definition)
state 28
function_definition -> type_specifier declarator declaration_list . compound_statement (rule 150)
declaration_list -> declaration_list . declaration (rule 153)
CHAR shift, and go to state 1
INT shift, and go to state 2
DOUBLE shift, and go to state 3
VOID shift, and go to state 4
BOOL shift, and go to state 5
'{' shift, and go to state 23
declaration go to state 95
type_specifier go to state 26
compound_statement go to state 96
state 29
declarator -> '(' declarator ')' . (rule 79)
$default reduce using rule 79 (declarator)
state 30
init_declarator_list -> init_declarator_list ',' init_declarator . (rule 70)
$default reduce using rule 70 (init_declarator_list)
state 31
init_declarator -> declarator . (rule 71)
init_declarator -> declarator . '=' initializer (rule 72)
declarator -> declarator . '[' assignment_expression ']' (rule 80)
declarator -> declarator . '[' '*' ']' (rule 81)
declarator -> declarator . '[' ']' (rule 82)
declarator -> declarator . '(' parameter_list ')' (rule 83)
declarator -> declarator . '(' identifier_list ')' (rule 84)
declarator -> declarator . '(' ')' (rule 85)
'=' shift, and go to state 21
'[' shift, and go to state 22
'(' shift, and go to state 24
$default reduce using rule 71 (init_declarator)
state 32
primary_expression -> IDENTIFIER . (rule 2)
$default reduce using rule 2 (primary_expression)
state 33
primary_expression -> CONSTANT_INT . (rule 5)
$default reduce using rule 5 (primary_expression)
state 34
primary_expression -> CONSTANT_DOUBLE . (rule 6)
$default reduce using rule 6 (primary_expression)
state 35
unary_expression -> INC_OP . unary_expression (rule 17)
IDENTIFIER shift, and go to state 32
CONSTANT_INT shift, and go to state 33
CONSTANT_DOUBLE shift, and go to state 34
INC_OP shift, and go to state 35
DEC_OP shift, and go to state 36
TRUE shift, and go to state 37
FALSE shift, and go to state 38
'!' shift, and go to state 39
'~' shift, and go to state 40
'-' shift, and go to state 41
'+' shift, and go to state 42
'(' shift, and go to state 44
primary_expression go to state 45
postfix_expression go to state 46
unary_expression go to state 97
unary_operator go to state 48
state 36
unary_expression -> DEC_OP . unary_expression (rule 18)
IDENTIFIER shift, and go to state 32
CONSTANT_INT shift, and go to state 33
CONSTANT_DOUBLE shift, and go to state 34
INC_OP shift, and go to state 35
DEC_OP shift, and go to state 36
TRUE shift, and go to state 37
FALSE shift, and go to state 38
'!' shift, and go to state 39
'~' shift, and go to state 40
'-' shift, and go to state 41
'+' shift, and go to state 42
'(' shift, and go to state 44
primary_expression go to state 45
postfix_expression go to state 46
unary_expression go to state 98
unary_operator go to state 48
state 37
primary_expression -> TRUE . (rule 3)
$default reduce using rule 3 (primary_expression)
state 38
primary_expression -> FALSE . (rule 4)
$default reduce using rule 4 (primary_expression)
state 39
unary_operator -> '!' . (rule 23)
$default reduce using rule 23 (unary_operator)
state 40
unary_operator -> '~' . (rule 22)
$default reduce using rule 22 (unary_operator)
state 41
unary_operator -> '-' . (rule 21)
$default reduce using rule 21 (unary_operator)
state 42
unary_operator -> '+' . (rule 20)
$default reduce using rule 20 (unary_operator)
state 43
initializer -> '{' . initializer_list '}' (rule 105)
initializer -> '{' . initializer_list ',' '}' (rule 106)
IDENTIFIER shift, and go to state 32
CONSTANT_INT shift, and go to state 33
CONSTANT_DOUBLE shift, and go to state 34
INC_OP shift, and go to state 35
DEC_OP shift, and go to state 36
TRUE shift, and go to state 37
FALSE shift, and go to state 38
'[' shift, and go to state 99
'.' shift, and go to state 100
'!' shift, and go to state 39
'~' shift, and go to state 40
'-' shift, and go to state 41
'+' shift, and go to state 42
'{' shift, and go to state 43
'(' shift, and go to state 44
primary_expression go to state 45
postfix_expression go to state 46
unary_expression go to state 47
unary_operator go to state 48
multiplicative_expression go to state 49
additive_expression go to state 50
shift_expression go to state 51
relational_expression go to state 52
equality_expression go to state 53
and_expression go to state 54
exclusive_or_expression go to state 55
inclusive_or_expression go to state 56
logical_and_expression go to state 57
logical_or_expression go to state 58
assignment_expression go to state 59
initializer go to state 101
initializer_list go to state 102
designation go to state 103
designator_list go to state 104
designator go to state 105
state 44
primary_expression -> '(' . expression ')' (rule 7)