-
Notifications
You must be signed in to change notification settings - Fork 0
/
y.output
2649 lines (1756 loc) · 56.9 KB
/
y.output
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Terminals unused in grammar
THEN
ASSIGN
ERROR
State 175 conflicts: 1 shift/reduce
Grammar
0 $accept: program $end
1 program: CompUnit
2 CompUnit: Decl
3 | FuncDef
4 | CompUnit Decl
5 | CompUnit FuncDef
6 Decl: ConstDecl
7 | VarDecl
8 ConstDecl: CONST INT ConstDefList SEMI
9 ConstDefList: ConstDef
10 | ConstDefList COMMA ConstDef
11 ConstDef: IDENT EQ ConstInitVal
12 | IDENT Dimension EQ ConstInitVal
13 Dimension: MLPAREN Exp MRPAREN
14 | Dimension MLPAREN Exp MRPAREN
15 ConstInitVal: Exp
16 | ConstInitValArray
17 ConstInitValArray: EMPTY
18 | LLPAREN ConstInitValList LRPAREN
19 EMPTY: LLPAREN LRPAREN
20 ConstInitValList: ConstInitVal
21 | ConstInitValList COMMA ConstInitVal
22 VarDecl: INT VarDefList SEMI
23 VarDefList: VarDef
24 | VarDefList COMMA VarDef
25 VarDef: IDENT
26 | IDENT EQ InitVal
27 | IDENT Dimension
28 | IDENT Dimension EQ InitVal
29 InitVal: Exp
30 | InitValArray
31 InitValArray: EMPTY
32 | LLPAREN InitValList LRPAREN
33 InitValList: InitVal
34 | InitValList COMMA InitVal
35 FuncDef: VOID IDENT SLPAREN SRPAREN Block
36 | VOID IDENT SLPAREN FuncFParams SRPAREN Block
37 | INT IDENT SLPAREN SRPAREN Block
38 | INT IDENT SLPAREN FuncFParams SRPAREN Block
39 FuncFParams: FuncFParam
40 | FuncFParams COMMA FuncFParam
41 FuncFParam: FuncFParamVar
42 | FuncFParamArray
43 FuncFParamVar: INT IDENT
44 FuncFParamArray: INT IDENT MLPAREN MRPAREN
45 | INT IDENT MLPAREN MRPAREN Dimension
46 Block: EMPTY
47 | LLPAREN BlockItems LRPAREN
48 BlockItems: BlockItem
49 | BlockItems BlockItem
50 BlockItem: Decl
51 | Stmt
52 Stmt: Block
53 | Assign_stmt
54 | Exp_stmt
55 | If_stmt
56 | While_stmt
57 | Cond_stmt
58 | Return_stmt
59 Assign_stmt: LVal EQ Exp SEMI
60 Exp_stmt: SEMI
61 | Exp SEMI
62 If_stmt: IF SLPAREN Cond SRPAREN Stmt
63 | IF SLPAREN Cond SRPAREN Stmt ELSE Stmt
64 While_stmt: WHILE SLPAREN Cond SRPAREN Stmt
65 Cond_stmt: BREAK SEMI
66 | CONTINUE SEMI
67 Return_stmt: RETURN SEMI
68 | RETURN Exp SEMI
69 Exp: AddExp
70 Cond: LOrExp
71 LVal: IDENT
72 | IDENT Dimension
73 PrimaryExp: SLPAREN Exp SRPAREN
74 | LVal
75 | DEC_NUM
76 | OCT_NUM
77 | HEX_NUM
78 UnaryExp: PrimaryExp
79 | FuncCallExp
80 | PLUS UnaryExp
81 | MINUS UnaryExp
82 | NOT UnaryExp
83 FuncCallExp: IDENT SLPAREN SRPAREN
84 | IDENT SLPAREN FuncRParams SRPAREN
85 FuncRParams: Exp
86 | FuncRParams COMMA Exp
87 MulExp: UnaryExp
88 | MulExp TIMES UnaryExp
89 | MulExp OVER UnaryExp
90 | MulExp MOD UnaryExp
91 AddExp: MulExp
92 | AddExp PLUS MulExp
93 | AddExp MINUS MulExp
94 RelExp: AddExp
95 | RelExp LT AddExp
96 | RelExp GT AddExp
97 | RelExp LTE AddExp
98 | RelExp GTE AddExp
99 EqExp: RelExp
100 | EqExp EQ RelExp
101 | EqExp NEQ RelExp
102 LAndExp: EqExp
103 | LAndExp AND EqExp
104 LOrExp: LAndExp
105 | LOrExp OR LAndExp
106 IDENT: ID
Terminals, with rules where they appear
$end (0) 0
error (256)
IF (258) 62 63
THEN (259)
ELSE (260) 63
WHILE (261) 64
BREAK (262) 65
CONTINUE (263) 66
RETURN (264) 67 68
CONST (265) 8
INT (266) 8 22 37 38 43 44 45
VOID (267) 35 36
ID (268) 106
DEC_NUM (269) 75
OCT_NUM (270) 76
HEX_NUM (271) 77
ASSIGN (272)
SEMI (273) 8 22 59 60 61 65 66 67 68
COMMA (274) 10 21 24 34 40 86
LLPAREN (275) 18 19 32 47
LRPAREN (276) 18 19 32 47
MLPAREN (277) 13 14 44 45
MRPAREN (278) 13 14 44 45
SLPAREN (279) 35 36 37 38 62 63 64 73 83 84
SRPAREN (280) 35 36 37 38 62 63 64 73 83 84
NOT (281) 82
EQ (282) 11 12 26 28 59 100
NEQ (283) 101
LT (284) 95
GT (285) 96
LTE (286) 97
GTE (287) 98
PLUS (288) 80 92
MINUS (289) 81 93
TIMES (290) 88
OVER (291) 89
MOD (292) 90
AND (293) 103
OR (294) 105
ERROR (295)
Nonterminals, with rules where they appear
$accept (41)
on left: 0
program (42)
on left: 1
on right: 0
CompUnit (43)
on left: 2 3 4 5
on right: 1 4 5
Decl (44)
on left: 6 7
on right: 2 4 50
ConstDecl (45)
on left: 8
on right: 6
ConstDefList (46)
on left: 9 10
on right: 8 10
ConstDef (47)
on left: 11 12
on right: 9 10
Dimension (48)
on left: 13 14
on right: 12 14 27 28 45 72
ConstInitVal (49)
on left: 15 16
on right: 11 12 20 21
ConstInitValArray (50)
on left: 17 18
on right: 16
EMPTY (51)
on left: 19
on right: 17 31 46
ConstInitValList (52)
on left: 20 21
on right: 18 21
VarDecl (53)
on left: 22
on right: 7
VarDefList (54)
on left: 23 24
on right: 22 24
VarDef (55)
on left: 25 26 27 28
on right: 23 24
InitVal (56)
on left: 29 30
on right: 26 28 33 34
InitValArray (57)
on left: 31 32
on right: 30
InitValList (58)
on left: 33 34
on right: 32 34
FuncDef (59)
on left: 35 36 37 38
on right: 3 5
FuncFParams (60)
on left: 39 40
on right: 36 38 40
FuncFParam (61)
on left: 41 42
on right: 39 40
FuncFParamVar (62)
on left: 43
on right: 41
FuncFParamArray (63)
on left: 44 45
on right: 42
Block (64)
on left: 46 47
on right: 35 36 37 38 52
BlockItems (65)
on left: 48 49
on right: 47 49
BlockItem (66)
on left: 50 51
on right: 48 49
Stmt (67)
on left: 52 53 54 55 56 57 58
on right: 51 62 63 64
Assign_stmt (68)
on left: 59
on right: 53
Exp_stmt (69)
on left: 60 61
on right: 54
If_stmt (70)
on left: 62 63
on right: 55
While_stmt (71)
on left: 64
on right: 56
Cond_stmt (72)
on left: 65 66
on right: 57
Return_stmt (73)
on left: 67 68
on right: 58
Exp (74)
on left: 69
on right: 13 14 15 29 59 61 68 73 85 86
Cond (75)
on left: 70
on right: 62 63 64
LVal (76)
on left: 71 72
on right: 59 74
PrimaryExp (77)
on left: 73 74 75 76 77
on right: 78
UnaryExp (78)
on left: 78 79 80 81 82
on right: 80 81 82 87 88 89 90
FuncCallExp (79)
on left: 83 84
on right: 79
FuncRParams (80)
on left: 85 86
on right: 84 86
MulExp (81)
on left: 87 88 89 90
on right: 88 89 90 91 92 93
AddExp (82)
on left: 91 92 93
on right: 69 92 93 94 95 96 97 98
RelExp (83)
on left: 94 95 96 97 98
on right: 95 96 97 98 99 100 101
EqExp (84)
on left: 99 100 101
on right: 100 101 102 103
LAndExp (85)
on left: 102 103
on right: 103 104 105
LOrExp (86)
on left: 104 105
on right: 70 105
IDENT (87)
on left: 106
on right: 11 12 25 26 27 28 35 36 37 38 43 44 45 71 72 83 84
State 0
0 $accept: . program $end
CONST shift, and go to state 1
INT shift, and go to state 2
VOID shift, and go to state 3
program go to state 4
CompUnit go to state 5
Decl go to state 6
ConstDecl go to state 7
VarDecl go to state 8
FuncDef go to state 9
State 1
8 ConstDecl: CONST . INT ConstDefList SEMI
INT shift, and go to state 10
State 2
22 VarDecl: INT . VarDefList SEMI
37 FuncDef: INT . IDENT SLPAREN SRPAREN Block
38 | INT . IDENT SLPAREN FuncFParams SRPAREN Block
ID shift, and go to state 11
VarDefList go to state 12
VarDef go to state 13
IDENT go to state 14
State 3
35 FuncDef: VOID . IDENT SLPAREN SRPAREN Block
36 | VOID . IDENT SLPAREN FuncFParams SRPAREN Block
ID shift, and go to state 11
IDENT go to state 15
State 4
0 $accept: program . $end
$end shift, and go to state 16
State 5
1 program: CompUnit .
4 CompUnit: CompUnit . Decl
5 | CompUnit . FuncDef
CONST shift, and go to state 1
INT shift, and go to state 2
VOID shift, and go to state 3
$default reduce using rule 1 (program)
Decl go to state 17
ConstDecl go to state 7
VarDecl go to state 8
FuncDef go to state 18
State 6
2 CompUnit: Decl .
$default reduce using rule 2 (CompUnit)
State 7
6 Decl: ConstDecl .
$default reduce using rule 6 (Decl)
State 8
7 Decl: VarDecl .
$default reduce using rule 7 (Decl)
State 9
3 CompUnit: FuncDef .
$default reduce using rule 3 (CompUnit)
State 10
8 ConstDecl: CONST INT . ConstDefList SEMI
ID shift, and go to state 11
ConstDefList go to state 19
ConstDef go to state 20
IDENT go to state 21
State 11
106 IDENT: ID .
$default reduce using rule 106 (IDENT)
State 12
22 VarDecl: INT VarDefList . SEMI
24 VarDefList: VarDefList . COMMA VarDef
SEMI shift, and go to state 22
COMMA shift, and go to state 23
State 13
23 VarDefList: VarDef .
$default reduce using rule 23 (VarDefList)
State 14
25 VarDef: IDENT .
26 | IDENT . EQ InitVal
27 | IDENT . Dimension
28 | IDENT . Dimension EQ InitVal
37 FuncDef: INT IDENT . SLPAREN SRPAREN Block
38 | INT IDENT . SLPAREN FuncFParams SRPAREN Block
MLPAREN shift, and go to state 24
SLPAREN shift, and go to state 25
EQ shift, and go to state 26
$default reduce using rule 25 (VarDef)
Dimension go to state 27
State 15
35 FuncDef: VOID IDENT . SLPAREN SRPAREN Block
36 | VOID IDENT . SLPAREN FuncFParams SRPAREN Block
SLPAREN shift, and go to state 28
State 16
0 $accept: program $end .
$default accept
State 17
4 CompUnit: CompUnit Decl .
$default reduce using rule 4 (CompUnit)
State 18
5 CompUnit: CompUnit FuncDef .
$default reduce using rule 5 (CompUnit)
State 19
8 ConstDecl: CONST INT ConstDefList . SEMI
10 ConstDefList: ConstDefList . COMMA ConstDef
SEMI shift, and go to state 29
COMMA shift, and go to state 30
State 20
9 ConstDefList: ConstDef .
$default reduce using rule 9 (ConstDefList)
State 21
11 ConstDef: IDENT . EQ ConstInitVal
12 | IDENT . Dimension EQ ConstInitVal
MLPAREN shift, and go to state 24
EQ shift, and go to state 31
Dimension go to state 32
State 22
22 VarDecl: INT VarDefList SEMI .
$default reduce using rule 22 (VarDecl)
State 23
24 VarDefList: VarDefList COMMA . VarDef
ID shift, and go to state 11
VarDef go to state 33
IDENT go to state 34
State 24
13 Dimension: MLPAREN . Exp MRPAREN
ID shift, and go to state 11
DEC_NUM shift, and go to state 35
OCT_NUM shift, and go to state 36
HEX_NUM shift, and go to state 37
SLPAREN shift, and go to state 38
NOT shift, and go to state 39
PLUS shift, and go to state 40
MINUS shift, and go to state 41
Exp go to state 42
LVal go to state 43
PrimaryExp go to state 44
UnaryExp go to state 45
FuncCallExp go to state 46
MulExp go to state 47
AddExp go to state 48
IDENT go to state 49
State 25
37 FuncDef: INT IDENT SLPAREN . SRPAREN Block
38 | INT IDENT SLPAREN . FuncFParams SRPAREN Block
INT shift, and go to state 50
SRPAREN shift, and go to state 51
FuncFParams go to state 52
FuncFParam go to state 53
FuncFParamVar go to state 54
FuncFParamArray go to state 55
State 26
26 VarDef: IDENT EQ . InitVal
ID shift, and go to state 11
DEC_NUM shift, and go to state 35
OCT_NUM shift, and go to state 36
HEX_NUM shift, and go to state 37
LLPAREN shift, and go to state 56
SLPAREN shift, and go to state 38
NOT shift, and go to state 39
PLUS shift, and go to state 40
MINUS shift, and go to state 41
EMPTY go to state 57
InitVal go to state 58
InitValArray go to state 59
Exp go to state 60
LVal go to state 43
PrimaryExp go to state 44
UnaryExp go to state 45
FuncCallExp go to state 46
MulExp go to state 47
AddExp go to state 48
IDENT go to state 49
State 27
14 Dimension: Dimension . MLPAREN Exp MRPAREN
27 VarDef: IDENT Dimension .
28 | IDENT Dimension . EQ InitVal
MLPAREN shift, and go to state 61
EQ shift, and go to state 62
$default reduce using rule 27 (VarDef)
State 28
35 FuncDef: VOID IDENT SLPAREN . SRPAREN Block
36 | VOID IDENT SLPAREN . FuncFParams SRPAREN Block
INT shift, and go to state 50
SRPAREN shift, and go to state 63
FuncFParams go to state 64
FuncFParam go to state 53
FuncFParamVar go to state 54
FuncFParamArray go to state 55
State 29
8 ConstDecl: CONST INT ConstDefList SEMI .
$default reduce using rule 8 (ConstDecl)
State 30
10 ConstDefList: ConstDefList COMMA . ConstDef
ID shift, and go to state 11
ConstDef go to state 65
IDENT go to state 21
State 31
11 ConstDef: IDENT EQ . ConstInitVal
ID shift, and go to state 11
DEC_NUM shift, and go to state 35
OCT_NUM shift, and go to state 36
HEX_NUM shift, and go to state 37
LLPAREN shift, and go to state 66
SLPAREN shift, and go to state 38
NOT shift, and go to state 39
PLUS shift, and go to state 40
MINUS shift, and go to state 41
ConstInitVal go to state 67
ConstInitValArray go to state 68
EMPTY go to state 69
Exp go to state 70
LVal go to state 43
PrimaryExp go to state 44
UnaryExp go to state 45
FuncCallExp go to state 46
MulExp go to state 47
AddExp go to state 48
IDENT go to state 49
State 32
12 ConstDef: IDENT Dimension . EQ ConstInitVal
14 Dimension: Dimension . MLPAREN Exp MRPAREN
MLPAREN shift, and go to state 61
EQ shift, and go to state 71
State 33
24 VarDefList: VarDefList COMMA VarDef .
$default reduce using rule 24 (VarDefList)
State 34
25 VarDef: IDENT .
26 | IDENT . EQ InitVal
27 | IDENT . Dimension
28 | IDENT . Dimension EQ InitVal
MLPAREN shift, and go to state 24
EQ shift, and go to state 26
$default reduce using rule 25 (VarDef)
Dimension go to state 27
State 35
75 PrimaryExp: DEC_NUM .
$default reduce using rule 75 (PrimaryExp)
State 36
76 PrimaryExp: OCT_NUM .
$default reduce using rule 76 (PrimaryExp)
State 37
77 PrimaryExp: HEX_NUM .
$default reduce using rule 77 (PrimaryExp)
State 38
73 PrimaryExp: SLPAREN . Exp SRPAREN
ID shift, and go to state 11
DEC_NUM shift, and go to state 35
OCT_NUM shift, and go to state 36
HEX_NUM shift, and go to state 37
SLPAREN shift, and go to state 38
NOT shift, and go to state 39
PLUS shift, and go to state 40
MINUS shift, and go to state 41
Exp go to state 72
LVal go to state 43
PrimaryExp go to state 44
UnaryExp go to state 45
FuncCallExp go to state 46
MulExp go to state 47
AddExp go to state 48
IDENT go to state 49
State 39
82 UnaryExp: NOT . UnaryExp
ID shift, and go to state 11
DEC_NUM shift, and go to state 35
OCT_NUM shift, and go to state 36
HEX_NUM shift, and go to state 37
SLPAREN shift, and go to state 38
NOT shift, and go to state 39
PLUS shift, and go to state 40
MINUS shift, and go to state 41
LVal go to state 43
PrimaryExp go to state 44
UnaryExp go to state 73
FuncCallExp go to state 46
IDENT go to state 49
State 40
80 UnaryExp: PLUS . UnaryExp
ID shift, and go to state 11
DEC_NUM shift, and go to state 35
OCT_NUM shift, and go to state 36
HEX_NUM shift, and go to state 37
SLPAREN shift, and go to state 38
NOT shift, and go to state 39
PLUS shift, and go to state 40
MINUS shift, and go to state 41
LVal go to state 43
PrimaryExp go to state 44
UnaryExp go to state 74
FuncCallExp go to state 46
IDENT go to state 49
State 41
81 UnaryExp: MINUS . UnaryExp
ID shift, and go to state 11
DEC_NUM shift, and go to state 35
OCT_NUM shift, and go to state 36
HEX_NUM shift, and go to state 37
SLPAREN shift, and go to state 38
NOT shift, and go to state 39
PLUS shift, and go to state 40
MINUS shift, and go to state 41
LVal go to state 43
PrimaryExp go to state 44
UnaryExp go to state 75
FuncCallExp go to state 46
IDENT go to state 49
State 42
13 Dimension: MLPAREN Exp . MRPAREN
MRPAREN shift, and go to state 76
State 43
74 PrimaryExp: LVal .
$default reduce using rule 74 (PrimaryExp)
State 44
78 UnaryExp: PrimaryExp .
$default reduce using rule 78 (UnaryExp)
State 45
87 MulExp: UnaryExp .
$default reduce using rule 87 (MulExp)
State 46
79 UnaryExp: FuncCallExp .
$default reduce using rule 79 (UnaryExp)
State 47
88 MulExp: MulExp . TIMES UnaryExp
89 | MulExp . OVER UnaryExp
90 | MulExp . MOD UnaryExp
91 AddExp: MulExp .
TIMES shift, and go to state 77
OVER shift, and go to state 78
MOD shift, and go to state 79
$default reduce using rule 91 (AddExp)
State 48
69 Exp: AddExp .
92 AddExp: AddExp . PLUS MulExp
93 | AddExp . MINUS MulExp
PLUS shift, and go to state 80
MINUS shift, and go to state 81
$default reduce using rule 69 (Exp)
State 49
71 LVal: IDENT .
72 | IDENT . Dimension
83 FuncCallExp: IDENT . SLPAREN SRPAREN
84 | IDENT . SLPAREN FuncRParams SRPAREN
MLPAREN shift, and go to state 24
SLPAREN shift, and go to state 82
$default reduce using rule 71 (LVal)
Dimension go to state 83
State 50
43 FuncFParamVar: INT . IDENT
44 FuncFParamArray: INT . IDENT MLPAREN MRPAREN
45 | INT . IDENT MLPAREN MRPAREN Dimension
ID shift, and go to state 11
IDENT go to state 84
State 51
37 FuncDef: INT IDENT SLPAREN SRPAREN . Block
LLPAREN shift, and go to state 85
EMPTY go to state 86
Block go to state 87
State 52
38 FuncDef: INT IDENT SLPAREN FuncFParams . SRPAREN Block
40 FuncFParams: FuncFParams . COMMA FuncFParam
COMMA shift, and go to state 88
SRPAREN shift, and go to state 89
State 53
39 FuncFParams: FuncFParam .
$default reduce using rule 39 (FuncFParams)
State 54
41 FuncFParam: FuncFParamVar .
$default reduce using rule 41 (FuncFParam)
State 55
42 FuncFParam: FuncFParamArray .
$default reduce using rule 42 (FuncFParam)
State 56
19 EMPTY: LLPAREN . LRPAREN
32 InitValArray: LLPAREN . InitValList LRPAREN
ID shift, and go to state 11
DEC_NUM shift, and go to state 35
OCT_NUM shift, and go to state 36
HEX_NUM shift, and go to state 37
LLPAREN shift, and go to state 56
LRPAREN shift, and go to state 90
SLPAREN shift, and go to state 38
NOT shift, and go to state 39
PLUS shift, and go to state 40
MINUS shift, and go to state 41
EMPTY go to state 57
InitVal go to state 91
InitValArray go to state 59
InitValList go to state 92
Exp go to state 60
LVal go to state 43
PrimaryExp go to state 44
UnaryExp go to state 45
FuncCallExp go to state 46