-
Notifications
You must be signed in to change notification settings - Fork 0
/
myanalyzer.output
3105 lines (2250 loc) · 110 KB
/
myanalyzer.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
Grammar
0 $accept: input $end
1 input: main_body
2 main_body: func_main
3 | translation_unit func_main
4 | func_main translation_unit
5 | translation_unit func_main translation_unit
6 translation_unit: external_declaration
7 | translation_unit external_declaration
8 external_declaration: decl
9 | func_list
10 decl: KW_LET let_decl_body
11 | KW_CONST const_decl_body
12 const_decl_body: const_decl_list DEL_COLON type_spec DEL_SEMICOLON
13 const_decl_list: const_decl_list DEL_COMMA const_decl_init
14 | const_decl_init
15 const_decl_init: decl_id OP_ASSIGN data_types
16 let_decl_body: let_decl_list DEL_COLON type_spec DEL_SEMICOLON
17 let_decl_list: let_decl_list DEL_COMMA let_decl_init
18 | let_decl_init
19 let_decl_init: decl_id
20 | decl_id OP_ASSIGN data_types
21 decl_id: TK_IDENT
22 | TK_IDENT DEL_LEFT_BRACKETS TK_INT DEL_RIGHT_BRACKETS
23 type_spec: KW_INT
24 | KW_BOOL
25 | KW_REAL
26 | KW_STRING
27 func_list: KW_CONST decl_id OP_ASSIGN DEL_LEFT_PARENTESIS func_param_list DEL_RIGHT_PARENTESIS DEL_COLON func_ret OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
28 func_main: KW_CONST KW_START OP_ASSIGN DEL_LEFT_PARENTESIS DEL_RIGHT_PARENTESIS DEL_COLON KW_INT OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
29 func_param_list: %empty
30 | func_param DEL_COMMA func_param DEL_COLON type_spec DEL_COMMA func_param_list
31 | func_param DEL_COMMA func_param DEL_COLON type_spec
32 | func_param DEL_COLON type_spec DEL_COMMA func_param_list
33 | func_param DEL_COLON type_spec
34 func_param: TK_IDENT
35 | TK_IDENT DEL_LEFT_BRACKETS DEL_RIGHT_BRACKETS
36 func_ret: type_spec
37 | DEL_LEFT_BRACKETS DEL_RIGHT_BRACKETS type_spec
38 func_var_list: %empty
39 | func_var_list DEL_COMMA expression
40 | expression
41 __statement_empty: %empty
42 | __statement_list
43 __statement_list: __statement_decl
44 | __statement_list __statement_decl
45 __statement_decl: decl
46 | __statement
47 __statement: decl_id OP_ASSIGN expression DEL_SEMICOLON
48 | __selection
49 | __iteration
50 | __function
51 | __return
52 __function: TK_IDENT DEL_LEFT_PARENTESIS func_var_list DEL_RIGHT_PARENTESIS DEL_SEMICOLON
53 __selection: KW_IF expression KW_THEN __statement_empty KW_FI DEL_SEMICOLON
54 | KW_IF expression KW_THEN __statement_empty KW_ELSE __statement_empty KW_FI DEL_SEMICOLON
55 __iteration: KW_WHILE expression KW_LOOP __statement_empty KW_POOL DEL_SEMICOLON
56 __return: KW_RETURN DEL_SEMICOLON
57 | KW_RETURN expression DEL_SEMICOLON
58 data_types: TK_IDENT
59 | TK_INT
60 | TK_REAL
61 | TK_STRING
62 | KW_TRUE
63 | KW_FALSE
64 specialExpr: data_types
65 | TK_IDENT DEL_LEFT_BRACKETS expression DEL_RIGHT_BRACKETS
66 | DEL_LEFT_PARENTESIS expression DEL_RIGHT_PARENTESIS
67 | TK_IDENT DEL_LEFT_PARENTESIS func_var_list DEL_RIGHT_PARENTESIS
68 notExpression: specialExpr
69 | KW_NOT signExpression
70 signExpression: notExpression
71 | OP_PLUS notExpression
72 | OP_MINUS notExpression
73 multiplicativeExpression: signExpression
74 | multiplicativeExpression OP_MUL signExpression
75 | multiplicativeExpression OP_DIV signExpression
76 | multiplicativeExpression OP_MOD signExpression
77 additiveExpression: multiplicativeExpression
78 | additiveExpression OP_PLUS multiplicativeExpression
79 | additiveExpression OP_MINUS multiplicativeExpression
80 relationalExpression: additiveExpression
81 | relationalExpression OP_EQUALS additiveExpression
82 | relationalExpression OP_NOT_EQUALS additiveExpression
83 | relationalExpression OP_SMALLER additiveExpression
84 | relationalExpression OP_SMALLER_EQUALS additiveExpression
85 logicalExpressions: relationalExpression
86 | logicalExpressions KW_AND relationalExpression
87 | logicalExpressions KW_OR relationalExpression
88 expression: logicalExpressions
Terminals, with rules where they appear
$end (0) 0
error (256)
TK_IDENT (258) 21 22 34 35 52 58 65 67
TK_INT (259) 22 59
TK_REAL (260) 60
TK_STRING (261) 61
KW_INT (262) 23 28
KW_REAL (263) 25
KW_BOOL (264) 24
KW_STRING (265) 26
KW_TRUE (266) 62
KW_FALSE (267) 63
KW_IF (268) 53 54
KW_THEN (269) 53 54
KW_ELSE (270) 54
KW_FI (271) 53 54
KW_WHILE (272) 55
KW_LOOP (273) 55
KW_POOL (274) 55
KW_CONST (275) 11 27 28
KW_LET (276) 10
KW_RETURN (277) 56 57
KW_AND (278) 86
KW_OR (279) 87
KW_START (280) 28
KW_NOT (281) 69
OP_PLUS (282) 71 78
OP_MINUS (283) 72 79
OP_MUL (284) 74
OP_DIV (285) 75
OP_MOD (286) 76
OP_EQUALS (287) 81
OP_NOT_EQUALS (288) 82
OP_SMALLER (289) 83
OP_SMALLER_EQUALS (290) 84
OP_ASSIGN (291) 15 20 27 28 47
OP_ARROW (292) 27 28
DEL_SEMICOLON (293) 12 16 27 28 47 52 53 54 55 56 57
DEL_LEFT_PARENTESIS (294) 27 28 52 66 67
DEL_RIGHT_PARENTESIS (295) 27 28 52 66 67
DEL_COMMA (296) 13 17 30 31 32 39
DEL_LEFT_BRACKETS (297) 22 35 37 65
DEL_RIGHT_BRACKETS (298) 22 35 37 65
DEL_COLON (299) 12 16 27 28 30 31 32 33
DEL_LEFT_CURLY_BRACKETS (300) 27 28
DEL_RIGHT_CURLY_BRACKETS (301) 27 28
Nonterminals, with rules where they appear
$accept (47)
on left: 0
input (48)
on left: 1, on right: 0
main_body (49)
on left: 2 3 4 5, on right: 1
translation_unit (50)
on left: 6 7, on right: 3 4 5 7
external_declaration (51)
on left: 8 9, on right: 6 7
decl (52)
on left: 10 11, on right: 8 45
const_decl_body (53)
on left: 12, on right: 11
const_decl_list (54)
on left: 13 14, on right: 12 13
const_decl_init (55)
on left: 15, on right: 13 14
let_decl_body (56)
on left: 16, on right: 10
let_decl_list (57)
on left: 17 18, on right: 16 17
let_decl_init (58)
on left: 19 20, on right: 17 18
decl_id (59)
on left: 21 22, on right: 15 19 20 27 47
type_spec (60)
on left: 23 24 25 26, on right: 12 16 30 31 32 33 36 37
func_list (61)
on left: 27, on right: 9
func_main (62)
on left: 28, on right: 2 3 4 5
func_param_list (63)
on left: 29 30 31 32 33, on right: 27 30 32
func_param (64)
on left: 34 35, on right: 30 31 32 33
func_ret (65)
on left: 36 37, on right: 27
func_var_list (66)
on left: 38 39 40, on right: 39 52 67
__statement_empty (67)
on left: 41 42, on right: 27 28 53 54 55
__statement_list (68)
on left: 43 44, on right: 42 44
__statement_decl (69)
on left: 45 46, on right: 43 44
__statement (70)
on left: 47 48 49 50 51, on right: 46
__function (71)
on left: 52, on right: 50
__selection (72)
on left: 53 54, on right: 48
__iteration (73)
on left: 55, on right: 49
__return (74)
on left: 56 57, on right: 51
data_types (75)
on left: 58 59 60 61 62 63, on right: 15 20 64
specialExpr (76)
on left: 64 65 66 67, on right: 68
notExpression (77)
on left: 68 69, on right: 70 71 72
signExpression (78)
on left: 70 71 72, on right: 69 73 74 75 76
multiplicativeExpression (79)
on left: 73 74 75 76, on right: 74 75 76 77 78 79
additiveExpression (80)
on left: 77 78 79, on right: 78 79 80 81 82 83 84
relationalExpression (81)
on left: 80 81 82 83 84, on right: 81 82 83 84 85 86 87
logicalExpressions (82)
on left: 85 86 87, on right: 86 87 88
expression (83)
on left: 88, on right: 39 40 47 53 54 55 57 65 66
State 0
0 $accept: . input $end
1 input: . main_body
2 main_body: . func_main
3 | . translation_unit func_main
4 | . func_main translation_unit
5 | . translation_unit func_main translation_unit
6 translation_unit: . external_declaration
7 | . translation_unit external_declaration
8 external_declaration: . decl
9 | . func_list
10 decl: . KW_LET let_decl_body
11 | . KW_CONST const_decl_body
27 func_list: . KW_CONST decl_id OP_ASSIGN DEL_LEFT_PARENTESIS func_param_list DEL_RIGHT_PARENTESIS DEL_COLON func_ret OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
28 func_main: . KW_CONST KW_START OP_ASSIGN DEL_LEFT_PARENTESIS DEL_RIGHT_PARENTESIS DEL_COLON KW_INT OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
KW_CONST shift, and go to state 1
KW_LET shift, and go to state 2
input go to state 3
main_body go to state 4
translation_unit go to state 5
external_declaration go to state 6
decl go to state 7
func_list go to state 8
func_main go to state 9
State 1
11 decl: KW_CONST . const_decl_body
12 const_decl_body: . const_decl_list DEL_COLON type_spec DEL_SEMICOLON
13 const_decl_list: . const_decl_list DEL_COMMA const_decl_init
14 | . const_decl_init
15 const_decl_init: . decl_id OP_ASSIGN data_types
21 decl_id: . TK_IDENT
22 | . TK_IDENT DEL_LEFT_BRACKETS TK_INT DEL_RIGHT_BRACKETS
27 func_list: KW_CONST . decl_id OP_ASSIGN DEL_LEFT_PARENTESIS func_param_list DEL_RIGHT_PARENTESIS DEL_COLON func_ret OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
28 func_main: KW_CONST . KW_START OP_ASSIGN DEL_LEFT_PARENTESIS DEL_RIGHT_PARENTESIS DEL_COLON KW_INT OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
TK_IDENT shift, and go to state 10
KW_START shift, and go to state 11
const_decl_body go to state 12
const_decl_list go to state 13
const_decl_init go to state 14
decl_id go to state 15
State 2
10 decl: KW_LET . let_decl_body
16 let_decl_body: . let_decl_list DEL_COLON type_spec DEL_SEMICOLON
17 let_decl_list: . let_decl_list DEL_COMMA let_decl_init
18 | . let_decl_init
19 let_decl_init: . decl_id
20 | . decl_id OP_ASSIGN data_types
21 decl_id: . TK_IDENT
22 | . TK_IDENT DEL_LEFT_BRACKETS TK_INT DEL_RIGHT_BRACKETS
TK_IDENT shift, and go to state 10
let_decl_body go to state 16
let_decl_list go to state 17
let_decl_init go to state 18
decl_id go to state 19
State 3
0 $accept: input . $end
$end shift, and go to state 20
State 4
1 input: main_body .
$default reduce using rule 1 (input)
State 5
3 main_body: translation_unit . func_main
5 | translation_unit . func_main translation_unit
7 translation_unit: translation_unit . external_declaration
8 external_declaration: . decl
9 | . func_list
10 decl: . KW_LET let_decl_body
11 | . KW_CONST const_decl_body
27 func_list: . KW_CONST decl_id OP_ASSIGN DEL_LEFT_PARENTESIS func_param_list DEL_RIGHT_PARENTESIS DEL_COLON func_ret OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
28 func_main: . KW_CONST KW_START OP_ASSIGN DEL_LEFT_PARENTESIS DEL_RIGHT_PARENTESIS DEL_COLON KW_INT OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
KW_CONST shift, and go to state 1
KW_LET shift, and go to state 2
external_declaration go to state 21
decl go to state 7
func_list go to state 8
func_main go to state 22
State 6
6 translation_unit: external_declaration .
$default reduce using rule 6 (translation_unit)
State 7
8 external_declaration: decl .
$default reduce using rule 8 (external_declaration)
State 8
9 external_declaration: func_list .
$default reduce using rule 9 (external_declaration)
State 9
2 main_body: func_main . [$end]
4 | func_main . translation_unit
6 translation_unit: . external_declaration
7 | . translation_unit external_declaration
8 external_declaration: . decl
9 | . func_list
10 decl: . KW_LET let_decl_body
11 | . KW_CONST const_decl_body
27 func_list: . KW_CONST decl_id OP_ASSIGN DEL_LEFT_PARENTESIS func_param_list DEL_RIGHT_PARENTESIS DEL_COLON func_ret OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
KW_CONST shift, and go to state 23
KW_LET shift, and go to state 2
$default reduce using rule 2 (main_body)
translation_unit go to state 24
external_declaration go to state 6
decl go to state 7
func_list go to state 8
State 10
21 decl_id: TK_IDENT . [OP_ASSIGN, DEL_COMMA, DEL_COLON]
22 | TK_IDENT . DEL_LEFT_BRACKETS TK_INT DEL_RIGHT_BRACKETS
DEL_LEFT_BRACKETS shift, and go to state 25
$default reduce using rule 21 (decl_id)
State 11
28 func_main: KW_CONST KW_START . OP_ASSIGN DEL_LEFT_PARENTESIS DEL_RIGHT_PARENTESIS DEL_COLON KW_INT OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
OP_ASSIGN shift, and go to state 26
State 12
11 decl: KW_CONST const_decl_body .
$default reduce using rule 11 (decl)
State 13
12 const_decl_body: const_decl_list . DEL_COLON type_spec DEL_SEMICOLON
13 const_decl_list: const_decl_list . DEL_COMMA const_decl_init
DEL_COMMA shift, and go to state 27
DEL_COLON shift, and go to state 28
State 14
14 const_decl_list: const_decl_init .
$default reduce using rule 14 (const_decl_list)
State 15
15 const_decl_init: decl_id . OP_ASSIGN data_types
27 func_list: KW_CONST decl_id . OP_ASSIGN DEL_LEFT_PARENTESIS func_param_list DEL_RIGHT_PARENTESIS DEL_COLON func_ret OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
OP_ASSIGN shift, and go to state 29
State 16
10 decl: KW_LET let_decl_body .
$default reduce using rule 10 (decl)
State 17
16 let_decl_body: let_decl_list . DEL_COLON type_spec DEL_SEMICOLON
17 let_decl_list: let_decl_list . DEL_COMMA let_decl_init
DEL_COMMA shift, and go to state 30
DEL_COLON shift, and go to state 31
State 18
18 let_decl_list: let_decl_init .
$default reduce using rule 18 (let_decl_list)
State 19
19 let_decl_init: decl_id . [DEL_COMMA, DEL_COLON]
20 | decl_id . OP_ASSIGN data_types
OP_ASSIGN shift, and go to state 32
$default reduce using rule 19 (let_decl_init)
State 20
0 $accept: input $end .
$default accept
State 21
7 translation_unit: translation_unit external_declaration .
$default reduce using rule 7 (translation_unit)
State 22
3 main_body: translation_unit func_main . [$end]
5 | translation_unit func_main . translation_unit
6 translation_unit: . external_declaration
7 | . translation_unit external_declaration
8 external_declaration: . decl
9 | . func_list
10 decl: . KW_LET let_decl_body
11 | . KW_CONST const_decl_body
27 func_list: . KW_CONST decl_id OP_ASSIGN DEL_LEFT_PARENTESIS func_param_list DEL_RIGHT_PARENTESIS DEL_COLON func_ret OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
KW_CONST shift, and go to state 23
KW_LET shift, and go to state 2
$default reduce using rule 3 (main_body)
translation_unit go to state 33
external_declaration go to state 6
decl go to state 7
func_list go to state 8
State 23
11 decl: KW_CONST . const_decl_body
12 const_decl_body: . const_decl_list DEL_COLON type_spec DEL_SEMICOLON
13 const_decl_list: . const_decl_list DEL_COMMA const_decl_init
14 | . const_decl_init
15 const_decl_init: . decl_id OP_ASSIGN data_types
21 decl_id: . TK_IDENT
22 | . TK_IDENT DEL_LEFT_BRACKETS TK_INT DEL_RIGHT_BRACKETS
27 func_list: KW_CONST . decl_id OP_ASSIGN DEL_LEFT_PARENTESIS func_param_list DEL_RIGHT_PARENTESIS DEL_COLON func_ret OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
TK_IDENT shift, and go to state 10
const_decl_body go to state 12
const_decl_list go to state 13
const_decl_init go to state 14
decl_id go to state 15
State 24
4 main_body: func_main translation_unit . [$end]
7 translation_unit: translation_unit . external_declaration
8 external_declaration: . decl
9 | . func_list
10 decl: . KW_LET let_decl_body
11 | . KW_CONST const_decl_body
27 func_list: . KW_CONST decl_id OP_ASSIGN DEL_LEFT_PARENTESIS func_param_list DEL_RIGHT_PARENTESIS DEL_COLON func_ret OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
KW_CONST shift, and go to state 23
KW_LET shift, and go to state 2
$default reduce using rule 4 (main_body)
external_declaration go to state 21
decl go to state 7
func_list go to state 8
State 25
22 decl_id: TK_IDENT DEL_LEFT_BRACKETS . TK_INT DEL_RIGHT_BRACKETS
TK_INT shift, and go to state 34
State 26
28 func_main: KW_CONST KW_START OP_ASSIGN . DEL_LEFT_PARENTESIS DEL_RIGHT_PARENTESIS DEL_COLON KW_INT OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
DEL_LEFT_PARENTESIS shift, and go to state 35
State 27
13 const_decl_list: const_decl_list DEL_COMMA . const_decl_init
15 const_decl_init: . decl_id OP_ASSIGN data_types
21 decl_id: . TK_IDENT
22 | . TK_IDENT DEL_LEFT_BRACKETS TK_INT DEL_RIGHT_BRACKETS
TK_IDENT shift, and go to state 10
const_decl_init go to state 36
decl_id go to state 37
State 28
12 const_decl_body: const_decl_list DEL_COLON . type_spec DEL_SEMICOLON
23 type_spec: . KW_INT
24 | . KW_BOOL
25 | . KW_REAL
26 | . KW_STRING
KW_INT shift, and go to state 38
KW_REAL shift, and go to state 39
KW_BOOL shift, and go to state 40
KW_STRING shift, and go to state 41
type_spec go to state 42
State 29
15 const_decl_init: decl_id OP_ASSIGN . data_types
27 func_list: KW_CONST decl_id OP_ASSIGN . DEL_LEFT_PARENTESIS func_param_list DEL_RIGHT_PARENTESIS DEL_COLON func_ret OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
58 data_types: . TK_IDENT
59 | . TK_INT
60 | . TK_REAL
61 | . TK_STRING
62 | . KW_TRUE
63 | . KW_FALSE
TK_IDENT shift, and go to state 43
TK_INT shift, and go to state 44
TK_REAL shift, and go to state 45
TK_STRING shift, and go to state 46
KW_TRUE shift, and go to state 47
KW_FALSE shift, and go to state 48
DEL_LEFT_PARENTESIS shift, and go to state 49
data_types go to state 50
State 30
17 let_decl_list: let_decl_list DEL_COMMA . let_decl_init
19 let_decl_init: . decl_id
20 | . decl_id OP_ASSIGN data_types
21 decl_id: . TK_IDENT
22 | . TK_IDENT DEL_LEFT_BRACKETS TK_INT DEL_RIGHT_BRACKETS
TK_IDENT shift, and go to state 10
let_decl_init go to state 51
decl_id go to state 19
State 31
16 let_decl_body: let_decl_list DEL_COLON . type_spec DEL_SEMICOLON
23 type_spec: . KW_INT
24 | . KW_BOOL
25 | . KW_REAL
26 | . KW_STRING
KW_INT shift, and go to state 38
KW_REAL shift, and go to state 39
KW_BOOL shift, and go to state 40
KW_STRING shift, and go to state 41
type_spec go to state 52
State 32
20 let_decl_init: decl_id OP_ASSIGN . data_types
58 data_types: . TK_IDENT
59 | . TK_INT
60 | . TK_REAL
61 | . TK_STRING
62 | . KW_TRUE
63 | . KW_FALSE
TK_IDENT shift, and go to state 43
TK_INT shift, and go to state 44
TK_REAL shift, and go to state 45
TK_STRING shift, and go to state 46
KW_TRUE shift, and go to state 47
KW_FALSE shift, and go to state 48
data_types go to state 53
State 33
5 main_body: translation_unit func_main translation_unit . [$end]
7 translation_unit: translation_unit . external_declaration
8 external_declaration: . decl
9 | . func_list
10 decl: . KW_LET let_decl_body
11 | . KW_CONST const_decl_body
27 func_list: . KW_CONST decl_id OP_ASSIGN DEL_LEFT_PARENTESIS func_param_list DEL_RIGHT_PARENTESIS DEL_COLON func_ret OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
KW_CONST shift, and go to state 23
KW_LET shift, and go to state 2
$default reduce using rule 5 (main_body)
external_declaration go to state 21
decl go to state 7
func_list go to state 8
State 34
22 decl_id: TK_IDENT DEL_LEFT_BRACKETS TK_INT . DEL_RIGHT_BRACKETS
DEL_RIGHT_BRACKETS shift, and go to state 54
State 35
28 func_main: KW_CONST KW_START OP_ASSIGN DEL_LEFT_PARENTESIS . DEL_RIGHT_PARENTESIS DEL_COLON KW_INT OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
DEL_RIGHT_PARENTESIS shift, and go to state 55
State 36
13 const_decl_list: const_decl_list DEL_COMMA const_decl_init .
$default reduce using rule 13 (const_decl_list)
State 37
15 const_decl_init: decl_id . OP_ASSIGN data_types
OP_ASSIGN shift, and go to state 56
State 38
23 type_spec: KW_INT .
$default reduce using rule 23 (type_spec)
State 39
25 type_spec: KW_REAL .
$default reduce using rule 25 (type_spec)
State 40
24 type_spec: KW_BOOL .
$default reduce using rule 24 (type_spec)
State 41
26 type_spec: KW_STRING .
$default reduce using rule 26 (type_spec)
State 42
12 const_decl_body: const_decl_list DEL_COLON type_spec . DEL_SEMICOLON
DEL_SEMICOLON shift, and go to state 57
State 43
58 data_types: TK_IDENT .
$default reduce using rule 58 (data_types)
State 44
59 data_types: TK_INT .
$default reduce using rule 59 (data_types)
State 45
60 data_types: TK_REAL .
$default reduce using rule 60 (data_types)
State 46
61 data_types: TK_STRING .
$default reduce using rule 61 (data_types)
State 47
62 data_types: KW_TRUE .
$default reduce using rule 62 (data_types)
State 48
63 data_types: KW_FALSE .
$default reduce using rule 63 (data_types)
State 49
27 func_list: KW_CONST decl_id OP_ASSIGN DEL_LEFT_PARENTESIS . func_param_list DEL_RIGHT_PARENTESIS DEL_COLON func_ret OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
29 func_param_list: . %empty [DEL_RIGHT_PARENTESIS]
30 | . func_param DEL_COMMA func_param DEL_COLON type_spec DEL_COMMA func_param_list
31 | . func_param DEL_COMMA func_param DEL_COLON type_spec
32 | . func_param DEL_COLON type_spec DEL_COMMA func_param_list
33 | . func_param DEL_COLON type_spec
34 func_param: . TK_IDENT
35 | . TK_IDENT DEL_LEFT_BRACKETS DEL_RIGHT_BRACKETS
TK_IDENT shift, and go to state 58
$default reduce using rule 29 (func_param_list)
func_param_list go to state 59
func_param go to state 60
State 50
15 const_decl_init: decl_id OP_ASSIGN data_types .
$default reduce using rule 15 (const_decl_init)
State 51
17 let_decl_list: let_decl_list DEL_COMMA let_decl_init .
$default reduce using rule 17 (let_decl_list)
State 52
16 let_decl_body: let_decl_list DEL_COLON type_spec . DEL_SEMICOLON
DEL_SEMICOLON shift, and go to state 61
State 53
20 let_decl_init: decl_id OP_ASSIGN data_types .
$default reduce using rule 20 (let_decl_init)
State 54
22 decl_id: TK_IDENT DEL_LEFT_BRACKETS TK_INT DEL_RIGHT_BRACKETS .
$default reduce using rule 22 (decl_id)
State 55
28 func_main: KW_CONST KW_START OP_ASSIGN DEL_LEFT_PARENTESIS DEL_RIGHT_PARENTESIS . DEL_COLON KW_INT OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
DEL_COLON shift, and go to state 62
State 56
15 const_decl_init: decl_id OP_ASSIGN . data_types
58 data_types: . TK_IDENT
59 | . TK_INT
60 | . TK_REAL
61 | . TK_STRING
62 | . KW_TRUE
63 | . KW_FALSE
TK_IDENT shift, and go to state 43
TK_INT shift, and go to state 44
TK_REAL shift, and go to state 45
TK_STRING shift, and go to state 46
KW_TRUE shift, and go to state 47
KW_FALSE shift, and go to state 48
data_types go to state 50
State 57
12 const_decl_body: const_decl_list DEL_COLON type_spec DEL_SEMICOLON .
$default reduce using rule 12 (const_decl_body)
State 58
34 func_param: TK_IDENT . [DEL_COMMA, DEL_COLON]
35 | TK_IDENT . DEL_LEFT_BRACKETS DEL_RIGHT_BRACKETS
DEL_LEFT_BRACKETS shift, and go to state 63
$default reduce using rule 34 (func_param)
State 59
27 func_list: KW_CONST decl_id OP_ASSIGN DEL_LEFT_PARENTESIS func_param_list . DEL_RIGHT_PARENTESIS DEL_COLON func_ret OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
DEL_RIGHT_PARENTESIS shift, and go to state 64
State 60
30 func_param_list: func_param . DEL_COMMA func_param DEL_COLON type_spec DEL_COMMA func_param_list
31 | func_param . DEL_COMMA func_param DEL_COLON type_spec
32 | func_param . DEL_COLON type_spec DEL_COMMA func_param_list
33 | func_param . DEL_COLON type_spec
DEL_COMMA shift, and go to state 65
DEL_COLON shift, and go to state 66
State 61
16 let_decl_body: let_decl_list DEL_COLON type_spec DEL_SEMICOLON .
$default reduce using rule 16 (let_decl_body)
State 62
28 func_main: KW_CONST KW_START OP_ASSIGN DEL_LEFT_PARENTESIS DEL_RIGHT_PARENTESIS DEL_COLON . KW_INT OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
KW_INT shift, and go to state 67
State 63
35 func_param: TK_IDENT DEL_LEFT_BRACKETS . DEL_RIGHT_BRACKETS
DEL_RIGHT_BRACKETS shift, and go to state 68
State 64
27 func_list: KW_CONST decl_id OP_ASSIGN DEL_LEFT_PARENTESIS func_param_list DEL_RIGHT_PARENTESIS . DEL_COLON func_ret OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
DEL_COLON shift, and go to state 69
State 65
30 func_param_list: func_param DEL_COMMA . func_param DEL_COLON type_spec DEL_COMMA func_param_list
31 | func_param DEL_COMMA . func_param DEL_COLON type_spec
34 func_param: . TK_IDENT
35 | . TK_IDENT DEL_LEFT_BRACKETS DEL_RIGHT_BRACKETS
TK_IDENT shift, and go to state 58
func_param go to state 70
State 66
23 type_spec: . KW_INT
24 | . KW_BOOL
25 | . KW_REAL
26 | . KW_STRING
32 func_param_list: func_param DEL_COLON . type_spec DEL_COMMA func_param_list
33 | func_param DEL_COLON . type_spec
KW_INT shift, and go to state 38
KW_REAL shift, and go to state 39
KW_BOOL shift, and go to state 40
KW_STRING shift, and go to state 41
type_spec go to state 71
State 67
28 func_main: KW_CONST KW_START OP_ASSIGN DEL_LEFT_PARENTESIS DEL_RIGHT_PARENTESIS DEL_COLON KW_INT . OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
OP_ARROW shift, and go to state 72
State 68
35 func_param: TK_IDENT DEL_LEFT_BRACKETS DEL_RIGHT_BRACKETS .
$default reduce using rule 35 (func_param)
State 69
23 type_spec: . KW_INT
24 | . KW_BOOL
25 | . KW_REAL
26 | . KW_STRING
27 func_list: KW_CONST decl_id OP_ASSIGN DEL_LEFT_PARENTESIS func_param_list DEL_RIGHT_PARENTESIS DEL_COLON . func_ret OP_ARROW DEL_LEFT_CURLY_BRACKETS __statement_empty DEL_RIGHT_CURLY_BRACKETS DEL_SEMICOLON
36 func_ret: . type_spec
37 | . DEL_LEFT_BRACKETS DEL_RIGHT_BRACKETS type_spec
KW_INT shift, and go to state 38