-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathparser.out
9835 lines (8807 loc) · 565 KB
/
parser.out
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)
Grammar
Rule 0 S' -> translation_unit
Rule 1 translation_unit -> external_declaration
Rule 2 translation_unit -> translation_unit external_declaration
Rule 3 external_declaration -> function_definition
Rule 4 external_declaration -> declaration
Rule 5 function_definition -> type_specifier declarator compound_statement
Rule 6 type_specifier -> VOID
Rule 7 type_specifier -> CHAR
Rule 8 type_specifier -> SHORT
Rule 9 type_specifier -> INT
Rule 10 type_specifier -> LONG
Rule 11 type_specifier -> FLOAT
Rule 12 type_specifier -> DOUBLE
Rule 13 type_specifier -> SIGNED
Rule 14 type_specifier -> UNSIGNED
Rule 15 declarator -> pointer direct_declarator
Rule 16 declarator -> direct_declarator
Rule 17 pointer -> TIMES
Rule 18 pointer -> TIMES pointer
Rule 19 direct_declarator -> ID
Rule 20 direct_declarator -> LPAREN declarator RPAREN
Rule 21 direct_declarator -> direct_declarator LBRACKET constant_expression RBRACKET
Rule 22 direct_declarator -> direct_declarator LBRACKET RBRACKET
Rule 23 direct_declarator -> direct_declarator LPAREN parameter_type_list RPAREN
Rule 24 direct_declarator -> direct_declarator LPAREN identifier_list RPAREN
Rule 25 direct_declarator -> direct_declarator LPAREN RPAREN
Rule 26 constant_expression -> conditional_expression
Rule 27 conditional_expression -> logical_or_expression
Rule 28 conditional_expression -> logical_or_expression CONDOP expression COLON conditional_expression
Rule 29 logical_or_expression -> logical_and_expression
Rule 30 logical_or_expression -> logical_or_expression LOR logical_and_expression
Rule 31 logical_and_expression -> inclusive_or_expression
Rule 32 logical_and_expression -> logical_and_expression LAND inclusive_or_expression
Rule 33 inclusive_or_expression -> exclusive_or_expression
Rule 34 inclusive_or_expression -> inclusive_or_expression OR exclusive_or_expression
Rule 35 exclusive_or_expression -> and_expression
Rule 36 exclusive_or_expression -> exclusive_or_expression XOR and_expression
Rule 37 and_expression -> equality_expression
Rule 38 and_expression -> and_expression AND equality_expression
Rule 39 equality_expression -> relational_expression
Rule 40 equality_expression -> equality_expression EQ relational_expression
Rule 41 equality_expression -> equality_expression NE relational_expression
Rule 42 relational_expression -> shift_expression
Rule 43 relational_expression -> relational_expression LT shift_expression
Rule 44 relational_expression -> relational_expression GT shift_expression
Rule 45 relational_expression -> relational_expression LE shift_expression
Rule 46 relational_expression -> relational_expression GE shift_expression
Rule 47 shift_expression -> additive_expression
Rule 48 shift_expression -> shift_expression LSHIFT additive_expression
Rule 49 shift_expression -> shift_expression RSHIFT additive_expression
Rule 50 additive_expression -> multiplicative_expression
Rule 51 additive_expression -> additive_expression PLUS multiplicative_expression
Rule 52 additive_expression -> additive_expression MINUS multiplicative_expression
Rule 53 multiplicative_expression -> cast_expression
Rule 54 multiplicative_expression -> multiplicative_expression TIMES cast_expression
Rule 55 multiplicative_expression -> multiplicative_expression DIVIDE cast_expression
Rule 56 multiplicative_expression -> multiplicative_expression MOD cast_expression
Rule 57 cast_expression -> unary_expression
Rule 58 cast_expression -> LPAREN type_name RPAREN cast_expression
Rule 59 unary_expression -> postfix_expression
Rule 60 unary_expression -> PLUSPLUS unary_expression
Rule 61 unary_expression -> MINUSMINUS unary_expression
Rule 62 unary_expression -> unary_operator cast_expression
Rule 63 unary_expression -> SIZEOF unary_expression
Rule 64 unary_expression -> SIZEOF LPAREN type_name RPAREN
Rule 65 postfix_expression -> primary_expression
Rule 66 postfix_expression -> postfix_expression LBRACKET expression RBRACKET
Rule 67 postfix_expression -> postfix_expression LPAREN argument_expression_list RPAREN
Rule 68 postfix_expression -> postfix_expression LPAREN RPAREN
Rule 69 postfix_expression -> postfix_expression PERIOD ID
Rule 70 postfix_expression -> postfix_expression ARROW ID
Rule 71 postfix_expression -> postfix_expression PLUSPLUS
Rule 72 postfix_expression -> postfix_expression MINUSMINUS
Rule 73 primary_expression -> ID
Rule 74 primary_expression -> constant
Rule 75 primary_expression -> SCONST
Rule 76 primary_expression -> LPAREN expression RPAREN
Rule 77 constant -> ICONST
Rule 78 constant -> FCONST
Rule 79 constant -> CCONST
Rule 80 expression -> assignment_expression
Rule 81 expression -> expression COMMA assignment_expression
Rule 82 assignment_expression -> conditional_expression
Rule 83 assignment_expression -> unary_expression assignment_operator assignment_expression
Rule 84 assignment_operator -> EQUALS
Rule 85 assignment_operator -> TIMESEQUAL
Rule 86 assignment_operator -> DIVEQUAL
Rule 87 assignment_operator -> MODEQUAL
Rule 88 assignment_operator -> PLUSEQUAL
Rule 89 assignment_operator -> MINUSEQUAL
Rule 90 assignment_operator -> LSHIFTEQUAL
Rule 91 assignment_operator -> RSHIFTEQUAL
Rule 92 assignment_operator -> ANDEQUAL
Rule 93 assignment_operator -> OREQUAL
Rule 94 assignment_operator -> XOREQUAL
Rule 95 unary_operator -> AND
Rule 96 unary_operator -> TIMES
Rule 97 unary_operator -> PLUS
Rule 98 unary_operator -> MINUS
Rule 99 unary_operator -> NOT
Rule 100 unary_operator -> LNOT
Rule 101 type_name -> type_specifier abstract_declarator
Rule 102 type_name -> type_specifier
Rule 103 parameter_type_list -> parameter_list
Rule 104 parameter_type_list -> parameter_list COMMA ELLIPSIS
Rule 105 parameter_list -> parameter_declaration
Rule 106 parameter_list -> parameter_list COMMA parameter_declaration
Rule 107 parameter_declaration -> type_specifier declarator
Rule 108 parameter_declaration -> type_specifier abstract_declarator
Rule 109 parameter_declaration -> type_specifier
Rule 110 abstract_declarator -> pointer
Rule 111 abstract_declarator -> pointer direct_abstract_declarator
Rule 112 abstract_declarator -> direct_abstract_declarator
Rule 113 direct_abstract_declarator -> LPAREN abstract_declarator RPAREN
Rule 114 direct_abstract_declarator -> direct_abstract_declarator LBRACKET constant_expression RBRACKET
Rule 115 direct_abstract_declarator -> direct_abstract_declarator LBRACKET RBRACKET
Rule 116 direct_abstract_declarator -> LBRACKET constant_expression RBRACKET
Rule 117 direct_abstract_declarator -> LBRACKET RBRACKET
Rule 118 direct_abstract_declarator -> direct_abstract_declarator LPAREN parameter_type_list RPAREN
Rule 119 direct_abstract_declarator -> LPAREN parameter_type_list RPAREN
Rule 120 declaration -> type_specifier init_declarator_list SEMI
Rule 121 declaration -> type_specifier SEMI
Rule 122 declaration_list -> declaration
Rule 123 declaration_list -> declaration_list declaration
Rule 124 init_declarator -> declarator
Rule 125 init_declarator -> declarator EQUALS initializer
Rule 126 init_declarator_list -> init_declarator
Rule 127 init_declarator_list -> init_declarator_list COMMA init_declarator
Rule 128 initializer -> assignment_expression
Rule 129 initializer -> LBRACE initializer_list RBRACE
Rule 130 initializer -> LBRACE initializer_list COMMA RBRACE
Rule 131 initializer_list -> initializer
Rule 132 initializer_list -> initializer_list COMMA initializer
Rule 133 compound_statement -> LBRACE declaration_list statement_list RBRACE
Rule 134 compound_statement -> LBRACE statement_list RBRACE
Rule 135 compound_statement -> LBRACE declaration_list RBRACE
Rule 136 compound_statement -> LBRACE RBRACE
Rule 137 statement -> expression_statement
Rule 138 statement -> compound_statement
Rule 139 statement -> selection_statement
Rule 140 statement -> iteration_statement
Rule 141 statement -> jump_statement
Rule 142 statement_list -> statement
Rule 143 statement_list -> statement_list statement
Rule 144 expression_statement -> expression SEMI
Rule 145 selection_statement -> IF LPAREN expression RPAREN statement
Rule 146 selection_statement -> IF LPAREN expression RPAREN statement ELSE statement
Rule 147 iteration_statement -> WHILE LPAREN expression RPAREN statement
Rule 148 iteration_statement -> FOR LPAREN expression SEMI expression SEMI expression RPAREN statement
Rule 149 jump_statement -> BREAK SEMI
Rule 150 jump_statement -> RETURN expression SEMI
Rule 151 jump_statement -> RETURN SEMI
Rule 152 argument_expression_list -> assignment_expression
Rule 153 argument_expression_list -> argument_expression_list COMMA assignment_expression
Rule 154 identifier_list -> ID
Rule 155 identifier_list -> identifier_list COMMA ID
Rule 156 empty -> <empty>
Terminals, with rules where they appear
AND : 38 95
ANDEQUAL : 92
ARROW : 70
BREAK : 149
CCONST : 79
CHAR : 7
COLON : 28
COMMA : 81 104 106 127 130 132 153 155
CONDOP : 28
DIVEQUAL : 86
DIVIDE : 55
DOUBLE : 12
ELLIPSIS : 104
ELSE : 146
EQ : 40
EQUALS : 84 125
FCONST : 78
FLOAT : 11
FOR : 148
GE : 46
GT : 44
ICONST : 77
ID : 19 69 70 73 154 155
IF : 145 146
INT : 9
LAND : 32
LBRACE : 129 130 133 134 135 136
LBRACKET : 21 22 66 114 115 116 117
LE : 45
LNOT : 100
LONG : 10
LOR : 30
LPAREN : 20 23 24 25 58 64 67 68 76 113 118 119 145 146 147 148
LSHIFT : 48
LSHIFTEQUAL : 90
LT : 43
MINUS : 52 98
MINUSEQUAL : 89
MINUSMINUS : 61 72
MOD : 56
MODEQUAL : 87
NE : 41
NOT : 99
OR : 34
OREQUAL : 93
PERIOD : 69
PLUS : 51 97
PLUSEQUAL : 88
PLUSPLUS : 60 71
RBRACE : 129 130 133 134 135 136
RBRACKET : 21 22 66 114 115 116 117
RETURN : 150 151
RPAREN : 20 23 24 25 58 64 67 68 76 113 118 119 145 146 147 148
RSHIFT : 49
RSHIFTEQUAL : 91
SCONST : 75
SEMI : 120 121 144 148 148 149 150 151
SHORT : 8
SIGNED : 13
SIZEOF : 63 64
TIMES : 17 18 54 96
TIMESEQUAL : 85
UNSIGNED : 14
VOID : 6
WHILE : 147
XOR : 36
XOREQUAL : 94
error :
Nonterminals, with rules where they appear
abstract_declarator : 101 108 113
additive_expression : 47 48 49 51 52
and_expression : 35 36 38
argument_expression_list : 67 153
assignment_expression : 80 81 83 128 152 153
assignment_operator : 83
cast_expression : 53 54 55 56 58 62
compound_statement : 5 138
conditional_expression : 26 28 82
constant : 74
constant_expression : 21 114 116
declaration : 4 122 123
declaration_list : 123 133 135
declarator : 5 20 107 124 125
direct_abstract_declarator : 111 112 114 115 118
direct_declarator : 15 16 21 22 23 24 25
empty :
equality_expression : 37 38 40 41
exclusive_or_expression : 33 34 36
expression : 28 66 76 81 144 145 146 147 148 148 148 150
expression_statement : 137
external_declaration : 1 2
function_definition : 3
identifier_list : 24 155
inclusive_or_expression : 31 32 34
init_declarator : 126 127
init_declarator_list : 120 127
initializer : 125 131 132
initializer_list : 129 130 132
iteration_statement : 140
jump_statement : 141
logical_and_expression : 29 30 32
logical_or_expression : 27 28 30
multiplicative_expression : 50 51 52 54 55 56
parameter_declaration : 105 106
parameter_list : 103 104 106
parameter_type_list : 23 118 119
pointer : 15 18 110 111
postfix_expression : 59 66 67 68 69 70 71 72
primary_expression : 65
relational_expression : 39 40 41 43 44 45 46
selection_statement : 139
shift_expression : 42 43 44 45 46 48 49
statement : 142 143 145 146 146 147 148
statement_list : 133 134 143
translation_unit : 2 0
type_name : 58 64
type_specifier : 5 101 102 107 108 109 120 121
unary_expression : 57 60 61 63 83
unary_operator : 62
Parsing method: LALR
state 0
(0) S' -> . translation_unit
(1) translation_unit -> . external_declaration
(2) translation_unit -> . translation_unit external_declaration
(3) external_declaration -> . function_definition
(4) external_declaration -> . declaration
(5) function_definition -> . type_specifier declarator compound_statement
(120) declaration -> . type_specifier init_declarator_list SEMI
(121) declaration -> . type_specifier SEMI
(6) type_specifier -> . VOID
(7) type_specifier -> . CHAR
(8) type_specifier -> . SHORT
(9) type_specifier -> . INT
(10) type_specifier -> . LONG
(11) type_specifier -> . FLOAT
(12) type_specifier -> . DOUBLE
(13) type_specifier -> . SIGNED
(14) type_specifier -> . UNSIGNED
VOID shift and go to state 6
CHAR shift and go to state 7
SHORT shift and go to state 8
INT shift and go to state 9
LONG shift and go to state 10
FLOAT shift and go to state 11
DOUBLE shift and go to state 12
SIGNED shift and go to state 13
UNSIGNED shift and go to state 14
translation_unit shift and go to state 1
external_declaration shift and go to state 2
function_definition shift and go to state 3
declaration shift and go to state 4
type_specifier shift and go to state 5
state 1
(0) S' -> translation_unit .
(2) translation_unit -> translation_unit . external_declaration
(3) external_declaration -> . function_definition
(4) external_declaration -> . declaration
(5) function_definition -> . type_specifier declarator compound_statement
(120) declaration -> . type_specifier init_declarator_list SEMI
(121) declaration -> . type_specifier SEMI
(6) type_specifier -> . VOID
(7) type_specifier -> . CHAR
(8) type_specifier -> . SHORT
(9) type_specifier -> . INT
(10) type_specifier -> . LONG
(11) type_specifier -> . FLOAT
(12) type_specifier -> . DOUBLE
(13) type_specifier -> . SIGNED
(14) type_specifier -> . UNSIGNED
VOID shift and go to state 6
CHAR shift and go to state 7
SHORT shift and go to state 8
INT shift and go to state 9
LONG shift and go to state 10
FLOAT shift and go to state 11
DOUBLE shift and go to state 12
SIGNED shift and go to state 13
UNSIGNED shift and go to state 14
external_declaration shift and go to state 15
function_definition shift and go to state 3
declaration shift and go to state 4
type_specifier shift and go to state 5
state 2
(1) translation_unit -> external_declaration .
VOID reduce using rule 1 (translation_unit -> external_declaration .)
CHAR reduce using rule 1 (translation_unit -> external_declaration .)
SHORT reduce using rule 1 (translation_unit -> external_declaration .)
INT reduce using rule 1 (translation_unit -> external_declaration .)
LONG reduce using rule 1 (translation_unit -> external_declaration .)
FLOAT reduce using rule 1 (translation_unit -> external_declaration .)
DOUBLE reduce using rule 1 (translation_unit -> external_declaration .)
SIGNED reduce using rule 1 (translation_unit -> external_declaration .)
UNSIGNED reduce using rule 1 (translation_unit -> external_declaration .)
$end reduce using rule 1 (translation_unit -> external_declaration .)
state 3
(3) external_declaration -> function_definition .
VOID reduce using rule 3 (external_declaration -> function_definition .)
CHAR reduce using rule 3 (external_declaration -> function_definition .)
SHORT reduce using rule 3 (external_declaration -> function_definition .)
INT reduce using rule 3 (external_declaration -> function_definition .)
LONG reduce using rule 3 (external_declaration -> function_definition .)
FLOAT reduce using rule 3 (external_declaration -> function_definition .)
DOUBLE reduce using rule 3 (external_declaration -> function_definition .)
SIGNED reduce using rule 3 (external_declaration -> function_definition .)
UNSIGNED reduce using rule 3 (external_declaration -> function_definition .)
$end reduce using rule 3 (external_declaration -> function_definition .)
state 4
(4) external_declaration -> declaration .
VOID reduce using rule 4 (external_declaration -> declaration .)
CHAR reduce using rule 4 (external_declaration -> declaration .)
SHORT reduce using rule 4 (external_declaration -> declaration .)
INT reduce using rule 4 (external_declaration -> declaration .)
LONG reduce using rule 4 (external_declaration -> declaration .)
FLOAT reduce using rule 4 (external_declaration -> declaration .)
DOUBLE reduce using rule 4 (external_declaration -> declaration .)
SIGNED reduce using rule 4 (external_declaration -> declaration .)
UNSIGNED reduce using rule 4 (external_declaration -> declaration .)
$end reduce using rule 4 (external_declaration -> declaration .)
state 5
(5) function_definition -> type_specifier . declarator compound_statement
(120) declaration -> type_specifier . init_declarator_list SEMI
(121) declaration -> type_specifier . SEMI
(15) declarator -> . pointer direct_declarator
(16) declarator -> . direct_declarator
(126) init_declarator_list -> . init_declarator
(127) init_declarator_list -> . init_declarator_list COMMA init_declarator
(17) pointer -> . TIMES
(18) pointer -> . TIMES pointer
(19) direct_declarator -> . ID
(20) direct_declarator -> . LPAREN declarator RPAREN
(21) direct_declarator -> . direct_declarator LBRACKET constant_expression RBRACKET
(22) direct_declarator -> . direct_declarator LBRACKET RBRACKET
(23) direct_declarator -> . direct_declarator LPAREN parameter_type_list RPAREN
(24) direct_declarator -> . direct_declarator LPAREN identifier_list RPAREN
(25) direct_declarator -> . direct_declarator LPAREN RPAREN
(124) init_declarator -> . declarator
(125) init_declarator -> . declarator EQUALS initializer
SEMI shift and go to state 18
TIMES shift and go to state 22
ID shift and go to state 23
LPAREN shift and go to state 24
declarator shift and go to state 16
init_declarator_list shift and go to state 17
pointer shift and go to state 19
direct_declarator shift and go to state 20
init_declarator shift and go to state 21
state 6
(6) type_specifier -> VOID .
SEMI reduce using rule 6 (type_specifier -> VOID .)
TIMES reduce using rule 6 (type_specifier -> VOID .)
ID reduce using rule 6 (type_specifier -> VOID .)
LPAREN reduce using rule 6 (type_specifier -> VOID .)
LBRACKET reduce using rule 6 (type_specifier -> VOID .)
COMMA reduce using rule 6 (type_specifier -> VOID .)
RPAREN reduce using rule 6 (type_specifier -> VOID .)
state 7
(7) type_specifier -> CHAR .
SEMI reduce using rule 7 (type_specifier -> CHAR .)
TIMES reduce using rule 7 (type_specifier -> CHAR .)
ID reduce using rule 7 (type_specifier -> CHAR .)
LPAREN reduce using rule 7 (type_specifier -> CHAR .)
LBRACKET reduce using rule 7 (type_specifier -> CHAR .)
COMMA reduce using rule 7 (type_specifier -> CHAR .)
RPAREN reduce using rule 7 (type_specifier -> CHAR .)
state 8
(8) type_specifier -> SHORT .
SEMI reduce using rule 8 (type_specifier -> SHORT .)
TIMES reduce using rule 8 (type_specifier -> SHORT .)
ID reduce using rule 8 (type_specifier -> SHORT .)
LPAREN reduce using rule 8 (type_specifier -> SHORT .)
LBRACKET reduce using rule 8 (type_specifier -> SHORT .)
COMMA reduce using rule 8 (type_specifier -> SHORT .)
RPAREN reduce using rule 8 (type_specifier -> SHORT .)
state 9
(9) type_specifier -> INT .
SEMI reduce using rule 9 (type_specifier -> INT .)
TIMES reduce using rule 9 (type_specifier -> INT .)
ID reduce using rule 9 (type_specifier -> INT .)
LPAREN reduce using rule 9 (type_specifier -> INT .)
LBRACKET reduce using rule 9 (type_specifier -> INT .)
COMMA reduce using rule 9 (type_specifier -> INT .)
RPAREN reduce using rule 9 (type_specifier -> INT .)
state 10
(10) type_specifier -> LONG .
SEMI reduce using rule 10 (type_specifier -> LONG .)
TIMES reduce using rule 10 (type_specifier -> LONG .)
ID reduce using rule 10 (type_specifier -> LONG .)
LPAREN reduce using rule 10 (type_specifier -> LONG .)
LBRACKET reduce using rule 10 (type_specifier -> LONG .)
COMMA reduce using rule 10 (type_specifier -> LONG .)
RPAREN reduce using rule 10 (type_specifier -> LONG .)
state 11
(11) type_specifier -> FLOAT .
SEMI reduce using rule 11 (type_specifier -> FLOAT .)
TIMES reduce using rule 11 (type_specifier -> FLOAT .)
ID reduce using rule 11 (type_specifier -> FLOAT .)
LPAREN reduce using rule 11 (type_specifier -> FLOAT .)
LBRACKET reduce using rule 11 (type_specifier -> FLOAT .)
COMMA reduce using rule 11 (type_specifier -> FLOAT .)
RPAREN reduce using rule 11 (type_specifier -> FLOAT .)
state 12
(12) type_specifier -> DOUBLE .
SEMI reduce using rule 12 (type_specifier -> DOUBLE .)
TIMES reduce using rule 12 (type_specifier -> DOUBLE .)
ID reduce using rule 12 (type_specifier -> DOUBLE .)
LPAREN reduce using rule 12 (type_specifier -> DOUBLE .)
LBRACKET reduce using rule 12 (type_specifier -> DOUBLE .)
COMMA reduce using rule 12 (type_specifier -> DOUBLE .)
RPAREN reduce using rule 12 (type_specifier -> DOUBLE .)
state 13
(13) type_specifier -> SIGNED .
SEMI reduce using rule 13 (type_specifier -> SIGNED .)
TIMES reduce using rule 13 (type_specifier -> SIGNED .)
ID reduce using rule 13 (type_specifier -> SIGNED .)
LPAREN reduce using rule 13 (type_specifier -> SIGNED .)
LBRACKET reduce using rule 13 (type_specifier -> SIGNED .)
COMMA reduce using rule 13 (type_specifier -> SIGNED .)
RPAREN reduce using rule 13 (type_specifier -> SIGNED .)
state 14
(14) type_specifier -> UNSIGNED .
SEMI reduce using rule 14 (type_specifier -> UNSIGNED .)
TIMES reduce using rule 14 (type_specifier -> UNSIGNED .)
ID reduce using rule 14 (type_specifier -> UNSIGNED .)
LPAREN reduce using rule 14 (type_specifier -> UNSIGNED .)
LBRACKET reduce using rule 14 (type_specifier -> UNSIGNED .)
COMMA reduce using rule 14 (type_specifier -> UNSIGNED .)
RPAREN reduce using rule 14 (type_specifier -> UNSIGNED .)
state 15
(2) translation_unit -> translation_unit external_declaration .
VOID reduce using rule 2 (translation_unit -> translation_unit external_declaration .)
CHAR reduce using rule 2 (translation_unit -> translation_unit external_declaration .)
SHORT reduce using rule 2 (translation_unit -> translation_unit external_declaration .)
INT reduce using rule 2 (translation_unit -> translation_unit external_declaration .)
LONG reduce using rule 2 (translation_unit -> translation_unit external_declaration .)
FLOAT reduce using rule 2 (translation_unit -> translation_unit external_declaration .)
DOUBLE reduce using rule 2 (translation_unit -> translation_unit external_declaration .)
SIGNED reduce using rule 2 (translation_unit -> translation_unit external_declaration .)
UNSIGNED reduce using rule 2 (translation_unit -> translation_unit external_declaration .)
$end reduce using rule 2 (translation_unit -> translation_unit external_declaration .)
state 16
(5) function_definition -> type_specifier declarator . compound_statement
(124) init_declarator -> declarator .
(125) init_declarator -> declarator . EQUALS initializer
(133) compound_statement -> . LBRACE declaration_list statement_list RBRACE
(134) compound_statement -> . LBRACE statement_list RBRACE
(135) compound_statement -> . LBRACE declaration_list RBRACE
(136) compound_statement -> . LBRACE RBRACE
SEMI reduce using rule 124 (init_declarator -> declarator .)
COMMA reduce using rule 124 (init_declarator -> declarator .)
EQUALS shift and go to state 26
LBRACE shift and go to state 27
compound_statement shift and go to state 25
state 17
(120) declaration -> type_specifier init_declarator_list . SEMI
(127) init_declarator_list -> init_declarator_list . COMMA init_declarator
SEMI shift and go to state 28
COMMA shift and go to state 29
state 18
(121) declaration -> type_specifier SEMI .
VOID reduce using rule 121 (declaration -> type_specifier SEMI .)
CHAR reduce using rule 121 (declaration -> type_specifier SEMI .)
SHORT reduce using rule 121 (declaration -> type_specifier SEMI .)
INT reduce using rule 121 (declaration -> type_specifier SEMI .)
LONG reduce using rule 121 (declaration -> type_specifier SEMI .)
FLOAT reduce using rule 121 (declaration -> type_specifier SEMI .)
DOUBLE reduce using rule 121 (declaration -> type_specifier SEMI .)
SIGNED reduce using rule 121 (declaration -> type_specifier SEMI .)
UNSIGNED reduce using rule 121 (declaration -> type_specifier SEMI .)
$end reduce using rule 121 (declaration -> type_specifier SEMI .)
RBRACE reduce using rule 121 (declaration -> type_specifier SEMI .)
LBRACE reduce using rule 121 (declaration -> type_specifier SEMI .)
IF reduce using rule 121 (declaration -> type_specifier SEMI .)
WHILE reduce using rule 121 (declaration -> type_specifier SEMI .)
FOR reduce using rule 121 (declaration -> type_specifier SEMI .)
BREAK reduce using rule 121 (declaration -> type_specifier SEMI .)
RETURN reduce using rule 121 (declaration -> type_specifier SEMI .)
PLUSPLUS reduce using rule 121 (declaration -> type_specifier SEMI .)
MINUSMINUS reduce using rule 121 (declaration -> type_specifier SEMI .)
SIZEOF reduce using rule 121 (declaration -> type_specifier SEMI .)
AND reduce using rule 121 (declaration -> type_specifier SEMI .)
TIMES reduce using rule 121 (declaration -> type_specifier SEMI .)
PLUS reduce using rule 121 (declaration -> type_specifier SEMI .)
MINUS reduce using rule 121 (declaration -> type_specifier SEMI .)
NOT reduce using rule 121 (declaration -> type_specifier SEMI .)
LNOT reduce using rule 121 (declaration -> type_specifier SEMI .)
ID reduce using rule 121 (declaration -> type_specifier SEMI .)
SCONST reduce using rule 121 (declaration -> type_specifier SEMI .)
LPAREN reduce using rule 121 (declaration -> type_specifier SEMI .)
ICONST reduce using rule 121 (declaration -> type_specifier SEMI .)
FCONST reduce using rule 121 (declaration -> type_specifier SEMI .)
CCONST reduce using rule 121 (declaration -> type_specifier SEMI .)
state 19
(15) declarator -> pointer . direct_declarator
(19) direct_declarator -> . ID
(20) direct_declarator -> . LPAREN declarator RPAREN
(21) direct_declarator -> . direct_declarator LBRACKET constant_expression RBRACKET
(22) direct_declarator -> . direct_declarator LBRACKET RBRACKET
(23) direct_declarator -> . direct_declarator LPAREN parameter_type_list RPAREN
(24) direct_declarator -> . direct_declarator LPAREN identifier_list RPAREN
(25) direct_declarator -> . direct_declarator LPAREN RPAREN
ID shift and go to state 23
LPAREN shift and go to state 24
direct_declarator shift and go to state 30
state 20
(16) declarator -> direct_declarator .
(21) direct_declarator -> direct_declarator . LBRACKET constant_expression RBRACKET
(22) direct_declarator -> direct_declarator . LBRACKET RBRACKET
(23) direct_declarator -> direct_declarator . LPAREN parameter_type_list RPAREN
(24) direct_declarator -> direct_declarator . LPAREN identifier_list RPAREN
(25) direct_declarator -> direct_declarator . LPAREN RPAREN
EQUALS reduce using rule 16 (declarator -> direct_declarator .)
LBRACE reduce using rule 16 (declarator -> direct_declarator .)
SEMI reduce using rule 16 (declarator -> direct_declarator .)
COMMA reduce using rule 16 (declarator -> direct_declarator .)
RPAREN reduce using rule 16 (declarator -> direct_declarator .)
LBRACKET shift and go to state 31
LPAREN shift and go to state 32
state 21
(126) init_declarator_list -> init_declarator .
SEMI reduce using rule 126 (init_declarator_list -> init_declarator .)
COMMA reduce using rule 126 (init_declarator_list -> init_declarator .)
state 22
(17) pointer -> TIMES .
(18) pointer -> TIMES . pointer
(17) pointer -> . TIMES
(18) pointer -> . TIMES pointer
ID reduce using rule 17 (pointer -> TIMES .)
LPAREN reduce using rule 17 (pointer -> TIMES .)
LBRACKET reduce using rule 17 (pointer -> TIMES .)
COMMA reduce using rule 17 (pointer -> TIMES .)
RPAREN reduce using rule 17 (pointer -> TIMES .)
TIMES shift and go to state 22
pointer shift and go to state 33
state 23
(19) direct_declarator -> ID .
LBRACKET reduce using rule 19 (direct_declarator -> ID .)
LPAREN reduce using rule 19 (direct_declarator -> ID .)
EQUALS reduce using rule 19 (direct_declarator -> ID .)
LBRACE reduce using rule 19 (direct_declarator -> ID .)
SEMI reduce using rule 19 (direct_declarator -> ID .)
COMMA reduce using rule 19 (direct_declarator -> ID .)
RPAREN reduce using rule 19 (direct_declarator -> ID .)
state 24
(20) direct_declarator -> LPAREN . declarator RPAREN
(15) declarator -> . pointer direct_declarator
(16) declarator -> . direct_declarator
(17) pointer -> . TIMES
(18) pointer -> . TIMES pointer
(19) direct_declarator -> . ID
(20) direct_declarator -> . LPAREN declarator RPAREN
(21) direct_declarator -> . direct_declarator LBRACKET constant_expression RBRACKET
(22) direct_declarator -> . direct_declarator LBRACKET RBRACKET
(23) direct_declarator -> . direct_declarator LPAREN parameter_type_list RPAREN
(24) direct_declarator -> . direct_declarator LPAREN identifier_list RPAREN
(25) direct_declarator -> . direct_declarator LPAREN RPAREN
TIMES shift and go to state 22
ID shift and go to state 23
LPAREN shift and go to state 24
declarator shift and go to state 34
pointer shift and go to state 19
direct_declarator shift and go to state 20
state 25
(5) function_definition -> type_specifier declarator compound_statement .
VOID reduce using rule 5 (function_definition -> type_specifier declarator compound_statement .)
CHAR reduce using rule 5 (function_definition -> type_specifier declarator compound_statement .)
SHORT reduce using rule 5 (function_definition -> type_specifier declarator compound_statement .)
INT reduce using rule 5 (function_definition -> type_specifier declarator compound_statement .)
LONG reduce using rule 5 (function_definition -> type_specifier declarator compound_statement .)
FLOAT reduce using rule 5 (function_definition -> type_specifier declarator compound_statement .)
DOUBLE reduce using rule 5 (function_definition -> type_specifier declarator compound_statement .)
SIGNED reduce using rule 5 (function_definition -> type_specifier declarator compound_statement .)
UNSIGNED reduce using rule 5 (function_definition -> type_specifier declarator compound_statement .)
$end reduce using rule 5 (function_definition -> type_specifier declarator compound_statement .)
state 26
(125) init_declarator -> declarator EQUALS . initializer
(128) initializer -> . assignment_expression
(129) initializer -> . LBRACE initializer_list RBRACE
(130) initializer -> . LBRACE initializer_list COMMA RBRACE
(82) assignment_expression -> . conditional_expression
(83) assignment_expression -> . unary_expression assignment_operator assignment_expression
(27) conditional_expression -> . logical_or_expression
(28) conditional_expression -> . logical_or_expression CONDOP expression COLON conditional_expression
(59) unary_expression -> . postfix_expression
(60) unary_expression -> . PLUSPLUS unary_expression
(61) unary_expression -> . MINUSMINUS unary_expression
(62) unary_expression -> . unary_operator cast_expression
(63) unary_expression -> . SIZEOF unary_expression
(64) unary_expression -> . SIZEOF LPAREN type_name RPAREN
(29) logical_or_expression -> . logical_and_expression
(30) logical_or_expression -> . logical_or_expression LOR logical_and_expression
(65) postfix_expression -> . primary_expression
(66) postfix_expression -> . postfix_expression LBRACKET expression RBRACKET
(67) postfix_expression -> . postfix_expression LPAREN argument_expression_list RPAREN
(68) postfix_expression -> . postfix_expression LPAREN RPAREN
(69) postfix_expression -> . postfix_expression PERIOD ID
(70) postfix_expression -> . postfix_expression ARROW ID
(71) postfix_expression -> . postfix_expression PLUSPLUS
(72) postfix_expression -> . postfix_expression MINUSMINUS
(95) unary_operator -> . AND
(96) unary_operator -> . TIMES
(97) unary_operator -> . PLUS
(98) unary_operator -> . MINUS
(99) unary_operator -> . NOT
(100) unary_operator -> . LNOT
(31) logical_and_expression -> . inclusive_or_expression
(32) logical_and_expression -> . logical_and_expression LAND inclusive_or_expression
(73) primary_expression -> . ID
(74) primary_expression -> . constant
(75) primary_expression -> . SCONST
(76) primary_expression -> . LPAREN expression RPAREN
(33) inclusive_or_expression -> . exclusive_or_expression
(34) inclusive_or_expression -> . inclusive_or_expression OR exclusive_or_expression
(77) constant -> . ICONST
(78) constant -> . FCONST
(79) constant -> . CCONST
(35) exclusive_or_expression -> . and_expression
(36) exclusive_or_expression -> . exclusive_or_expression XOR and_expression
(37) and_expression -> . equality_expression
(38) and_expression -> . and_expression AND equality_expression
(39) equality_expression -> . relational_expression
(40) equality_expression -> . equality_expression EQ relational_expression
(41) equality_expression -> . equality_expression NE relational_expression
(42) relational_expression -> . shift_expression
(43) relational_expression -> . relational_expression LT shift_expression
(44) relational_expression -> . relational_expression GT shift_expression
(45) relational_expression -> . relational_expression LE shift_expression
(46) relational_expression -> . relational_expression GE shift_expression
(47) shift_expression -> . additive_expression
(48) shift_expression -> . shift_expression LSHIFT additive_expression
(49) shift_expression -> . shift_expression RSHIFT additive_expression
(50) additive_expression -> . multiplicative_expression
(51) additive_expression -> . additive_expression PLUS multiplicative_expression
(52) additive_expression -> . additive_expression MINUS multiplicative_expression
(53) multiplicative_expression -> . cast_expression
(54) multiplicative_expression -> . multiplicative_expression TIMES cast_expression
(55) multiplicative_expression -> . multiplicative_expression DIVIDE cast_expression
(56) multiplicative_expression -> . multiplicative_expression MOD cast_expression
(57) cast_expression -> . unary_expression
(58) cast_expression -> . LPAREN type_name RPAREN cast_expression
LBRACE shift and go to state 37
PLUSPLUS shift and go to state 42
MINUSMINUS shift and go to state 43
SIZEOF shift and go to state 46
AND shift and go to state 51
TIMES shift and go to state 52
PLUS shift and go to state 53
MINUS shift and go to state 54
NOT shift and go to state 55
LNOT shift and go to state 56
ID shift and go to state 50
SCONST shift and go to state 59
LPAREN shift and go to state 47
ICONST shift and go to state 61
FCONST shift and go to state 62
CCONST shift and go to state 63
initializer shift and go to state 35
assignment_expression shift and go to state 36
conditional_expression shift and go to state 38
unary_expression shift and go to state 39
logical_or_expression shift and go to state 40
postfix_expression shift and go to state 41
unary_operator shift and go to state 44
cast_expression shift and go to state 45
logical_and_expression shift and go to state 48
primary_expression shift and go to state 49
inclusive_or_expression shift and go to state 57
constant shift and go to state 58
exclusive_or_expression shift and go to state 60
and_expression shift and go to state 64
equality_expression shift and go to state 65
relational_expression shift and go to state 66
shift_expression shift and go to state 67
additive_expression shift and go to state 68
multiplicative_expression shift and go to state 69
state 27
(133) compound_statement -> LBRACE . declaration_list statement_list RBRACE
(134) compound_statement -> LBRACE . statement_list RBRACE
(135) compound_statement -> LBRACE . declaration_list RBRACE
(136) compound_statement -> LBRACE . RBRACE
(122) declaration_list -> . declaration
(123) declaration_list -> . declaration_list declaration
(142) statement_list -> . statement
(143) statement_list -> . statement_list statement
(120) declaration -> . type_specifier init_declarator_list SEMI
(121) declaration -> . type_specifier SEMI
(137) statement -> . expression_statement
(138) statement -> . compound_statement
(139) statement -> . selection_statement
(140) statement -> . iteration_statement
(141) statement -> . jump_statement
(6) type_specifier -> . VOID
(7) type_specifier -> . CHAR
(8) type_specifier -> . SHORT
(9) type_specifier -> . INT
(10) type_specifier -> . LONG
(11) type_specifier -> . FLOAT
(12) type_specifier -> . DOUBLE
(13) type_specifier -> . SIGNED
(14) type_specifier -> . UNSIGNED
(144) expression_statement -> . expression SEMI
(133) compound_statement -> . LBRACE declaration_list statement_list RBRACE
(134) compound_statement -> . LBRACE statement_list RBRACE
(135) compound_statement -> . LBRACE declaration_list RBRACE
(136) compound_statement -> . LBRACE RBRACE
(145) selection_statement -> . IF LPAREN expression RPAREN statement
(146) selection_statement -> . IF LPAREN expression RPAREN statement ELSE statement
(147) iteration_statement -> . WHILE LPAREN expression RPAREN statement
(148) iteration_statement -> . FOR LPAREN expression SEMI expression SEMI expression RPAREN statement
(149) jump_statement -> . BREAK SEMI
(150) jump_statement -> . RETURN expression SEMI
(151) jump_statement -> . RETURN SEMI
(80) expression -> . assignment_expression
(81) expression -> . expression COMMA assignment_expression
(82) assignment_expression -> . conditional_expression
(83) assignment_expression -> . unary_expression assignment_operator assignment_expression
(27) conditional_expression -> . logical_or_expression
(28) conditional_expression -> . logical_or_expression CONDOP expression COLON conditional_expression
(59) unary_expression -> . postfix_expression
(60) unary_expression -> . PLUSPLUS unary_expression
(61) unary_expression -> . MINUSMINUS unary_expression
(62) unary_expression -> . unary_operator cast_expression
(63) unary_expression -> . SIZEOF unary_expression
(64) unary_expression -> . SIZEOF LPAREN type_name RPAREN
(29) logical_or_expression -> . logical_and_expression
(30) logical_or_expression -> . logical_or_expression LOR logical_and_expression
(65) postfix_expression -> . primary_expression
(66) postfix_expression -> . postfix_expression LBRACKET expression RBRACKET
(67) postfix_expression -> . postfix_expression LPAREN argument_expression_list RPAREN
(68) postfix_expression -> . postfix_expression LPAREN RPAREN
(69) postfix_expression -> . postfix_expression PERIOD ID
(70) postfix_expression -> . postfix_expression ARROW ID
(71) postfix_expression -> . postfix_expression PLUSPLUS
(72) postfix_expression -> . postfix_expression MINUSMINUS
(95) unary_operator -> . AND
(96) unary_operator -> . TIMES
(97) unary_operator -> . PLUS
(98) unary_operator -> . MINUS
(99) unary_operator -> . NOT
(100) unary_operator -> . LNOT
(31) logical_and_expression -> . inclusive_or_expression
(32) logical_and_expression -> . logical_and_expression LAND inclusive_or_expression
(73) primary_expression -> . ID
(74) primary_expression -> . constant
(75) primary_expression -> . SCONST
(76) primary_expression -> . LPAREN expression RPAREN
(33) inclusive_or_expression -> . exclusive_or_expression
(34) inclusive_or_expression -> . inclusive_or_expression OR exclusive_or_expression
(77) constant -> . ICONST
(78) constant -> . FCONST
(79) constant -> . CCONST
(35) exclusive_or_expression -> . and_expression
(36) exclusive_or_expression -> . exclusive_or_expression XOR and_expression
(37) and_expression -> . equality_expression
(38) and_expression -> . and_expression AND equality_expression
(39) equality_expression -> . relational_expression
(40) equality_expression -> . equality_expression EQ relational_expression
(41) equality_expression -> . equality_expression NE relational_expression
(42) relational_expression -> . shift_expression
(43) relational_expression -> . relational_expression LT shift_expression
(44) relational_expression -> . relational_expression GT shift_expression
(45) relational_expression -> . relational_expression LE shift_expression
(46) relational_expression -> . relational_expression GE shift_expression
(47) shift_expression -> . additive_expression
(48) shift_expression -> . shift_expression LSHIFT additive_expression
(49) shift_expression -> . shift_expression RSHIFT additive_expression
(50) additive_expression -> . multiplicative_expression
(51) additive_expression -> . additive_expression PLUS multiplicative_expression
(52) additive_expression -> . additive_expression MINUS multiplicative_expression
(53) multiplicative_expression -> . cast_expression
(54) multiplicative_expression -> . multiplicative_expression TIMES cast_expression
(55) multiplicative_expression -> . multiplicative_expression DIVIDE cast_expression
(56) multiplicative_expression -> . multiplicative_expression MOD cast_expression
(57) cast_expression -> . unary_expression
(58) cast_expression -> . LPAREN type_name RPAREN cast_expression
RBRACE shift and go to state 72
VOID shift and go to state 6
CHAR shift and go to state 7
SHORT shift and go to state 8
INT shift and go to state 9
LONG shift and go to state 10
FLOAT shift and go to state 11
DOUBLE shift and go to state 12
SIGNED shift and go to state 13
UNSIGNED shift and go to state 14
LBRACE shift and go to state 27
IF shift and go to state 82
WHILE shift and go to state 83
FOR shift and go to state 84
BREAK shift and go to state 85
RETURN shift and go to state 86
PLUSPLUS shift and go to state 42
MINUSMINUS shift and go to state 43
SIZEOF shift and go to state 46
AND shift and go to state 51
TIMES shift and go to state 52
PLUS shift and go to state 53
MINUS shift and go to state 54
NOT shift and go to state 55
LNOT shift and go to state 56
ID shift and go to state 50
SCONST shift and go to state 59
LPAREN shift and go to state 47
ICONST shift and go to state 61
FCONST shift and go to state 62
CCONST shift and go to state 63
declaration_list shift and go to state 70
statement_list shift and go to state 71
declaration shift and go to state 73
statement shift and go to state 74
type_specifier shift and go to state 75
expression_statement shift and go to state 76
compound_statement shift and go to state 77
selection_statement shift and go to state 78
iteration_statement shift and go to state 79
jump_statement shift and go to state 80
expression shift and go to state 81
assignment_expression shift and go to state 87
conditional_expression shift and go to state 38
unary_expression shift and go to state 39
logical_or_expression shift and go to state 40
postfix_expression shift and go to state 41