-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparser.out
14718 lines (13919 loc) · 637 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
Grammar:
Rule 0 S' -> program
Rule 1 program -> empty
Rule 2 program -> statements
Rule 3 statements -> statements statement
Rule 4 statements -> statement
Rule 5 statement -> expr SEP
Rule 6 statement -> var_assign SEP
Rule 7 statement -> LET var : var_type SEP
Rule 8 statement -> PRINT expr
Rule 9 statement -> var_define SEP
Rule 10 statement -> class_definition
Rule 11 statement -> struct_definition
Rule 12 statement -> if_statement
Rule 13 statement -> for_statement
Rule 14 statement -> while_statement
Rule 15 statement -> return_statement
Rule 16 statement -> function_definition
Rule 17 statement -> import_statement
Rule 18 statement -> RAW_INPUT
Rule 19 class_definition -> CLASS ID { function_definitions }
Rule 20 function_definitions -> function_definitions function_definition
Rule 21 function_definitions -> function_definition
Rule 22 function_definitions -> empty
Rule 23 struct_definition -> STRUCT ID { struct_fields } SEP
Rule 24 struct_fields -> struct_fields struct_field
Rule 25 struct_fields -> struct_field
Rule 26 struct_field -> LET ID : var_type SEP
Rule 27 var_type -> DICT_TYPE
Rule 28 var_type -> LIST_TYPE
Rule 29 var_type -> BOOL_TYPE
Rule 30 var_type -> STRING_TYPE
Rule 31 var_type -> FLOAT_TYPE
Rule 32 var_type -> INT_TYPE
Rule 33 import_statement -> IMPORT STRING SEP
Rule 34 function_definition -> FN ID ( params ) block
Rule 35 expr -> getter
Rule 36 expr -> { member_list }
Rule 37 expr -> NIL
Rule 38 expr -> var
Rule 39 expr -> var [ expr ]
Rule 40 expr -> list_val
Rule 41 expr -> FALSE
Rule 42 expr -> TRUE
Rule 43 expr -> STRING
Rule 44 expr -> FLOAT
Rule 45 expr -> INT
Rule 46 expr -> ( expr )
Rule 47 expr -> expr PERSENT expr
Rule 48 expr -> expr DIV expr
Rule 49 expr -> expr MUL expr
Rule 50 expr -> expr SUB expr
Rule 51 expr -> expr ADD expr
Rule 52 expr -> expr % expr [precedence=left, level=11]
Rule 53 expr -> expr / expr [precedence=left, level=11]
Rule 54 expr -> expr * expr [precedence=left, level=11]
Rule 55 expr -> expr - expr [precedence=left, level=10]
Rule 56 expr -> expr + expr [precedence=left, level=10]
Rule 57 expr -> ! expr [precedence=right, level=13]
Rule 58 expr -> + expr [precedence=right, level=12]
Rule 59 expr -> - expr [precedence=right, level=12]
Rule 60 expr -> ~ expr [precedence=right, level=12]
Rule 61 expr -> expr | expr [precedence=left, level=4]
Rule 62 expr -> expr ^ expr [precedence=left, level=5]
Rule 63 expr -> expr & expr [precedence=left, level=6]
Rule 64 expr -> expr SHR expr [precedence=left, level=9]
Rule 65 expr -> expr SHL expr [precedence=left, level=9]
Rule 66 expr -> expr GREATER expr [precedence=left, level=8]
Rule 67 expr -> expr LESS expr [precedence=left, level=8]
Rule 68 expr -> expr OR expr [precedence=left, level=2]
Rule 69 expr -> expr AND expr [precedence=left, level=3]
Rule 70 expr -> expr GREATEREQ expr [precedence=left, level=8]
Rule 71 expr -> expr LESSEQ expr [precedence=left, level=8]
Rule 72 expr -> expr NOTEQ expr [precedence=left, level=7]
Rule 73 expr -> expr EQEQ expr [precedence=left, level=7]
Rule 74 expr -> expr ID ( args )
Rule 75 expr -> ID DOUBLECOLON ID ( args )
Rule 76 expr -> ID ( args )
Rule 77 expr -> expr ? expr : expr
Rule 78 expr -> TYPEOF expr
Rule 79 expr -> LAMBDA ( params ) ARROW expr
Rule 80 expr -> ID LEFTARROW { struct_init_exprs }
Rule 81 struct_init_exprs -> struct_init_exprs , expr
Rule 82 struct_init_exprs -> expr
Rule 83 var_define -> LET getter ASSIGN expr
Rule 84 var_define -> LET var ASSIGN expr
Rule 85 return_statement -> RETURN expr SEP
Rule 86 var_assign -> DEC var [precedence=right, level=12]
Rule 87 var_assign -> INC var [precedence=right, level=12]
Rule 88 var_assign -> var SHRASGN expr [precedence=right, level=1]
Rule 89 var_assign -> var SHLASGN expr [precedence=right, level=1]
Rule 90 var_assign -> var XORASGN expr [precedence=right, level=1]
Rule 91 var_assign -> var ORASGN expr [precedence=right, level=1]
Rule 92 var_assign -> var ANDASGN expr [precedence=right, level=1]
Rule 93 var_assign -> var MODULOASGN expr [precedence=right, level=1]
Rule 94 var_assign -> var SLASHASGN expr [precedence=right, level=1]
Rule 95 var_assign -> var STARASGN expr [precedence=right, level=1]
Rule 96 var_assign -> var MINUSASGN expr [precedence=right, level=1]
Rule 97 var_assign -> var PLUSASGN expr [precedence=right, level=1]
Rule 98 var_assign -> var ASSIGN RAW_INPUT
Rule 99 var_assign -> var ASSIGN expr
Rule 100 if_statement -> IF expr block
Rule 101 if_statement -> IF expr block ELSE block
Rule 102 while_statement -> WHILE expr block
Rule 103 for_statement -> FOR expr TO expr block
Rule 104 list_val -> [ exprs ]
Rule 105 exprs -> exprs , expr
Rule 106 exprs -> expr
Rule 107 exprs -> empty
Rule 108 var -> var [ expr ]
Rule 109 var -> ID
Rule 110 empty -> <empty>
Rule 111 block -> statement
Rule 112 block -> { program }
Rule 113 params -> empty
Rule 114 params -> param
Rule 115 params -> params , param
Rule 116 param -> ID var_type
Rule 117 args -> empty
Rule 118 args -> arg
Rule 119 args -> args , arg
Rule 120 arg -> expr
Rule 121 member_list -> member_list , member
Rule 122 member_list -> member
Rule 123 member_list -> empty
Rule 124 member -> STRING : expr
Rule 125 getter -> ID
Rule 126 getter -> getter . ID
Unused terminals:
PIPE
Terminals, with rules where they appear:
! : 57
% : 52
& : 63
( : 34 46 74 75 76 79
) : 34 46 74 75 76 79
* : 54
+ : 56 58
, : 81 105 115 119 121
- : 55 59
. : 126
/ : 53
: : 7 26 77 124
? : 77
ADD : 51
AND : 69
ANDASGN : 92
ARROW : 79
ASSIGN : 83 84 98 99
BOOL_TYPE : 29
CLASS : 19
DEC : 86
DICT_TYPE : 27
DIV : 48
DOUBLECOLON : 75
ELSE : 101
EQEQ : 73
FALSE : 41
FLOAT : 44
FLOAT_TYPE : 31
FN : 34
FOR : 103
GREATER : 66
GREATEREQ : 70
ID : 19 23 26 34 74 75 75 76 80 109 116 125 126
IF : 100 101
IMPORT : 33
INC : 87
INT : 45
INT_TYPE : 32
LAMBDA : 79
LEFTARROW : 80
LESS : 67
LESSEQ : 71
LET : 7 26 83 84
LIST_TYPE : 28
MINUSASGN : 96
MODULOASGN : 93
MUL : 49
NIL : 37
NOTEQ : 72
OR : 68
ORASGN : 91
PERSENT : 47
PIPE :
PLUSASGN : 97
PRINT : 8
RAW_INPUT : 18 98
RETURN : 85
SEP : 5 6 7 9 23 26 33 85
SHL : 65
SHLASGN : 89
SHR : 64
SHRASGN : 88
SLASHASGN : 94
STARASGN : 95
STRING : 33 43 124
STRING_TYPE : 30
STRUCT : 23
SUB : 50
TO : 103
TRUE : 42
TYPEOF : 78
WHILE : 102
XORASGN : 90
[ : 39 104 108
] : 39 104 108
^ : 62
error :
{ : 19 23 36 80 112
| : 61
} : 19 23 36 80 112
~ : 60
Nonterminals, with rules where they appear:
arg : 118 119
args : 74 75 76 119
block : 34 100 101 101 102 103
class_definition : 10
empty : 1 22 107 113 117 123
expr : 5 8 39 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 56 57 58 59 60 61 61 62 62 63 63 64 64 65 65 66 66 67 67 68 68 69 69 70 70 71 71 72 72 73 73 74 77 77 77 78 79 81 82 83 84 85 88 89 90 91 92 93 94 95 96 97 99 100 101 102 103 103 105 106 108 120 124
exprs : 104 105
for_statement : 13
function_definition : 16 20 21
function_definitions : 19 20
getter : 35 83 126
if_statement : 12
import_statement : 17
list_val : 40
member : 121 122
member_list : 36 121
param : 114 115
params : 34 79 115
program : 112 0
return_statement : 15
statement : 3 4 111
statements : 2 3
struct_definition : 11
struct_field : 24 25
struct_fields : 23 24
struct_init_exprs : 80 81
var : 7 38 39 84 86 87 88 89 90 91 92 93 94 95 96 97 98 99 108
var_assign : 6
var_define : 9
var_type : 7 26 116
while_statement : 14
state 0
(0) S' -> . program
(1) program -> . empty
(2) program -> . statements
(110) empty -> .
(3) statements -> . statements statement
(4) statements -> . statement
(5) statement -> . expr SEP
(6) statement -> . var_assign SEP
(7) statement -> . LET var : var_type SEP
(8) statement -> . PRINT expr
(9) statement -> . var_define SEP
(10) statement -> . class_definition
(11) statement -> . struct_definition
(12) statement -> . if_statement
(13) statement -> . for_statement
(14) statement -> . while_statement
(15) statement -> . return_statement
(16) statement -> . function_definition
(17) statement -> . import_statement
(18) statement -> . RAW_INPUT
(35) expr -> . getter
(36) expr -> . { member_list }
(37) expr -> . NIL
(38) expr -> . var
(39) expr -> . var [ expr ]
(40) expr -> . list_val
(41) expr -> . FALSE
(42) expr -> . TRUE
(43) expr -> . STRING
(44) expr -> . FLOAT
(45) expr -> . INT
(46) expr -> . ( expr )
(47) expr -> . expr PERSENT expr
(48) expr -> . expr DIV expr
(49) expr -> . expr MUL expr
(50) expr -> . expr SUB expr
(51) expr -> . expr ADD expr
(52) expr -> . expr % expr
(53) expr -> . expr / expr
(54) expr -> . expr * expr
(55) expr -> . expr - expr
(56) expr -> . expr + expr
(57) expr -> . ! expr
(58) expr -> . + expr
(59) expr -> . - expr
(60) expr -> . ~ expr
(61) expr -> . expr | expr
(62) expr -> . expr ^ expr
(63) expr -> . expr & expr
(64) expr -> . expr SHR expr
(65) expr -> . expr SHL expr
(66) expr -> . expr GREATER expr
(67) expr -> . expr LESS expr
(68) expr -> . expr OR expr
(69) expr -> . expr AND expr
(70) expr -> . expr GREATEREQ expr
(71) expr -> . expr LESSEQ expr
(72) expr -> . expr NOTEQ expr
(73) expr -> . expr EQEQ expr
(74) expr -> . expr ID ( args )
(75) expr -> . ID DOUBLECOLON ID ( args )
(76) expr -> . ID ( args )
(77) expr -> . expr ? expr : expr
(78) expr -> . TYPEOF expr
(79) expr -> . LAMBDA ( params ) ARROW expr
(80) expr -> . ID LEFTARROW { struct_init_exprs }
(86) var_assign -> . DEC var
(87) var_assign -> . INC var
(88) var_assign -> . var SHRASGN expr
(89) var_assign -> . var SHLASGN expr
(90) var_assign -> . var XORASGN expr
(91) var_assign -> . var ORASGN expr
(92) var_assign -> . var ANDASGN expr
(93) var_assign -> . var MODULOASGN expr
(94) var_assign -> . var SLASHASGN expr
(95) var_assign -> . var STARASGN expr
(96) var_assign -> . var MINUSASGN expr
(97) var_assign -> . var PLUSASGN expr
(98) var_assign -> . var ASSIGN RAW_INPUT
(99) var_assign -> . var ASSIGN expr
(83) var_define -> . LET getter ASSIGN expr
(84) var_define -> . LET var ASSIGN expr
(19) class_definition -> . CLASS ID { function_definitions }
(23) struct_definition -> . STRUCT ID { struct_fields } SEP
(100) if_statement -> . IF expr block
(101) if_statement -> . IF expr block ELSE block
(103) for_statement -> . FOR expr TO expr block
(102) while_statement -> . WHILE expr block
(85) return_statement -> . RETURN expr SEP
(34) function_definition -> . FN ID ( params ) block
(33) import_statement -> . IMPORT STRING SEP
(125) getter -> . ID
(126) getter -> . getter . ID
(108) var -> . var [ expr ]
(109) var -> . ID
(104) list_val -> . [ exprs ]
$end reduce using rule 110 (empty -> .)
LET shift and go to state 7
PRINT shift and go to state 9
RAW_INPUT shift and go to state 19
{ shift and go to state 21
NIL shift and go to state 22
FALSE shift and go to state 25
TRUE shift and go to state 26
STRING shift and go to state 27
FLOAT shift and go to state 28
INT shift and go to state 29
( shift and go to state 30
! shift and go to state 33
+ shift and go to state 32
- shift and go to state 31
~ shift and go to state 34
ID shift and go to state 35
TYPEOF shift and go to state 36
LAMBDA shift and go to state 37
DEC shift and go to state 38
INC shift and go to state 39
CLASS shift and go to state 40
STRUCT shift and go to state 41
IF shift and go to state 42
FOR shift and go to state 43
WHILE shift and go to state 44
RETURN shift and go to state 45
FN shift and go to state 46
IMPORT shift and go to state 47
[ shift and go to state 23
program shift and go to state 1
empty shift and go to state 2
statements shift and go to state 3
statement shift and go to state 4
expr shift and go to state 5
var_assign shift and go to state 6
var shift and go to state 8
var_define shift and go to state 10
class_definition shift and go to state 11
struct_definition shift and go to state 12
if_statement shift and go to state 13
for_statement shift and go to state 14
while_statement shift and go to state 15
return_statement shift and go to state 16
function_definition shift and go to state 17
import_statement shift and go to state 18
getter shift and go to state 20
list_val shift and go to state 24
state 1
(0) S' -> program .
state 2
(1) program -> empty .
$end reduce using rule 1 (program -> empty .)
state 3
(2) program -> statements .
(3) statements -> statements . statement
(5) statement -> . expr SEP
(6) statement -> . var_assign SEP
(7) statement -> . LET var : var_type SEP
(8) statement -> . PRINT expr
(9) statement -> . var_define SEP
(10) statement -> . class_definition
(11) statement -> . struct_definition
(12) statement -> . if_statement
(13) statement -> . for_statement
(14) statement -> . while_statement
(15) statement -> . return_statement
(16) statement -> . function_definition
(17) statement -> . import_statement
(18) statement -> . RAW_INPUT
(35) expr -> . getter
(36) expr -> . { member_list }
(37) expr -> . NIL
(38) expr -> . var
(39) expr -> . var [ expr ]
(40) expr -> . list_val
(41) expr -> . FALSE
(42) expr -> . TRUE
(43) expr -> . STRING
(44) expr -> . FLOAT
(45) expr -> . INT
(46) expr -> . ( expr )
(47) expr -> . expr PERSENT expr
(48) expr -> . expr DIV expr
(49) expr -> . expr MUL expr
(50) expr -> . expr SUB expr
(51) expr -> . expr ADD expr
(52) expr -> . expr % expr
(53) expr -> . expr / expr
(54) expr -> . expr * expr
(55) expr -> . expr - expr
(56) expr -> . expr + expr
(57) expr -> . ! expr
(58) expr -> . + expr
(59) expr -> . - expr
(60) expr -> . ~ expr
(61) expr -> . expr | expr
(62) expr -> . expr ^ expr
(63) expr -> . expr & expr
(64) expr -> . expr SHR expr
(65) expr -> . expr SHL expr
(66) expr -> . expr GREATER expr
(67) expr -> . expr LESS expr
(68) expr -> . expr OR expr
(69) expr -> . expr AND expr
(70) expr -> . expr GREATEREQ expr
(71) expr -> . expr LESSEQ expr
(72) expr -> . expr NOTEQ expr
(73) expr -> . expr EQEQ expr
(74) expr -> . expr ID ( args )
(75) expr -> . ID DOUBLECOLON ID ( args )
(76) expr -> . ID ( args )
(77) expr -> . expr ? expr : expr
(78) expr -> . TYPEOF expr
(79) expr -> . LAMBDA ( params ) ARROW expr
(80) expr -> . ID LEFTARROW { struct_init_exprs }
(86) var_assign -> . DEC var
(87) var_assign -> . INC var
(88) var_assign -> . var SHRASGN expr
(89) var_assign -> . var SHLASGN expr
(90) var_assign -> . var XORASGN expr
(91) var_assign -> . var ORASGN expr
(92) var_assign -> . var ANDASGN expr
(93) var_assign -> . var MODULOASGN expr
(94) var_assign -> . var SLASHASGN expr
(95) var_assign -> . var STARASGN expr
(96) var_assign -> . var MINUSASGN expr
(97) var_assign -> . var PLUSASGN expr
(98) var_assign -> . var ASSIGN RAW_INPUT
(99) var_assign -> . var ASSIGN expr
(83) var_define -> . LET getter ASSIGN expr
(84) var_define -> . LET var ASSIGN expr
(19) class_definition -> . CLASS ID { function_definitions }
(23) struct_definition -> . STRUCT ID { struct_fields } SEP
(100) if_statement -> . IF expr block
(101) if_statement -> . IF expr block ELSE block
(103) for_statement -> . FOR expr TO expr block
(102) while_statement -> . WHILE expr block
(85) return_statement -> . RETURN expr SEP
(34) function_definition -> . FN ID ( params ) block
(33) import_statement -> . IMPORT STRING SEP
(125) getter -> . ID
(126) getter -> . getter . ID
(108) var -> . var [ expr ]
(109) var -> . ID
(104) list_val -> . [ exprs ]
$end reduce using rule 2 (program -> statements .)
} reduce using rule 2 (program -> statements .)
LET shift and go to state 7
PRINT shift and go to state 9
RAW_INPUT shift and go to state 19
{ shift and go to state 21
NIL shift and go to state 22
FALSE shift and go to state 25
TRUE shift and go to state 26
STRING shift and go to state 27
FLOAT shift and go to state 28
INT shift and go to state 29
( shift and go to state 30
! shift and go to state 33
+ shift and go to state 32
- shift and go to state 31
~ shift and go to state 34
ID shift and go to state 35
TYPEOF shift and go to state 36
LAMBDA shift and go to state 37
DEC shift and go to state 38
INC shift and go to state 39
CLASS shift and go to state 40
STRUCT shift and go to state 41
IF shift and go to state 42
FOR shift and go to state 43
WHILE shift and go to state 44
RETURN shift and go to state 45
FN shift and go to state 46
IMPORT shift and go to state 47
[ shift and go to state 23
statement shift and go to state 48
expr shift and go to state 5
var_assign shift and go to state 6
var shift and go to state 8
var_define shift and go to state 10
class_definition shift and go to state 11
struct_definition shift and go to state 12
if_statement shift and go to state 13
for_statement shift and go to state 14
while_statement shift and go to state 15
return_statement shift and go to state 16
function_definition shift and go to state 17
import_statement shift and go to state 18
getter shift and go to state 20
list_val shift and go to state 24
state 4
(4) statements -> statement .
LET reduce using rule 4 (statements -> statement .)
PRINT reduce using rule 4 (statements -> statement .)
RAW_INPUT reduce using rule 4 (statements -> statement .)
{ reduce using rule 4 (statements -> statement .)
NIL reduce using rule 4 (statements -> statement .)
FALSE reduce using rule 4 (statements -> statement .)
TRUE reduce using rule 4 (statements -> statement .)
STRING reduce using rule 4 (statements -> statement .)
FLOAT reduce using rule 4 (statements -> statement .)
INT reduce using rule 4 (statements -> statement .)
( reduce using rule 4 (statements -> statement .)
! reduce using rule 4 (statements -> statement .)
+ reduce using rule 4 (statements -> statement .)
- reduce using rule 4 (statements -> statement .)
~ reduce using rule 4 (statements -> statement .)
ID reduce using rule 4 (statements -> statement .)
TYPEOF reduce using rule 4 (statements -> statement .)
LAMBDA reduce using rule 4 (statements -> statement .)
DEC reduce using rule 4 (statements -> statement .)
INC reduce using rule 4 (statements -> statement .)
CLASS reduce using rule 4 (statements -> statement .)
STRUCT reduce using rule 4 (statements -> statement .)
IF reduce using rule 4 (statements -> statement .)
FOR reduce using rule 4 (statements -> statement .)
WHILE reduce using rule 4 (statements -> statement .)
RETURN reduce using rule 4 (statements -> statement .)
FN reduce using rule 4 (statements -> statement .)
IMPORT reduce using rule 4 (statements -> statement .)
[ reduce using rule 4 (statements -> statement .)
$end reduce using rule 4 (statements -> statement .)
} reduce using rule 4 (statements -> statement .)
state 5
(5) statement -> expr . SEP
(47) expr -> expr . PERSENT expr
(48) expr -> expr . DIV expr
(49) expr -> expr . MUL expr
(50) expr -> expr . SUB expr
(51) expr -> expr . ADD expr
(52) expr -> expr . % expr
(53) expr -> expr . / expr
(54) expr -> expr . * expr
(55) expr -> expr . - expr
(56) expr -> expr . + expr
(61) expr -> expr . | expr
(62) expr -> expr . ^ expr
(63) expr -> expr . & expr
(64) expr -> expr . SHR expr
(65) expr -> expr . SHL expr
(66) expr -> expr . GREATER expr
(67) expr -> expr . LESS expr
(68) expr -> expr . OR expr
(69) expr -> expr . AND expr
(70) expr -> expr . GREATEREQ expr
(71) expr -> expr . LESSEQ expr
(72) expr -> expr . NOTEQ expr
(73) expr -> expr . EQEQ expr
(74) expr -> expr . ID ( args )
(77) expr -> expr . ? expr : expr
SEP shift and go to state 49
PERSENT shift and go to state 50
DIV shift and go to state 51
MUL shift and go to state 52
SUB shift and go to state 53
ADD shift and go to state 54
% shift and go to state 55
/ shift and go to state 56
* shift and go to state 57
- shift and go to state 58
+ shift and go to state 59
| shift and go to state 60
^ shift and go to state 61
& shift and go to state 62
SHR shift and go to state 63
SHL shift and go to state 64
GREATER shift and go to state 65
LESS shift and go to state 66
OR shift and go to state 67
AND shift and go to state 68
GREATEREQ shift and go to state 69
LESSEQ shift and go to state 70
NOTEQ shift and go to state 71
EQEQ shift and go to state 72
ID shift and go to state 73
? shift and go to state 74
state 6
(6) statement -> var_assign . SEP
SEP shift and go to state 75
state 7
(7) statement -> LET . var : var_type SEP
(83) var_define -> LET . getter ASSIGN expr
(84) var_define -> LET . var ASSIGN expr
(108) var -> . var [ expr ]
(109) var -> . ID
(125) getter -> . ID
(126) getter -> . getter . ID
ID shift and go to state 78
var shift and go to state 76
getter shift and go to state 77
state 8
(38) expr -> var .
(39) expr -> var . [ expr ]
(88) var_assign -> var . SHRASGN expr
(89) var_assign -> var . SHLASGN expr
(90) var_assign -> var . XORASGN expr
(91) var_assign -> var . ORASGN expr
(92) var_assign -> var . ANDASGN expr
(93) var_assign -> var . MODULOASGN expr
(94) var_assign -> var . SLASHASGN expr
(95) var_assign -> var . STARASGN expr
(96) var_assign -> var . MINUSASGN expr
(97) var_assign -> var . PLUSASGN expr
(98) var_assign -> var . ASSIGN RAW_INPUT
(99) var_assign -> var . ASSIGN expr
(108) var -> var . [ expr ]
SEP reduce using rule 38 (expr -> var .)
PERSENT reduce using rule 38 (expr -> var .)
DIV reduce using rule 38 (expr -> var .)
MUL reduce using rule 38 (expr -> var .)
SUB reduce using rule 38 (expr -> var .)
ADD reduce using rule 38 (expr -> var .)
% reduce using rule 38 (expr -> var .)
/ reduce using rule 38 (expr -> var .)
* reduce using rule 38 (expr -> var .)
- reduce using rule 38 (expr -> var .)
+ reduce using rule 38 (expr -> var .)
| reduce using rule 38 (expr -> var .)
^ reduce using rule 38 (expr -> var .)
& reduce using rule 38 (expr -> var .)
SHR reduce using rule 38 (expr -> var .)
SHL reduce using rule 38 (expr -> var .)
GREATER reduce using rule 38 (expr -> var .)
LESS reduce using rule 38 (expr -> var .)
OR reduce using rule 38 (expr -> var .)
AND reduce using rule 38 (expr -> var .)
GREATEREQ reduce using rule 38 (expr -> var .)
LESSEQ reduce using rule 38 (expr -> var .)
NOTEQ reduce using rule 38 (expr -> var .)
EQEQ reduce using rule 38 (expr -> var .)
ID reduce using rule 38 (expr -> var .)
? reduce using rule 38 (expr -> var .)
[ shift and go to state 79
SHRASGN shift and go to state 80
SHLASGN shift and go to state 81
XORASGN shift and go to state 82
ORASGN shift and go to state 83
ANDASGN shift and go to state 84
MODULOASGN shift and go to state 85
SLASHASGN shift and go to state 86
STARASGN shift and go to state 87
MINUSASGN shift and go to state 88
PLUSASGN shift and go to state 89
ASSIGN shift and go to state 90
state 9
(8) statement -> PRINT . expr
(35) expr -> . getter
(36) expr -> . { member_list }
(37) expr -> . NIL
(38) expr -> . var
(39) expr -> . var [ expr ]
(40) expr -> . list_val
(41) expr -> . FALSE
(42) expr -> . TRUE
(43) expr -> . STRING
(44) expr -> . FLOAT
(45) expr -> . INT
(46) expr -> . ( expr )
(47) expr -> . expr PERSENT expr
(48) expr -> . expr DIV expr
(49) expr -> . expr MUL expr
(50) expr -> . expr SUB expr
(51) expr -> . expr ADD expr
(52) expr -> . expr % expr
(53) expr -> . expr / expr
(54) expr -> . expr * expr
(55) expr -> . expr - expr
(56) expr -> . expr + expr
(57) expr -> . ! expr
(58) expr -> . + expr
(59) expr -> . - expr
(60) expr -> . ~ expr
(61) expr -> . expr | expr
(62) expr -> . expr ^ expr
(63) expr -> . expr & expr
(64) expr -> . expr SHR expr
(65) expr -> . expr SHL expr
(66) expr -> . expr GREATER expr
(67) expr -> . expr LESS expr
(68) expr -> . expr OR expr
(69) expr -> . expr AND expr
(70) expr -> . expr GREATEREQ expr
(71) expr -> . expr LESSEQ expr
(72) expr -> . expr NOTEQ expr
(73) expr -> . expr EQEQ expr
(74) expr -> . expr ID ( args )
(75) expr -> . ID DOUBLECOLON ID ( args )
(76) expr -> . ID ( args )
(77) expr -> . expr ? expr : expr
(78) expr -> . TYPEOF expr
(79) expr -> . LAMBDA ( params ) ARROW expr
(80) expr -> . ID LEFTARROW { struct_init_exprs }
(125) getter -> . ID
(126) getter -> . getter . ID
(108) var -> . var [ expr ]
(109) var -> . ID
(104) list_val -> . [ exprs ]
{ shift and go to state 21
NIL shift and go to state 22
FALSE shift and go to state 25
TRUE shift and go to state 26
STRING shift and go to state 27
FLOAT shift and go to state 28
INT shift and go to state 29
( shift and go to state 30
! shift and go to state 33
+ shift and go to state 32
- shift and go to state 31
~ shift and go to state 34
ID shift and go to state 35
TYPEOF shift and go to state 36
LAMBDA shift and go to state 37
[ shift and go to state 23
expr shift and go to state 91
getter shift and go to state 20
var shift and go to state 92
list_val shift and go to state 24
state 10
(9) statement -> var_define . SEP
SEP shift and go to state 93
state 11
(10) statement -> class_definition .
LET reduce using rule 10 (statement -> class_definition .)
PRINT reduce using rule 10 (statement -> class_definition .)
RAW_INPUT reduce using rule 10 (statement -> class_definition .)
{ reduce using rule 10 (statement -> class_definition .)
NIL reduce using rule 10 (statement -> class_definition .)
FALSE reduce using rule 10 (statement -> class_definition .)
TRUE reduce using rule 10 (statement -> class_definition .)
STRING reduce using rule 10 (statement -> class_definition .)
FLOAT reduce using rule 10 (statement -> class_definition .)
INT reduce using rule 10 (statement -> class_definition .)
( reduce using rule 10 (statement -> class_definition .)
! reduce using rule 10 (statement -> class_definition .)
+ reduce using rule 10 (statement -> class_definition .)
- reduce using rule 10 (statement -> class_definition .)
~ reduce using rule 10 (statement -> class_definition .)
ID reduce using rule 10 (statement -> class_definition .)
TYPEOF reduce using rule 10 (statement -> class_definition .)
LAMBDA reduce using rule 10 (statement -> class_definition .)
DEC reduce using rule 10 (statement -> class_definition .)
INC reduce using rule 10 (statement -> class_definition .)
CLASS reduce using rule 10 (statement -> class_definition .)
STRUCT reduce using rule 10 (statement -> class_definition .)
IF reduce using rule 10 (statement -> class_definition .)
FOR reduce using rule 10 (statement -> class_definition .)
WHILE reduce using rule 10 (statement -> class_definition .)
RETURN reduce using rule 10 (statement -> class_definition .)
FN reduce using rule 10 (statement -> class_definition .)
IMPORT reduce using rule 10 (statement -> class_definition .)
[ reduce using rule 10 (statement -> class_definition .)
$end reduce using rule 10 (statement -> class_definition .)
} reduce using rule 10 (statement -> class_definition .)
ELSE reduce using rule 10 (statement -> class_definition .)
state 12
(11) statement -> struct_definition .
LET reduce using rule 11 (statement -> struct_definition .)
PRINT reduce using rule 11 (statement -> struct_definition .)
RAW_INPUT reduce using rule 11 (statement -> struct_definition .)
{ reduce using rule 11 (statement -> struct_definition .)
NIL reduce using rule 11 (statement -> struct_definition .)
FALSE reduce using rule 11 (statement -> struct_definition .)
TRUE reduce using rule 11 (statement -> struct_definition .)
STRING reduce using rule 11 (statement -> struct_definition .)
FLOAT reduce using rule 11 (statement -> struct_definition .)
INT reduce using rule 11 (statement -> struct_definition .)
( reduce using rule 11 (statement -> struct_definition .)
! reduce using rule 11 (statement -> struct_definition .)
+ reduce using rule 11 (statement -> struct_definition .)
- reduce using rule 11 (statement -> struct_definition .)
~ reduce using rule 11 (statement -> struct_definition .)
ID reduce using rule 11 (statement -> struct_definition .)
TYPEOF reduce using rule 11 (statement -> struct_definition .)
LAMBDA reduce using rule 11 (statement -> struct_definition .)
DEC reduce using rule 11 (statement -> struct_definition .)
INC reduce using rule 11 (statement -> struct_definition .)
CLASS reduce using rule 11 (statement -> struct_definition .)
STRUCT reduce using rule 11 (statement -> struct_definition .)
IF reduce using rule 11 (statement -> struct_definition .)
FOR reduce using rule 11 (statement -> struct_definition .)
WHILE reduce using rule 11 (statement -> struct_definition .)
RETURN reduce using rule 11 (statement -> struct_definition .)
FN reduce using rule 11 (statement -> struct_definition .)
IMPORT reduce using rule 11 (statement -> struct_definition .)
[ reduce using rule 11 (statement -> struct_definition .)
$end reduce using rule 11 (statement -> struct_definition .)
} reduce using rule 11 (statement -> struct_definition .)
ELSE reduce using rule 11 (statement -> struct_definition .)
state 13
(12) statement -> if_statement .
LET reduce using rule 12 (statement -> if_statement .)
PRINT reduce using rule 12 (statement -> if_statement .)
RAW_INPUT reduce using rule 12 (statement -> if_statement .)
{ reduce using rule 12 (statement -> if_statement .)
NIL reduce using rule 12 (statement -> if_statement .)
FALSE reduce using rule 12 (statement -> if_statement .)
TRUE reduce using rule 12 (statement -> if_statement .)
STRING reduce using rule 12 (statement -> if_statement .)
FLOAT reduce using rule 12 (statement -> if_statement .)
INT reduce using rule 12 (statement -> if_statement .)
( reduce using rule 12 (statement -> if_statement .)
! reduce using rule 12 (statement -> if_statement .)
+ reduce using rule 12 (statement -> if_statement .)
- reduce using rule 12 (statement -> if_statement .)
~ reduce using rule 12 (statement -> if_statement .)
ID reduce using rule 12 (statement -> if_statement .)
TYPEOF reduce using rule 12 (statement -> if_statement .)
LAMBDA reduce using rule 12 (statement -> if_statement .)
DEC reduce using rule 12 (statement -> if_statement .)
INC reduce using rule 12 (statement -> if_statement .)
CLASS reduce using rule 12 (statement -> if_statement .)
STRUCT reduce using rule 12 (statement -> if_statement .)
IF reduce using rule 12 (statement -> if_statement .)
FOR reduce using rule 12 (statement -> if_statement .)
WHILE reduce using rule 12 (statement -> if_statement .)
RETURN reduce using rule 12 (statement -> if_statement .)
FN reduce using rule 12 (statement -> if_statement .)
IMPORT reduce using rule 12 (statement -> if_statement .)
[ reduce using rule 12 (statement -> if_statement .)
$end reduce using rule 12 (statement -> if_statement .)
} reduce using rule 12 (statement -> if_statement .)
ELSE reduce using rule 12 (statement -> if_statement .)
state 14
(13) statement -> for_statement .
LET reduce using rule 13 (statement -> for_statement .)
PRINT reduce using rule 13 (statement -> for_statement .)
RAW_INPUT reduce using rule 13 (statement -> for_statement .)
{ reduce using rule 13 (statement -> for_statement .)
NIL reduce using rule 13 (statement -> for_statement .)
FALSE reduce using rule 13 (statement -> for_statement .)
TRUE reduce using rule 13 (statement -> for_statement .)
STRING reduce using rule 13 (statement -> for_statement .)
FLOAT reduce using rule 13 (statement -> for_statement .)
INT reduce using rule 13 (statement -> for_statement .)
( reduce using rule 13 (statement -> for_statement .)
! reduce using rule 13 (statement -> for_statement .)
+ reduce using rule 13 (statement -> for_statement .)
- reduce using rule 13 (statement -> for_statement .)
~ reduce using rule 13 (statement -> for_statement .)
ID reduce using rule 13 (statement -> for_statement .)
TYPEOF reduce using rule 13 (statement -> for_statement .)
LAMBDA reduce using rule 13 (statement -> for_statement .)
DEC reduce using rule 13 (statement -> for_statement .)
INC reduce using rule 13 (statement -> for_statement .)
CLASS reduce using rule 13 (statement -> for_statement .)
STRUCT reduce using rule 13 (statement -> for_statement .)
IF reduce using rule 13 (statement -> for_statement .)
FOR reduce using rule 13 (statement -> for_statement .)
WHILE reduce using rule 13 (statement -> for_statement .)
RETURN reduce using rule 13 (statement -> for_statement .)
FN reduce using rule 13 (statement -> for_statement .)
IMPORT reduce using rule 13 (statement -> for_statement .)
[ reduce using rule 13 (statement -> for_statement .)
$end reduce using rule 13 (statement -> for_statement .)
} reduce using rule 13 (statement -> for_statement .)
ELSE reduce using rule 13 (statement -> for_statement .)
state 15
(14) statement -> while_statement .
LET reduce using rule 14 (statement -> while_statement .)
PRINT reduce using rule 14 (statement -> while_statement .)
RAW_INPUT reduce using rule 14 (statement -> while_statement .)
{ reduce using rule 14 (statement -> while_statement .)
NIL reduce using rule 14 (statement -> while_statement .)
FALSE reduce using rule 14 (statement -> while_statement .)
TRUE reduce using rule 14 (statement -> while_statement .)
STRING reduce using rule 14 (statement -> while_statement .)
FLOAT reduce using rule 14 (statement -> while_statement .)
INT reduce using rule 14 (statement -> while_statement .)
( reduce using rule 14 (statement -> while_statement .)
! reduce using rule 14 (statement -> while_statement .)
+ reduce using rule 14 (statement -> while_statement .)
- reduce using rule 14 (statement -> while_statement .)
~ reduce using rule 14 (statement -> while_statement .)
ID reduce using rule 14 (statement -> while_statement .)
TYPEOF reduce using rule 14 (statement -> while_statement .)
LAMBDA reduce using rule 14 (statement -> while_statement .)
DEC reduce using rule 14 (statement -> while_statement .)
INC reduce using rule 14 (statement -> while_statement .)
CLASS reduce using rule 14 (statement -> while_statement .)
STRUCT reduce using rule 14 (statement -> while_statement .)
IF reduce using rule 14 (statement -> while_statement .)
FOR reduce using rule 14 (statement -> while_statement .)
WHILE reduce using rule 14 (statement -> while_statement .)
RETURN reduce using rule 14 (statement -> while_statement .)
FN reduce using rule 14 (statement -> while_statement .)
IMPORT reduce using rule 14 (statement -> while_statement .)
[ reduce using rule 14 (statement -> while_statement .)
$end reduce using rule 14 (statement -> while_statement .)
} reduce using rule 14 (statement -> while_statement .)
ELSE reduce using rule 14 (statement -> while_statement .)
state 16
(15) statement -> return_statement .
LET reduce using rule 15 (statement -> return_statement .)
PRINT reduce using rule 15 (statement -> return_statement .)
RAW_INPUT reduce using rule 15 (statement -> return_statement .)
{ reduce using rule 15 (statement -> return_statement .)
NIL reduce using rule 15 (statement -> return_statement .)
FALSE reduce using rule 15 (statement -> return_statement .)