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