-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathy.output
4047 lines (3091 loc) · 70.5 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
0 $accept : Program $end
1 Program : Decls
2 Decls : Decl
3 | Decls Decl
4 Decl : VariableDecl
5 | FunctionDecl
6 | ClassDecl
7 | InterfaceDecl
8 InterfaceDecl : T_Interface Y_Identifier T_LBrace T_RBrace
9 | InterfaceDecl2
10 InterfaceDecl2 : T_Interface InterfaceMiddle T_RBrace
11 InterfaceMiddle : Y_Identifier T_LBrace Prototype
12 | InterfaceMiddle Prototype
13 Prototype : Type Y_Identifier T_LParen Formalsq T_RParen T_Semicolon
14 | Y_Void Y_Identifier T_LParen Formalsq T_RParen T_Semicolon
15 ClassDecl : T_Class Y_Identifier Extendsq Implementsq T_LBrace Fieldsq T_RBrace
16 | T_Class Y_TypeIdentifier Extendsq Implementsq T_LBrace Fieldsq T_RBrace
17 Extendsq :
18 | T_Extends Y_Identifier
19 | T_Extends Y_TypeIdentifier
20 Implementsq :
21 | Implements
22 Implements : T_Implements Y_Identifier
23 | Implements T_Comma Y_Identifier
24 Fieldsq :
25 | Fieldsq VariableDecl
26 | Fieldsq FunctionDecl
27 VariableDecl : Variable T_Semicolon
28 Variable : Type Y_Identifier
29 FunctionDecl : Type Y_Identifier T_LParen Formalsq T_RParen StmtBlock
30 | Y_Void Y_Identifier T_LParen Formalsq T_RParen StmtBlock
31 Formalsq :
32 | Formals
33 Formals : Variable
34 | Formals T_Comma Variable
35 StmtBlock : T_LBrace StmtVarsq Stmtsq T_RBrace
36 StmtVarsq :
37 | StmtVars
38 StmtVars : VariableDecl
39 | StmtVars VariableDecl
40 Stmtsq :
41 | Stmts
42 Stmts : Stmt
43 | Stmts Stmt
44 Stmt : MatchedStmt
45 | UnmatchedStmt
46 MatchedStmt : Exprq T_Semicolon
47 | StmtBlock
48 | MatchedIf
49 | BreakStmt
50 | ReturnStmt
51 | PrintStmt
52 UnmatchedStmt : OpenIf
53 | ForStmt
54 | WhileStmt
55 MatchedIf : T_If T_LParen Expr T_RParen MatchedStmt T_Else MatchedStmt
56 OpenIf : T_If T_LParen Expr T_RParen Stmt
57 | T_If T_LParen Expr T_RParen MatchedStmt T_Else UnmatchedStmt
58 WhileStmt : T_While T_LParen Expr T_RParen StmtBlock
59 ForStmt : T_For T_LParen ForExprq T_Semicolon Expr T_Semicolon ForExprq T_RParen Stmt
60 ForExprq :
61 | Expr
62 BreakStmt : Y_Break T_Semicolon
63 ReturnStmt : Y_Return T_Semicolon
64 | Y_Return Expr T_Semicolon
65 PrintStmt : Y_Print T_LParen Actuals T_RParen T_Semicolon
66 Exprq :
67 | Expr
68 Expr : LValue Y_Assign Expr
69 | Expr2
70 Expr2 : Expr2 Y_Or Expr3
71 | Expr3
72 Expr3 : Expr3 Y_And Expr4
73 | Expr4
74 Expr4 : Expr4 Y_Equal Expr5
75 | Expr4 Y_NotEqual Expr5
76 | Expr5
77 Expr5 : Expr5 Y_Less Expr6
78 | Expr5 Y_LessEqual Expr6
79 | Expr5 Y_Greater Expr6
80 | Expr5 Y_GreaterEqual Expr6
81 | Expr6
82 Expr6 : Expr6 Y_Plus Expr7
83 | Expr6 Y_Minus Expr7
84 | Expr7
85 Expr7 : Expr7 Y_Times Expr8
86 | Expr7 Y_Div Expr8
87 | Expr7 Y_Mod Expr8
88 | Expr8
89 Expr8 : Y_Not Expr9
90 | Y_Minus Expr9
91 | Expr9
92 Expr9 : Constant
93 | LValue
94 | Y_This
95 | Call
96 | T_LParen Expr T_RParen
97 | T_ReadInteger T_LParen T_RParen
98 | T_ReadLine T_LParen T_RParen
99 | T_New T_LParen Y_Identifier T_RParen
100 | T_NewArray T_LParen Expr T_Comma NewArrayType T_RParen
101 Constant : Y_IntConstant
102 | Y_DoubleConstant
103 | Y_BoolConstant
104 | Y_StringConstant
105 | Y_Null
106 LValue : Y_Identifier
107 | FieldAccess
108 | ArrayRef
109 FieldAccess : Expr9 T_Dot Y_Identifier
110 ArrayRef : Expr9 T_LBracket Expr T_RBracket
111 Call : Y_Identifier T_LParen Actualsq T_RParen
112 | FieldAccess T_LParen Actualsq T_RParen
113 Actualsq :
114 | Actuals
115 Actuals : Expr
116 | Actuals T_Comma Expr
117 NewArrayType : Type
118 | Y_Identifier
119 Type : Primtype
120 | Usertype
121 | Lsttype
122 Primtype : Y_Int
123 | Y_Double
124 | Y_Bool
125 | Y_String
126 Usertype : Y_TypeIdentifier
127 Lsttype : Type T_LBracket T_RBracket
128 Y_IntConstant : T_IntConstant
129 Y_DoubleConstant : T_DoubleConstant
130 Y_BoolConstant : T_BoolConstant
131 Y_StringConstant : T_StringConstant
132 Y_Int : T_Int
133 Y_Double : T_Double
134 Y_Bool : T_Bool
135 Y_String : T_String
136 Y_TypeIdentifier : T_TypeIdentifier
137 Y_Identifier : T_Identifier
138 Y_This : T_This
139 Y_Null : T_Null
140 Y_Break : T_Break
141 Y_Return : T_Return
142 Y_Print : T_Print
143 Y_Void : T_Void
144 Y_Assign : T_Assign
145 Y_Or : T_Or
146 Y_Plus : T_Plus
147 Y_Minus : T_Minus
148 Y_Times : T_Times
149 Y_Div : T_Div
150 Y_Mod : T_Mod
151 Y_Less : T_Less
152 Y_LessEqual : T_LessEqual
153 Y_Greater : T_Greater
154 Y_GreaterEqual : T_GreaterEqual
155 Y_Equal : T_Equal
156 Y_NotEqual : T_NotEqual
157 Y_And : T_And
158 Y_Not : T_Not
state 0
$accept : . Program $end (0)
T_Void shift 1
T_Int shift 2
T_Double shift 3
T_Bool shift 4
T_String shift 5
T_Class shift 6
T_Interface shift 7
T_TypeIdentifier shift 8
. error
Program goto 9
Decls goto 10
Decl goto 11
VariableDecl goto 12
FunctionDecl goto 13
ClassDecl goto 14
InterfaceDecl goto 15
InterfaceDecl2 goto 16
Type goto 17
Y_Void goto 18
Y_TypeIdentifier goto 19
Variable goto 20
Primtype goto 21
Usertype goto 22
Lsttype goto 23
Y_Int goto 24
Y_Double goto 25
Y_Bool goto 26
Y_String goto 27
state 1
Y_Void : T_Void . (143)
. reduce 143
state 2
Y_Int : T_Int . (132)
. reduce 132
state 3
Y_Double : T_Double . (133)
. reduce 133
state 4
Y_Bool : T_Bool . (134)
. reduce 134
state 5
Y_String : T_String . (135)
. reduce 135
state 6
ClassDecl : T_Class . Y_Identifier Extendsq Implementsq T_LBrace Fieldsq T_RBrace (15)
ClassDecl : T_Class . Y_TypeIdentifier Extendsq Implementsq T_LBrace Fieldsq T_RBrace (16)
T_Identifier shift 28
T_TypeIdentifier shift 8
. error
Y_Identifier goto 29
Y_TypeIdentifier goto 30
state 7
InterfaceDecl : T_Interface . Y_Identifier T_LBrace T_RBrace (8)
InterfaceDecl2 : T_Interface . InterfaceMiddle T_RBrace (10)
T_Identifier shift 28
. error
Y_Identifier goto 31
InterfaceMiddle goto 32
state 8
Y_TypeIdentifier : T_TypeIdentifier . (136)
. reduce 136
state 9
$accept : Program . $end (0)
$end accept
state 10
Program : Decls . (1)
Decls : Decls . Decl (3)
T_Void shift 1
T_Int shift 2
T_Double shift 3
T_Bool shift 4
T_String shift 5
T_Class shift 6
T_Interface shift 7
T_TypeIdentifier shift 8
$end reduce 1
Decl goto 33
VariableDecl goto 12
FunctionDecl goto 13
ClassDecl goto 14
InterfaceDecl goto 15
InterfaceDecl2 goto 16
Type goto 17
Y_Void goto 18
Y_TypeIdentifier goto 19
Variable goto 20
Primtype goto 21
Usertype goto 22
Lsttype goto 23
Y_Int goto 24
Y_Double goto 25
Y_Bool goto 26
Y_String goto 27
state 11
Decls : Decl . (2)
. reduce 2
state 12
Decl : VariableDecl . (4)
. reduce 4
state 13
Decl : FunctionDecl . (5)
. reduce 5
state 14
Decl : ClassDecl . (6)
. reduce 6
state 15
Decl : InterfaceDecl . (7)
. reduce 7
state 16
InterfaceDecl : InterfaceDecl2 . (9)
. reduce 9
state 17
Variable : Type . Y_Identifier (28)
FunctionDecl : Type . Y_Identifier T_LParen Formalsq T_RParen StmtBlock (29)
Lsttype : Type . T_LBracket T_RBracket (127)
T_Identifier shift 28
T_LBracket shift 34
. error
Y_Identifier goto 35
state 18
FunctionDecl : Y_Void . Y_Identifier T_LParen Formalsq T_RParen StmtBlock (30)
T_Identifier shift 28
. error
Y_Identifier goto 36
state 19
Usertype : Y_TypeIdentifier . (126)
. reduce 126
state 20
VariableDecl : Variable . T_Semicolon (27)
T_Semicolon shift 37
. error
state 21
Type : Primtype . (119)
. reduce 119
state 22
Type : Usertype . (120)
. reduce 120
state 23
Type : Lsttype . (121)
. reduce 121
state 24
Primtype : Y_Int . (122)
. reduce 122
state 25
Primtype : Y_Double . (123)
. reduce 123
state 26
Primtype : Y_Bool . (124)
. reduce 124
state 27
Primtype : Y_String . (125)
. reduce 125
state 28
Y_Identifier : T_Identifier . (137)
. reduce 137
state 29
ClassDecl : T_Class Y_Identifier . Extendsq Implementsq T_LBrace Fieldsq T_RBrace (15)
Extendsq : . (17)
T_Extends shift 38
T_Implements reduce 17
T_LBrace reduce 17
Extendsq goto 39
state 30
ClassDecl : T_Class Y_TypeIdentifier . Extendsq Implementsq T_LBrace Fieldsq T_RBrace (16)
Extendsq : . (17)
T_Extends shift 38
T_Implements reduce 17
T_LBrace reduce 17
Extendsq goto 40
state 31
InterfaceDecl : T_Interface Y_Identifier . T_LBrace T_RBrace (8)
InterfaceMiddle : Y_Identifier . T_LBrace Prototype (11)
T_LBrace shift 41
. error
state 32
InterfaceDecl2 : T_Interface InterfaceMiddle . T_RBrace (10)
InterfaceMiddle : InterfaceMiddle . Prototype (12)
T_Void shift 1
T_Int shift 2
T_Double shift 3
T_Bool shift 4
T_String shift 5
T_TypeIdentifier shift 8
T_RBrace shift 42
. error
Prototype goto 43
Type goto 44
Y_Void goto 45
Y_TypeIdentifier goto 19
Primtype goto 21
Usertype goto 22
Lsttype goto 23
Y_Int goto 24
Y_Double goto 25
Y_Bool goto 26
Y_String goto 27
state 33
Decls : Decls Decl . (3)
. reduce 3
state 34
Lsttype : Type T_LBracket . T_RBracket (127)
T_RBracket shift 46
. error
state 35
Variable : Type Y_Identifier . (28)
FunctionDecl : Type Y_Identifier . T_LParen Formalsq T_RParen StmtBlock (29)
T_LParen shift 47
T_Semicolon reduce 28
state 36
FunctionDecl : Y_Void Y_Identifier . T_LParen Formalsq T_RParen StmtBlock (30)
T_LParen shift 48
. error
state 37
VariableDecl : Variable T_Semicolon . (27)
. reduce 27
state 38
Extendsq : T_Extends . Y_Identifier (18)
Extendsq : T_Extends . Y_TypeIdentifier (19)
T_Identifier shift 28
T_TypeIdentifier shift 8
. error
Y_Identifier goto 49
Y_TypeIdentifier goto 50
state 39
ClassDecl : T_Class Y_Identifier Extendsq . Implementsq T_LBrace Fieldsq T_RBrace (15)
Implementsq : . (20)
T_Implements shift 51
T_LBrace reduce 20
Implementsq goto 52
Implements goto 53
state 40
ClassDecl : T_Class Y_TypeIdentifier Extendsq . Implementsq T_LBrace Fieldsq T_RBrace (16)
Implementsq : . (20)
T_Implements shift 51
T_LBrace reduce 20
Implementsq goto 54
Implements goto 53
state 41
InterfaceDecl : T_Interface Y_Identifier T_LBrace . T_RBrace (8)
InterfaceMiddle : Y_Identifier T_LBrace . Prototype (11)
T_Void shift 1
T_Int shift 2
T_Double shift 3
T_Bool shift 4
T_String shift 5
T_TypeIdentifier shift 8
T_RBrace shift 55
. error
Prototype goto 56
Type goto 44
Y_Void goto 45
Y_TypeIdentifier goto 19
Primtype goto 21
Usertype goto 22
Lsttype goto 23
Y_Int goto 24
Y_Double goto 25
Y_Bool goto 26
Y_String goto 27
state 42
InterfaceDecl2 : T_Interface InterfaceMiddle T_RBrace . (10)
. reduce 10
state 43
InterfaceMiddle : InterfaceMiddle Prototype . (12)
. reduce 12
state 44
Prototype : Type . Y_Identifier T_LParen Formalsq T_RParen T_Semicolon (13)
Lsttype : Type . T_LBracket T_RBracket (127)
T_Identifier shift 28
T_LBracket shift 34
. error
Y_Identifier goto 57
state 45
Prototype : Y_Void . Y_Identifier T_LParen Formalsq T_RParen T_Semicolon (14)
T_Identifier shift 28
. error
Y_Identifier goto 58
state 46
Lsttype : Type T_LBracket T_RBracket . (127)
. reduce 127
state 47
FunctionDecl : Type Y_Identifier T_LParen . Formalsq T_RParen StmtBlock (29)
Formalsq : . (31)
T_Int shift 2
T_Double shift 3
T_Bool shift 4
T_String shift 5
T_TypeIdentifier shift 8
T_RParen reduce 31
Type goto 59
Formalsq goto 60
Y_TypeIdentifier goto 19
Variable goto 61
Formals goto 62
Primtype goto 21
Usertype goto 22
Lsttype goto 23
Y_Int goto 24
Y_Double goto 25
Y_Bool goto 26
Y_String goto 27
state 48
FunctionDecl : Y_Void Y_Identifier T_LParen . Formalsq T_RParen StmtBlock (30)
Formalsq : . (31)
T_Int shift 2
T_Double shift 3
T_Bool shift 4
T_String shift 5
T_TypeIdentifier shift 8
T_RParen reduce 31
Type goto 59
Formalsq goto 63
Y_TypeIdentifier goto 19
Variable goto 61
Formals goto 62
Primtype goto 21
Usertype goto 22
Lsttype goto 23
Y_Int goto 24
Y_Double goto 25
Y_Bool goto 26
Y_String goto 27
state 49
Extendsq : T_Extends Y_Identifier . (18)
. reduce 18
state 50
Extendsq : T_Extends Y_TypeIdentifier . (19)
. reduce 19
state 51
Implements : T_Implements . Y_Identifier (22)
T_Identifier shift 28
. error
Y_Identifier goto 64
state 52
ClassDecl : T_Class Y_Identifier Extendsq Implementsq . T_LBrace Fieldsq T_RBrace (15)
T_LBrace shift 65
. error
state 53
Implementsq : Implements . (21)
Implements : Implements . T_Comma Y_Identifier (23)
T_Comma shift 66
T_LBrace reduce 21
state 54
ClassDecl : T_Class Y_TypeIdentifier Extendsq Implementsq . T_LBrace Fieldsq T_RBrace (16)
T_LBrace shift 67
. error
state 55
InterfaceDecl : T_Interface Y_Identifier T_LBrace T_RBrace . (8)
. reduce 8
state 56
InterfaceMiddle : Y_Identifier T_LBrace Prototype . (11)
. reduce 11
state 57
Prototype : Type Y_Identifier . T_LParen Formalsq T_RParen T_Semicolon (13)
T_LParen shift 68
. error
state 58
Prototype : Y_Void Y_Identifier . T_LParen Formalsq T_RParen T_Semicolon (14)
T_LParen shift 69
. error
state 59
Variable : Type . Y_Identifier (28)
Lsttype : Type . T_LBracket T_RBracket (127)
T_Identifier shift 28
T_LBracket shift 34
. error
Y_Identifier goto 70
state 60
FunctionDecl : Type Y_Identifier T_LParen Formalsq . T_RParen StmtBlock (29)
T_RParen shift 71
. error
state 61
Formals : Variable . (33)
. reduce 33
state 62
Formalsq : Formals . (32)
Formals : Formals . T_Comma Variable (34)
T_Comma shift 72
T_RParen reduce 32
state 63
FunctionDecl : Y_Void Y_Identifier T_LParen Formalsq . T_RParen StmtBlock (30)
T_RParen shift 73
. error
state 64
Implements : T_Implements Y_Identifier . (22)
. reduce 22
state 65
ClassDecl : T_Class Y_Identifier Extendsq Implementsq T_LBrace . Fieldsq T_RBrace (15)
Fieldsq : . (24)
. reduce 24
Fieldsq goto 74
state 66
Implements : Implements T_Comma . Y_Identifier (23)
T_Identifier shift 28
. error
Y_Identifier goto 75
state 67
ClassDecl : T_Class Y_TypeIdentifier Extendsq Implementsq T_LBrace . Fieldsq T_RBrace (16)
Fieldsq : . (24)
. reduce 24
Fieldsq goto 76
state 68
Prototype : Type Y_Identifier T_LParen . Formalsq T_RParen T_Semicolon (13)
Formalsq : . (31)
T_Int shift 2
T_Double shift 3
T_Bool shift 4
T_String shift 5
T_TypeIdentifier shift 8
T_RParen reduce 31
Type goto 59
Formalsq goto 77
Y_TypeIdentifier goto 19
Variable goto 61
Formals goto 62
Primtype goto 21
Usertype goto 22
Lsttype goto 23
Y_Int goto 24
Y_Double goto 25
Y_Bool goto 26
Y_String goto 27
state 69
Prototype : Y_Void Y_Identifier T_LParen . Formalsq T_RParen T_Semicolon (14)
Formalsq : . (31)
T_Int shift 2
T_Double shift 3
T_Bool shift 4
T_String shift 5
T_TypeIdentifier shift 8
T_RParen reduce 31
Type goto 59
Formalsq goto 78
Y_TypeIdentifier goto 19
Variable goto 61
Formals goto 62
Primtype goto 21
Usertype goto 22
Lsttype goto 23
Y_Int goto 24
Y_Double goto 25
Y_Bool goto 26
Y_String goto 27
state 70
Variable : Type Y_Identifier . (28)
. reduce 28
state 71
FunctionDecl : Type Y_Identifier T_LParen Formalsq T_RParen . StmtBlock (29)
T_LBrace shift 79
. error
StmtBlock goto 80
state 72
Formals : Formals T_Comma . Variable (34)
T_Int shift 2
T_Double shift 3
T_Bool shift 4
T_String shift 5
T_TypeIdentifier shift 8
. error
Type goto 59
Y_TypeIdentifier goto 19
Variable goto 81
Primtype goto 21
Usertype goto 22
Lsttype goto 23
Y_Int goto 24
Y_Double goto 25
Y_Bool goto 26
Y_String goto 27
state 73
FunctionDecl : Y_Void Y_Identifier T_LParen Formalsq T_RParen . StmtBlock (30)
T_LBrace shift 79
. error
StmtBlock goto 82
state 74
ClassDecl : T_Class Y_Identifier Extendsq Implementsq T_LBrace Fieldsq . T_RBrace (15)
Fieldsq : Fieldsq . VariableDecl (25)
Fieldsq : Fieldsq . FunctionDecl (26)
T_Void shift 1
T_Int shift 2
T_Double shift 3
T_Bool shift 4
T_String shift 5
T_TypeIdentifier shift 8
T_RBrace shift 83
. error
VariableDecl goto 84
FunctionDecl goto 85
Type goto 17
Y_Void goto 18
Y_TypeIdentifier goto 19
Variable goto 20
Primtype goto 21
Usertype goto 22
Lsttype goto 23
Y_Int goto 24
Y_Double goto 25
Y_Bool goto 26
Y_String goto 27