-
Notifications
You must be signed in to change notification settings - Fork 0
/
parser.out
6322 lines (5478 loc) · 264 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.8 (http://www.dabeaz.com/ply)
Grammar
Rule 0 S' -> pgm
Rule 1 pgm -> class_decl_list
Rule 2 class_decl_list -> class_decl class_decl_list
Rule 3 class_decl_list -> <empty>
Rule 4 class_decl -> class_decl_head LBRACE class_body_decl_list RBRACE
Rule 5 class_decl -> class_decl_head LBRACE error RBRACE
Rule 6 class_decl_head -> CLASS ID extends
Rule 7 extends -> EXTENDS ID
Rule 8 extends -> <empty>
Rule 9 class_body_decl_list -> class_body_decl_list class_body_decl
Rule 10 class_body_decl_list -> class_body_decl
Rule 11 class_body_decl -> field_decl
Rule 12 class_body_decl -> method_decl
Rule 13 class_body_decl -> constructor_decl
Rule 14 field_decl -> mod var_decl
Rule 15 method_decl -> method_header LPAREN param_list_opt RPAREN block
Rule 16 method_header -> mod VOID ID
Rule 17 method_header -> mod type ID
Rule 18 constructor_decl -> constructor_header LPAREN param_list_opt RPAREN block
Rule 19 constructor_header -> mod ID
Rule 20 mod -> visibility_mod storage_mod
Rule 21 visibility_mod -> PUBLIC
Rule 22 visibility_mod -> PRIVATE
Rule 23 visibility_mod -> <empty>
Rule 24 storage_mod -> STATIC
Rule 25 storage_mod -> <empty>
Rule 26 var_decl -> type var_list SEMICOLON
Rule 27 type -> INT
Rule 28 type -> BOOLEAN
Rule 29 type -> FLOAT
Rule 30 type -> ID
Rule 31 var_list -> var_list COMMA var
Rule 32 var_list -> var
Rule 33 var -> ID dim_star
Rule 34 param_list_opt -> params_begin param_list params_end
Rule 35 param_list_opt -> params_end
Rule 36 param_list -> param_list COMMA param
Rule 37 param_list -> param
Rule 38 param -> type var
Rule 39 params_begin -> <empty>
Rule 40 params_end -> <empty>
Rule 41 block -> LBRACE block_begin stmt_list block_end RBRACE
Rule 42 block -> LBRACE block_begin stmt_list error block_end RBRACE
Rule 43 block_begin -> <empty>
Rule 44 block_end -> <empty>
Rule 45 stmt_list -> <empty>
Rule 46 stmt_list -> stmt_list stmt
Rule 47 stmt -> IF LPAREN expr RPAREN stmt ELSE stmt
Rule 48 stmt -> IF LPAREN expr RPAREN stmt
Rule 49 stmt -> WHILE LPAREN expr RPAREN stmt
Rule 50 stmt -> FOR LPAREN stmt_expr_opt SEMICOLON expr_opt SEMICOLON stmt_expr_opt RPAREN stmt
Rule 51 stmt -> RETURN expr_opt SEMICOLON
Rule 52 stmt -> stmt_expr SEMICOLON
Rule 53 stmt -> BREAK SEMICOLON
Rule 54 stmt -> CONTINUE SEMICOLON
Rule 55 stmt -> block
Rule 56 stmt -> var_decl
Rule 57 stmt -> SEMICOLON
Rule 58 stmt -> error SEMICOLON
Rule 59 literal -> INT_CONST
Rule 60 literal -> FLOAT_CONST
Rule 61 literal -> STRING_CONST
Rule 62 literal -> NULL
Rule 63 literal -> TRUE
Rule 64 literal -> FALSE
Rule 65 primary -> literal
Rule 66 primary -> THIS
Rule 67 primary -> SUPER
Rule 68 primary -> LPAREN expr RPAREN
Rule 69 primary -> NEW ID LPAREN args_opt RPAREN
Rule 70 primary -> lhs
Rule 71 primary -> method_invocation
Rule 72 args_opt -> arg_plus
Rule 73 args_opt -> <empty>
Rule 74 arg_plus -> arg_plus COMMA expr
Rule 75 arg_plus -> expr
Rule 76 lhs -> field_access
Rule 77 lhs -> array_access
Rule 78 field_access -> primary DOT ID
Rule 79 field_access -> ID
Rule 80 array_access -> primary LBRACKET expr RBRACKET
Rule 81 method_invocation -> field_access LPAREN args_opt RPAREN
Rule 82 expr -> primary
Rule 83 expr -> assign
Rule 84 expr -> new_array
Rule 85 expr -> expr PLUS expr
Rule 86 expr -> expr MINUS expr
Rule 87 expr -> expr MULTIPLY expr
Rule 88 expr -> expr DIVIDE expr
Rule 89 expr -> expr EQ expr
Rule 90 expr -> expr NEQ expr
Rule 91 expr -> expr LT expr
Rule 92 expr -> expr LEQ expr
Rule 93 expr -> expr GT expr
Rule 94 expr -> expr GEQ expr
Rule 95 expr -> expr AND expr
Rule 96 expr -> expr OR expr
Rule 97 expr -> PLUS expr
Rule 98 expr -> MINUS expr
Rule 99 expr -> NOT expr
Rule 100 assign -> lhs ASSIGN expr
Rule 101 assign -> lhs INC
Rule 102 assign -> INC lhs
Rule 103 assign -> lhs DEC
Rule 104 assign -> DEC lhs
Rule 105 new_array -> NEW type dim_expr_plus dim_star
Rule 106 dim_expr_plus -> dim_expr_plus dim_expr
Rule 107 dim_expr_plus -> dim_expr
Rule 108 dim_expr -> LBRACKET expr RBRACKET
Rule 109 dim_star -> LBRACKET RBRACKET dim_star
Rule 110 dim_star -> <empty>
Rule 111 stmt_expr -> assign
Rule 112 stmt_expr -> method_invocation
Rule 113 stmt_expr_opt -> stmt_expr
Rule 114 stmt_expr_opt -> <empty>
Rule 115 expr_opt -> expr
Rule 116 expr_opt -> <empty>
Terminals, with rules where they appear
AND : 95
ASSIGN : 100
BOOLEAN : 28
BREAK : 53
CLASS : 6
COMMA : 31 36 74
CONTINUE : 54
DEC : 103 104
DIVIDE : 88
DOT : 78
ELSE : 47
EQ : 89
EXTENDS : 7
FALSE : 64
FLOAT : 29
FLOAT_CONST : 60
FOR : 50
GEQ : 94
GT : 93
ID : 6 7 16 17 19 30 33 69 78 79
IF : 47 48
INC : 101 102
INT : 27
INT_CONST : 59
LBRACE : 4 5 41 42
LBRACKET : 80 108 109
LEQ : 92
LPAREN : 15 18 47 48 49 50 68 69 81
LT : 91
MINUS : 86 98
MULTIPLY : 87
NEQ : 90
NEW : 69 105
NOT : 99
NULL : 62
OR : 96
PLUS : 85 97
PRIVATE : 22
PUBLIC : 21
RBRACE : 4 5 41 42
RBRACKET : 80 108 109
RETURN : 51
RPAREN : 15 18 47 48 49 50 68 69 81
SEMICOLON : 26 50 50 51 52 53 54 57 58
STATIC : 24
STRING_CONST : 61
SUPER : 67
THIS : 66
TRUE : 63
VOID : 16
WHILE : 49
error : 5 42 58
Nonterminals, with rules where they appear
arg_plus : 72 74
args_opt : 69 81
array_access : 77
assign : 83 111
block : 15 18 55
block_begin : 41 42
block_end : 41 42
class_body_decl : 9 10
class_body_decl_list : 4 9
class_decl : 2
class_decl_head : 4 5
class_decl_list : 1 2
constructor_decl : 13
constructor_header : 18
dim_expr : 106 107
dim_expr_plus : 105 106
dim_star : 33 105 109
expr : 47 48 49 68 74 75 80 85 85 86 86 87 87 88 88 89 89 90 90 91 91 92 92 93 93 94 94 95 95 96 96 97 98 99 100 108 115
expr_opt : 50 51
extends : 6
field_access : 76 81
field_decl : 11
lhs : 70 100 101 102 103 104
literal : 65
method_decl : 12
method_header : 15
method_invocation : 71 112
mod : 14 16 17 19
new_array : 84
param : 36 37
param_list : 34 36
param_list_opt : 15 18
params_begin : 34
params_end : 34 35
pgm : 0
primary : 78 80 82
stmt : 46 47 47 48 49 50
stmt_expr : 52 113
stmt_expr_opt : 50 50
stmt_list : 41 42 46
storage_mod : 20
type : 17 26 38 105
var : 31 32 38
var_decl : 14 56
var_list : 26 31
visibility_mod : 20
Parsing method: LALR
state 0
(0) S' -> . pgm
(1) pgm -> . class_decl_list
(2) class_decl_list -> . class_decl class_decl_list
(3) class_decl_list -> .
(4) class_decl -> . class_decl_head LBRACE class_body_decl_list RBRACE
(5) class_decl -> . class_decl_head LBRACE error RBRACE
(6) class_decl_head -> . CLASS ID extends
$end reduce using rule 3 (class_decl_list -> .)
CLASS shift and go to state 1
pgm shift and go to state 2
class_decl_head shift and go to state 3
class_decl shift and go to state 4
class_decl_list shift and go to state 5
state 1
(6) class_decl_head -> CLASS . ID extends
ID shift and go to state 6
state 2
(0) S' -> pgm .
state 3
(4) class_decl -> class_decl_head . LBRACE class_body_decl_list RBRACE
(5) class_decl -> class_decl_head . LBRACE error RBRACE
LBRACE shift and go to state 7
state 4
(2) class_decl_list -> class_decl . class_decl_list
(2) class_decl_list -> . class_decl class_decl_list
(3) class_decl_list -> .
(4) class_decl -> . class_decl_head LBRACE class_body_decl_list RBRACE
(5) class_decl -> . class_decl_head LBRACE error RBRACE
(6) class_decl_head -> . CLASS ID extends
$end reduce using rule 3 (class_decl_list -> .)
CLASS shift and go to state 1
class_decl_list shift and go to state 8
class_decl shift and go to state 4
class_decl_head shift and go to state 3
state 5
(1) pgm -> class_decl_list .
$end reduce using rule 1 (pgm -> class_decl_list .)
state 6
(6) class_decl_head -> CLASS ID . extends
(7) extends -> . EXTENDS ID
(8) extends -> .
EXTENDS shift and go to state 9
LBRACE reduce using rule 8 (extends -> .)
extends shift and go to state 10
state 7
(4) class_decl -> class_decl_head LBRACE . class_body_decl_list RBRACE
(5) class_decl -> class_decl_head LBRACE . error RBRACE
(9) class_body_decl_list -> . class_body_decl_list class_body_decl
(10) class_body_decl_list -> . class_body_decl
(11) class_body_decl -> . field_decl
(12) class_body_decl -> . method_decl
(13) class_body_decl -> . constructor_decl
(14) field_decl -> . mod var_decl
(15) method_decl -> . method_header LPAREN param_list_opt RPAREN block
(18) constructor_decl -> . constructor_header LPAREN param_list_opt RPAREN block
(20) mod -> . visibility_mod storage_mod
(16) method_header -> . mod VOID ID
(17) method_header -> . mod type ID
(19) constructor_header -> . mod ID
(21) visibility_mod -> . PUBLIC
(22) visibility_mod -> . PRIVATE
(23) visibility_mod -> .
error shift and go to state 21
PUBLIC shift and go to state 22
PRIVATE shift and go to state 11
STATIC reduce using rule 23 (visibility_mod -> .)
VOID reduce using rule 23 (visibility_mod -> .)
ID reduce using rule 23 (visibility_mod -> .)
INT reduce using rule 23 (visibility_mod -> .)
BOOLEAN reduce using rule 23 (visibility_mod -> .)
FLOAT reduce using rule 23 (visibility_mod -> .)
class_body_decl shift and go to state 15
field_decl shift and go to state 18
constructor_decl shift and go to state 12
method_header shift and go to state 19
method_decl shift and go to state 20
visibility_mod shift and go to state 16
constructor_header shift and go to state 13
class_body_decl_list shift and go to state 14
mod shift and go to state 17
state 8
(2) class_decl_list -> class_decl class_decl_list .
$end reduce using rule 2 (class_decl_list -> class_decl class_decl_list .)
state 9
(7) extends -> EXTENDS . ID
ID shift and go to state 23
state 10
(6) class_decl_head -> CLASS ID extends .
LBRACE reduce using rule 6 (class_decl_head -> CLASS ID extends .)
state 11
(22) visibility_mod -> PRIVATE .
STATIC reduce using rule 22 (visibility_mod -> PRIVATE .)
VOID reduce using rule 22 (visibility_mod -> PRIVATE .)
ID reduce using rule 22 (visibility_mod -> PRIVATE .)
INT reduce using rule 22 (visibility_mod -> PRIVATE .)
BOOLEAN reduce using rule 22 (visibility_mod -> PRIVATE .)
FLOAT reduce using rule 22 (visibility_mod -> PRIVATE .)
state 12
(13) class_body_decl -> constructor_decl .
RBRACE reduce using rule 13 (class_body_decl -> constructor_decl .)
PUBLIC reduce using rule 13 (class_body_decl -> constructor_decl .)
PRIVATE reduce using rule 13 (class_body_decl -> constructor_decl .)
VOID reduce using rule 13 (class_body_decl -> constructor_decl .)
ID reduce using rule 13 (class_body_decl -> constructor_decl .)
INT reduce using rule 13 (class_body_decl -> constructor_decl .)
BOOLEAN reduce using rule 13 (class_body_decl -> constructor_decl .)
FLOAT reduce using rule 13 (class_body_decl -> constructor_decl .)
STATIC reduce using rule 13 (class_body_decl -> constructor_decl .)
state 13
(18) constructor_decl -> constructor_header . LPAREN param_list_opt RPAREN block
LPAREN shift and go to state 24
state 14
(4) class_decl -> class_decl_head LBRACE class_body_decl_list . RBRACE
(9) class_body_decl_list -> class_body_decl_list . class_body_decl
(11) class_body_decl -> . field_decl
(12) class_body_decl -> . method_decl
(13) class_body_decl -> . constructor_decl
(14) field_decl -> . mod var_decl
(15) method_decl -> . method_header LPAREN param_list_opt RPAREN block
(18) constructor_decl -> . constructor_header LPAREN param_list_opt RPAREN block
(20) mod -> . visibility_mod storage_mod
(16) method_header -> . mod VOID ID
(17) method_header -> . mod type ID
(19) constructor_header -> . mod ID
(21) visibility_mod -> . PUBLIC
(22) visibility_mod -> . PRIVATE
(23) visibility_mod -> .
RBRACE shift and go to state 26
PUBLIC shift and go to state 22
PRIVATE shift and go to state 11
STATIC reduce using rule 23 (visibility_mod -> .)
VOID reduce using rule 23 (visibility_mod -> .)
ID reduce using rule 23 (visibility_mod -> .)
INT reduce using rule 23 (visibility_mod -> .)
BOOLEAN reduce using rule 23 (visibility_mod -> .)
FLOAT reduce using rule 23 (visibility_mod -> .)
class_body_decl shift and go to state 25
field_decl shift and go to state 18
constructor_decl shift and go to state 12
method_header shift and go to state 19
method_decl shift and go to state 20
visibility_mod shift and go to state 16
constructor_header shift and go to state 13
mod shift and go to state 17
state 15
(10) class_body_decl_list -> class_body_decl .
RBRACE reduce using rule 10 (class_body_decl_list -> class_body_decl .)
PUBLIC reduce using rule 10 (class_body_decl_list -> class_body_decl .)
PRIVATE reduce using rule 10 (class_body_decl_list -> class_body_decl .)
VOID reduce using rule 10 (class_body_decl_list -> class_body_decl .)
ID reduce using rule 10 (class_body_decl_list -> class_body_decl .)
INT reduce using rule 10 (class_body_decl_list -> class_body_decl .)
BOOLEAN reduce using rule 10 (class_body_decl_list -> class_body_decl .)
FLOAT reduce using rule 10 (class_body_decl_list -> class_body_decl .)
STATIC reduce using rule 10 (class_body_decl_list -> class_body_decl .)
state 16
(20) mod -> visibility_mod . storage_mod
(24) storage_mod -> . STATIC
(25) storage_mod -> .
STATIC shift and go to state 28
VOID reduce using rule 25 (storage_mod -> .)
ID reduce using rule 25 (storage_mod -> .)
INT reduce using rule 25 (storage_mod -> .)
BOOLEAN reduce using rule 25 (storage_mod -> .)
FLOAT reduce using rule 25 (storage_mod -> .)
storage_mod shift and go to state 27
state 17
(14) field_decl -> mod . var_decl
(16) method_header -> mod . VOID ID
(17) method_header -> mod . type ID
(19) constructor_header -> mod . ID
(26) var_decl -> . type var_list SEMICOLON
(27) type -> . INT
(28) type -> . BOOLEAN
(29) type -> . FLOAT
(30) type -> . ID
VOID shift and go to state 30
ID shift and go to state 35
INT shift and go to state 29
BOOLEAN shift and go to state 33
FLOAT shift and go to state 31
type shift and go to state 34
var_decl shift and go to state 32
state 18
(11) class_body_decl -> field_decl .
RBRACE reduce using rule 11 (class_body_decl -> field_decl .)
PUBLIC reduce using rule 11 (class_body_decl -> field_decl .)
PRIVATE reduce using rule 11 (class_body_decl -> field_decl .)
VOID reduce using rule 11 (class_body_decl -> field_decl .)
ID reduce using rule 11 (class_body_decl -> field_decl .)
INT reduce using rule 11 (class_body_decl -> field_decl .)
BOOLEAN reduce using rule 11 (class_body_decl -> field_decl .)
FLOAT reduce using rule 11 (class_body_decl -> field_decl .)
STATIC reduce using rule 11 (class_body_decl -> field_decl .)
state 19
(15) method_decl -> method_header . LPAREN param_list_opt RPAREN block
LPAREN shift and go to state 36
state 20
(12) class_body_decl -> method_decl .
RBRACE reduce using rule 12 (class_body_decl -> method_decl .)
PUBLIC reduce using rule 12 (class_body_decl -> method_decl .)
PRIVATE reduce using rule 12 (class_body_decl -> method_decl .)
VOID reduce using rule 12 (class_body_decl -> method_decl .)
ID reduce using rule 12 (class_body_decl -> method_decl .)
INT reduce using rule 12 (class_body_decl -> method_decl .)
BOOLEAN reduce using rule 12 (class_body_decl -> method_decl .)
FLOAT reduce using rule 12 (class_body_decl -> method_decl .)
STATIC reduce using rule 12 (class_body_decl -> method_decl .)
state 21
(5) class_decl -> class_decl_head LBRACE error . RBRACE
RBRACE shift and go to state 37
state 22
(21) visibility_mod -> PUBLIC .
STATIC reduce using rule 21 (visibility_mod -> PUBLIC .)
VOID reduce using rule 21 (visibility_mod -> PUBLIC .)
ID reduce using rule 21 (visibility_mod -> PUBLIC .)
INT reduce using rule 21 (visibility_mod -> PUBLIC .)
BOOLEAN reduce using rule 21 (visibility_mod -> PUBLIC .)
FLOAT reduce using rule 21 (visibility_mod -> PUBLIC .)
state 23
(7) extends -> EXTENDS ID .
LBRACE reduce using rule 7 (extends -> EXTENDS ID .)
state 24
(18) constructor_decl -> constructor_header LPAREN . param_list_opt RPAREN block
(34) param_list_opt -> . params_begin param_list params_end
(35) param_list_opt -> . params_end
(39) params_begin -> .
(40) params_end -> .
INT reduce using rule 39 (params_begin -> .)
BOOLEAN reduce using rule 39 (params_begin -> .)
FLOAT reduce using rule 39 (params_begin -> .)
ID reduce using rule 39 (params_begin -> .)
RPAREN reduce using rule 40 (params_end -> .)
params_begin shift and go to state 38
param_list_opt shift and go to state 40
params_end shift and go to state 39
state 25
(9) class_body_decl_list -> class_body_decl_list class_body_decl .
RBRACE reduce using rule 9 (class_body_decl_list -> class_body_decl_list class_body_decl .)
PUBLIC reduce using rule 9 (class_body_decl_list -> class_body_decl_list class_body_decl .)
PRIVATE reduce using rule 9 (class_body_decl_list -> class_body_decl_list class_body_decl .)
VOID reduce using rule 9 (class_body_decl_list -> class_body_decl_list class_body_decl .)
ID reduce using rule 9 (class_body_decl_list -> class_body_decl_list class_body_decl .)
INT reduce using rule 9 (class_body_decl_list -> class_body_decl_list class_body_decl .)
BOOLEAN reduce using rule 9 (class_body_decl_list -> class_body_decl_list class_body_decl .)
FLOAT reduce using rule 9 (class_body_decl_list -> class_body_decl_list class_body_decl .)
STATIC reduce using rule 9 (class_body_decl_list -> class_body_decl_list class_body_decl .)
state 26
(4) class_decl -> class_decl_head LBRACE class_body_decl_list RBRACE .
CLASS reduce using rule 4 (class_decl -> class_decl_head LBRACE class_body_decl_list RBRACE .)
$end reduce using rule 4 (class_decl -> class_decl_head LBRACE class_body_decl_list RBRACE .)
state 27
(20) mod -> visibility_mod storage_mod .
VOID reduce using rule 20 (mod -> visibility_mod storage_mod .)
ID reduce using rule 20 (mod -> visibility_mod storage_mod .)
INT reduce using rule 20 (mod -> visibility_mod storage_mod .)
BOOLEAN reduce using rule 20 (mod -> visibility_mod storage_mod .)
FLOAT reduce using rule 20 (mod -> visibility_mod storage_mod .)
state 28
(24) storage_mod -> STATIC .
VOID reduce using rule 24 (storage_mod -> STATIC .)
ID reduce using rule 24 (storage_mod -> STATIC .)
INT reduce using rule 24 (storage_mod -> STATIC .)
BOOLEAN reduce using rule 24 (storage_mod -> STATIC .)
FLOAT reduce using rule 24 (storage_mod -> STATIC .)
state 29
(27) type -> INT .
ID reduce using rule 27 (type -> INT .)
LBRACKET reduce using rule 27 (type -> INT .)
state 30
(16) method_header -> mod VOID . ID
ID shift and go to state 41
state 31
(29) type -> FLOAT .
ID reduce using rule 29 (type -> FLOAT .)
LBRACKET reduce using rule 29 (type -> FLOAT .)
state 32
(14) field_decl -> mod var_decl .
RBRACE reduce using rule 14 (field_decl -> mod var_decl .)
PUBLIC reduce using rule 14 (field_decl -> mod var_decl .)
PRIVATE reduce using rule 14 (field_decl -> mod var_decl .)
VOID reduce using rule 14 (field_decl -> mod var_decl .)
ID reduce using rule 14 (field_decl -> mod var_decl .)
INT reduce using rule 14 (field_decl -> mod var_decl .)
BOOLEAN reduce using rule 14 (field_decl -> mod var_decl .)
FLOAT reduce using rule 14 (field_decl -> mod var_decl .)
STATIC reduce using rule 14 (field_decl -> mod var_decl .)
state 33
(28) type -> BOOLEAN .
ID reduce using rule 28 (type -> BOOLEAN .)
LBRACKET reduce using rule 28 (type -> BOOLEAN .)
state 34
(17) method_header -> mod type . ID
(26) var_decl -> type . var_list SEMICOLON
(31) var_list -> . var_list COMMA var
(32) var_list -> . var
(33) var -> . ID dim_star
ID shift and go to state 44
var shift and go to state 42
var_list shift and go to state 43
state 35
(19) constructor_header -> mod ID .
(30) type -> ID .
LPAREN reduce using rule 19 (constructor_header -> mod ID .)
ID reduce using rule 30 (type -> ID .)
state 36
(15) method_decl -> method_header LPAREN . param_list_opt RPAREN block
(34) param_list_opt -> . params_begin param_list params_end
(35) param_list_opt -> . params_end
(39) params_begin -> .
(40) params_end -> .
INT reduce using rule 39 (params_begin -> .)
BOOLEAN reduce using rule 39 (params_begin -> .)
FLOAT reduce using rule 39 (params_begin -> .)
ID reduce using rule 39 (params_begin -> .)
RPAREN reduce using rule 40 (params_end -> .)
params_begin shift and go to state 38
param_list_opt shift and go to state 45
params_end shift and go to state 39
state 37
(5) class_decl -> class_decl_head LBRACE error RBRACE .
CLASS reduce using rule 5 (class_decl -> class_decl_head LBRACE error RBRACE .)
$end reduce using rule 5 (class_decl -> class_decl_head LBRACE error RBRACE .)
state 38
(34) param_list_opt -> params_begin . param_list params_end
(36) param_list -> . param_list COMMA param
(37) param_list -> . param
(38) param -> . type var
(27) type -> . INT
(28) type -> . BOOLEAN
(29) type -> . FLOAT
(30) type -> . ID
INT shift and go to state 29
BOOLEAN shift and go to state 33
FLOAT shift and go to state 31
ID shift and go to state 47
param shift and go to state 46
param_list shift and go to state 48
type shift and go to state 49
state 39
(35) param_list_opt -> params_end .
RPAREN reduce using rule 35 (param_list_opt -> params_end .)
state 40
(18) constructor_decl -> constructor_header LPAREN param_list_opt . RPAREN block
RPAREN shift and go to state 50
state 41
(16) method_header -> mod VOID ID .
LPAREN reduce using rule 16 (method_header -> mod VOID ID .)
state 42
(32) var_list -> var .
SEMICOLON reduce using rule 32 (var_list -> var .)
COMMA reduce using rule 32 (var_list -> var .)
state 43
(26) var_decl -> type var_list . SEMICOLON
(31) var_list -> var_list . COMMA var
SEMICOLON shift and go to state 52
COMMA shift and go to state 51
state 44
(17) method_header -> mod type ID .
(33) var -> ID . dim_star
(109) dim_star -> . LBRACKET RBRACKET dim_star
(110) dim_star -> .
LPAREN reduce using rule 17 (method_header -> mod type ID .)
LBRACKET shift and go to state 54
SEMICOLON reduce using rule 110 (dim_star -> .)
COMMA reduce using rule 110 (dim_star -> .)
dim_star shift and go to state 53
state 45
(15) method_decl -> method_header LPAREN param_list_opt . RPAREN block
RPAREN shift and go to state 55
state 46
(37) param_list -> param .
COMMA reduce using rule 37 (param_list -> param .)
RPAREN reduce using rule 37 (param_list -> param .)
state 47
(30) type -> ID .
ID reduce using rule 30 (type -> ID .)
state 48
(34) param_list_opt -> params_begin param_list . params_end
(36) param_list -> param_list . COMMA param
(40) params_end -> .
COMMA shift and go to state 57
RPAREN reduce using rule 40 (params_end -> .)
params_end shift and go to state 56
state 49
(38) param -> type . var
(33) var -> . ID dim_star
ID shift and go to state 59
var shift and go to state 58
state 50
(18) constructor_decl -> constructor_header LPAREN param_list_opt RPAREN . block
(41) block -> . LBRACE block_begin stmt_list block_end RBRACE
(42) block -> . LBRACE block_begin stmt_list error block_end RBRACE
LBRACE shift and go to state 60
block shift and go to state 61
state 51
(31) var_list -> var_list COMMA . var
(33) var -> . ID dim_star
ID shift and go to state 59
var shift and go to state 62
state 52
(26) var_decl -> type var_list SEMICOLON .
error reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
IF reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
WHILE reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
FOR reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
RETURN reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
BREAK reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
CONTINUE reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
SEMICOLON reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
LBRACE reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
INC reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
DEC reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
INT reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
BOOLEAN reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
FLOAT reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
ID reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
THIS reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
SUPER reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
LPAREN reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
NEW reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
INT_CONST reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
FLOAT_CONST reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
STRING_CONST reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
NULL reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
TRUE reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
FALSE reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
RBRACE reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
ELSE reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
PUBLIC reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
PRIVATE reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
VOID reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
STATIC reduce using rule 26 (var_decl -> type var_list SEMICOLON .)
state 53
(33) var -> ID dim_star .
SEMICOLON reduce using rule 33 (var -> ID dim_star .)
COMMA reduce using rule 33 (var -> ID dim_star .)
RPAREN reduce using rule 33 (var -> ID dim_star .)
state 54
(109) dim_star -> LBRACKET . RBRACKET dim_star
RBRACKET shift and go to state 63
state 55
(15) method_decl -> method_header LPAREN param_list_opt RPAREN . block
(41) block -> . LBRACE block_begin stmt_list block_end RBRACE
(42) block -> . LBRACE block_begin stmt_list error block_end RBRACE
LBRACE shift and go to state 60
block shift and go to state 64
state 56
(34) param_list_opt -> params_begin param_list params_end .
RPAREN reduce using rule 34 (param_list_opt -> params_begin param_list params_end .)
state 57
(36) param_list -> param_list COMMA . param
(38) param -> . type var
(27) type -> . INT
(28) type -> . BOOLEAN
(29) type -> . FLOAT
(30) type -> . ID
INT shift and go to state 29
BOOLEAN shift and go to state 33
FLOAT shift and go to state 31
ID shift and go to state 47
type shift and go to state 49
param shift and go to state 65
state 58
(38) param -> type var .
COMMA reduce using rule 38 (param -> type var .)
RPAREN reduce using rule 38 (param -> type var .)
state 59
(33) var -> ID . dim_star
(109) dim_star -> . LBRACKET RBRACKET dim_star
(110) dim_star -> .
LBRACKET shift and go to state 54
COMMA reduce using rule 110 (dim_star -> .)
RPAREN reduce using rule 110 (dim_star -> .)
SEMICOLON reduce using rule 110 (dim_star -> .)
dim_star shift and go to state 53
state 60
(41) block -> LBRACE . block_begin stmt_list block_end RBRACE
(42) block -> LBRACE . block_begin stmt_list error block_end RBRACE
(43) block_begin -> .
error reduce using rule 43 (block_begin -> .)
IF reduce using rule 43 (block_begin -> .)
WHILE reduce using rule 43 (block_begin -> .)
FOR reduce using rule 43 (block_begin -> .)
RETURN reduce using rule 43 (block_begin -> .)
BREAK reduce using rule 43 (block_begin -> .)
CONTINUE reduce using rule 43 (block_begin -> .)
SEMICOLON reduce using rule 43 (block_begin -> .)
LBRACE reduce using rule 43 (block_begin -> .)
INC reduce using rule 43 (block_begin -> .)
DEC reduce using rule 43 (block_begin -> .)
INT reduce using rule 43 (block_begin -> .)
BOOLEAN reduce using rule 43 (block_begin -> .)
FLOAT reduce using rule 43 (block_begin -> .)
ID reduce using rule 43 (block_begin -> .)
THIS reduce using rule 43 (block_begin -> .)
SUPER reduce using rule 43 (block_begin -> .)
LPAREN reduce using rule 43 (block_begin -> .)
NEW reduce using rule 43 (block_begin -> .)
INT_CONST reduce using rule 43 (block_begin -> .)
FLOAT_CONST reduce using rule 43 (block_begin -> .)
STRING_CONST reduce using rule 43 (block_begin -> .)
NULL reduce using rule 43 (block_begin -> .)
TRUE reduce using rule 43 (block_begin -> .)
FALSE reduce using rule 43 (block_begin -> .)
RBRACE reduce using rule 43 (block_begin -> .)
block_begin shift and go to state 66
state 61
(18) constructor_decl -> constructor_header LPAREN param_list_opt RPAREN block .
RBRACE reduce using rule 18 (constructor_decl -> constructor_header LPAREN param_list_opt RPAREN block .)
PUBLIC reduce using rule 18 (constructor_decl -> constructor_header LPAREN param_list_opt RPAREN block .)
PRIVATE reduce using rule 18 (constructor_decl -> constructor_header LPAREN param_list_opt RPAREN block .)
VOID reduce using rule 18 (constructor_decl -> constructor_header LPAREN param_list_opt RPAREN block .)
ID reduce using rule 18 (constructor_decl -> constructor_header LPAREN param_list_opt RPAREN block .)
INT reduce using rule 18 (constructor_decl -> constructor_header LPAREN param_list_opt RPAREN block .)
BOOLEAN reduce using rule 18 (constructor_decl -> constructor_header LPAREN param_list_opt RPAREN block .)
FLOAT reduce using rule 18 (constructor_decl -> constructor_header LPAREN param_list_opt RPAREN block .)
STATIC reduce using rule 18 (constructor_decl -> constructor_header LPAREN param_list_opt RPAREN block .)
state 62
(31) var_list -> var_list COMMA var .
SEMICOLON reduce using rule 31 (var_list -> var_list COMMA var .)