-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathparser.out
More file actions
5067 lines (3804 loc) · 284 KB
/
parser.out
File metadata and controls
5067 lines (3804 loc) · 284 KB
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
Created by PLY version 3.11 (http://www.dabeaz.com/ply)
Grammar
Rule 0 S' -> program
Rule 1 program -> statements
Rule 2 statements -> statements statement
Rule 3 statements -> statement
Rule 4 type_spec -> TYPE
Rule 5 type_spec -> TYPE ARROW TYPE
Rule 6 type_spec -> TANGENT ID TYPE
Rule 7 type_spec -> TYPE LBRACKET dimension_list RBRACKET
Rule 8 dimension_list -> dimension_spec
Rule 9 dimension_list -> dimension_spec COMMA dimension_list
Rule 10 dimension_spec -> PLUS NUMBER
Rule 11 dimension_spec -> MINUS NUMBER
Rule 12 dimension_spec -> NUMBER
Rule 13 dimension_spec -> ID
Rule 14 dimension_spec -> TYPE
Rule 15 statement -> DEF ID LPAREN params RPAREN COLON type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT
Rule 16 statement -> DEF ID LPAREN params RPAREN COLON type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT
Rule 17 func_body_stmts -> func_body_stmt
Rule 18 func_body_stmts -> func_body_stmts func_body_stmt
Rule 19 func_body_stmt -> ID EQUALS func_expr NEWLINE
Rule 20 func_body_stmt -> ID COLON type_spec EQUALS func_expr NEWLINE
Rule 21 func_body_stmt -> ID COMMA ID EQUALS func_expr NEWLINE
Rule 22 func_body_stmt -> ID COMMA ID COMMA ID EQUALS func_expr NEWLINE
Rule 23 func_body_stmt -> NEWLINE
Rule 24 statement -> DEF ID LPAREN params RPAREN COLON type_spec COLON NEWLINE INDENT func_init FOR ID COLON NEWLINE INDENT func_loop_body DEDENT NEWLINE RETURN func_expr DEDENT
Rule 25 func_init -> <empty>
Rule 26 func_init -> func_init func_init_stmt
Rule 27 func_init_stmt -> ID EQUALS func_expr NEWLINE
Rule 28 func_init_stmt -> NEWLINE
Rule 29 func_loop_body -> <empty>
Rule 30 func_loop_body -> func_loop_body func_loop_stmt
Rule 31 func_loop_stmt -> ID EQUALS func_expr NEWLINE
Rule 32 func_loop_stmt -> ID PLUSEQ func_expr NEWLINE
Rule 33 func_loop_stmt -> NEWLINE
Rule 34 statement -> CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
Rule 35 statement -> CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
Rule 36 statement -> CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEDENT
Rule 37 statement -> CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
Rule 38 statement -> CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEDENT
Rule 39 statement -> CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEDENT
Rule 40 statement -> CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT FOR ID COLON NEWLINE INDENT lambda_loop_body DEDENT RETURN func_expr NEWLINE DEDENT DEDENT
Rule 41 statement -> CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT FOR ID COLON NEWLINE INDENT lambda_loop_body DEDENT RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
Rule 42 lambda_loop_body -> <empty>
Rule 43 lambda_loop_body -> lambda_loop_body lambda_loop_stmt
Rule 44 lambda_loop_stmt -> ID EQUALS func_expr NEWLINE
Rule 45 lambda_loop_stmt -> NEWLINE
Rule 46 statement -> ID COLON type_spec EQUALS expr
Rule 47 statement -> ID EQUALS expr
Rule 48 statement -> expr
Rule 49 statement -> NEWLINE
Rule 50 statement -> FOR ID COLON NEWLINE INDENT for_body DEDENT
Rule 51 for_body -> <empty>
Rule 52 for_body -> for_body for_statement
Rule 53 for_statement -> ID EQUALS func_expr NEWLINE
Rule 54 for_statement -> ID PLUSEQ func_expr NEWLINE
Rule 55 for_statement -> ID LPAREN func_args RPAREN NEWLINE
Rule 56 for_statement -> NEWLINE
Rule 57 params -> <empty>
Rule 58 params -> ID COLON type_spec
Rule 59 params -> ID COLON type_spec COMMA params
Rule 60 func_expr -> func_expr PLUS func_term
Rule 61 func_expr -> func_expr MINUS func_term
Rule 62 func_expr -> func_term
Rule 63 func_term -> func_term TIMES func_factor
Rule 64 func_term -> func_term DIVIDE func_factor
Rule 65 func_term -> func_term MATMUL func_factor
Rule 66 func_term -> func_term POWER func_factor
Rule 67 func_term -> func_factor
Rule 68 func_factor -> NUMBER
Rule 69 func_factor -> ID
Rule 70 func_factor -> LPAREN func_expr RPAREN
Rule 71 func_factor -> ID LPAREN func_args RPAREN
Rule 72 func_factor -> ID LBRACKET func_expr RBRACKET
Rule 73 func_factor -> ID LPAREN func_args RPAREN LBRACKET func_expr RBRACKET
Rule 74 func_factor -> LBRACKET func_elements RBRACKET
Rule 75 func_factor -> STRING
Rule 76 func_factor -> IMAGINARY
Rule 77 func_elements -> func_expr
Rule 78 func_elements -> func_expr COMMA func_elements
Rule 79 func_args -> <empty>
Rule 80 func_args -> func_expr
Rule 81 func_args -> func_expr COMMA func_args
Rule 82 expr -> expr PLUS term
Rule 83 expr -> expr MINUS term
Rule 84 expr -> term
Rule 85 term -> term TIMES factor
Rule 86 term -> term DIVIDE factor
Rule 87 term -> term MATMUL factor
Rule 88 term -> term POWER factor
Rule 89 term -> factor
Rule 90 factor -> ID LPAREN args RPAREN
Rule 91 factor -> NUMBER
Rule 92 factor -> MINUS factor
Rule 93 factor -> ID
Rule 94 factor -> LPAREN expr RPAREN
Rule 95 factor -> LBRACKET elements RBRACKET
Rule 96 factor -> STRING
Rule 97 elements -> expr
Rule 98 elements -> expr COMMA elements
Rule 99 elements -> NEWLINE elements
Rule 100 elements -> elements NEWLINE
Rule 101 factor -> ID LBRACKET NUMBER RBRACKET
Rule 102 factor -> ID LBRACKET NUMBER COLON NUMBER RBRACKET
Rule 103 args -> <empty>
Rule 104 args -> expr
Rule 105 args -> expr COMMA args
Terminals, with rules where they appear
ARROW : 5 34 35 35 36 37 37 38 38 39 39 40 41 41
CLASS : 34 35 36 37 38 39 40 41
COLON : 15 15 16 16 20 24 24 24 34 34 35 35 35 36 36 37 37 37 38 38 38 39 39 39 40 40 40 41 41 41 41 46 50 58 59 102
COMMA : 9 21 22 22 59 78 81 98 105
DEDENT : 15 16 24 24 34 34 35 35 35 36 36 37 37 37 38 38 38 39 39 39 40 40 40 41 41 41 41 50
DEF : 15 16 24 34 35 35 36 37 37 38 38 39 39 40 41 41
DIVIDE : 64 86
EQUALS : 19 20 21 22 27 31 44 46 47 53
FOR : 24 40 41 50
ID : 6 13 15 16 19 20 21 21 22 22 22 24 24 27 31 32 34 35 35 36 37 37 38 38 39 39 40 40 41 41 41 44 46 47 50 53 54 55 58 59 69 71 72 73 90 93 101 102
IMAGINARY : 76
INDENT : 15 16 24 24 34 34 35 35 35 36 36 37 37 37 38 38 38 39 39 39 40 40 40 41 41 41 41 50
LAMBDA : 34 35 36 37 38 39 40 41
LBRACKET : 7 72 73 74 95 101 102
LPAREN : 15 16 24 34 34 35 35 35 36 36 37 37 37 38 38 38 39 39 39 40 40 41 41 41 55 70 71 73 90 94
MATMUL : 65 87
MINUS : 11 61 83 92
NEWLINE : 15 15 16 16 19 20 21 22 23 24 24 24 27 28 31 32 33 34 34 34 35 35 35 35 35 36 36 36 37 37 37 37 37 38 38 38 38 38 39 39 39 39 39 40 40 40 40 41 41 41 41 41 41 44 45 49 50 53 54 55 56 99 100
NUMBER : 10 11 12 68 91 101 102 102
PLUS : 10 60 82
PLUSEQ : 32 54
POWER : 66 88
RBRACKET : 7 72 73 74 95 101 102
RETURN : 15 16 24 34 35 35 36 37 37 38 38 39 39 40 41 41
RPAREN : 15 16 24 34 34 35 35 35 36 36 37 37 37 38 38 38 39 39 39 40 40 41 41 41 55 70 71 73 90 94
STRING : 75 96
TANGENT : 6
TIMES : 63 85
TYPE : 4 5 5 6 7 14
error :
Nonterminals, with rules where they appear
args : 90 105
dimension_list : 7 9
dimension_spec : 8 9
elements : 95 98 99 100
expr : 46 47 48 82 83 94 97 98 104 105
factor : 85 86 87 88 89 92
for_body : 50 52
for_statement : 52
func_args : 55 71 73 81
func_body_stmt : 17 18
func_body_stmts : 16 18 36 37 38 39 39
func_elements : 74 78
func_expr : 15 16 19 20 21 22 24 27 31 32 34 35 35 36 37 37 38 38 39 39 40 41 41 44 53 54 60 61 70 72 73 77 78 80 81
func_factor : 63 64 65 66 67
func_init : 24 26
func_init_stmt : 26
func_loop_body : 24 30
func_loop_stmt : 30
func_term : 60 61 62 63 64 65 66
lambda_loop_body : 40 41 43
lambda_loop_stmt : 43
params : 15 16 24 34 34 35 35 35 36 36 37 37 37 38 38 38 39 39 39 40 40 41 41 41 59
program : 0
statement : 2 3
statements : 1 2
term : 82 83 84 85 86 87 88
type_spec : 15 16 20 24 34 35 35 36 37 37 38 38 39 39 40 41 41 46 58 59
Parsing method: LALR
state 0
(0) S' -> . program
(1) program -> . statements
(2) statements -> . statements statement
(3) statements -> . statement
(15) statement -> . DEF ID LPAREN params RPAREN COLON type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT
(16) statement -> . DEF ID LPAREN params RPAREN COLON type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT
(24) statement -> . DEF ID LPAREN params RPAREN COLON type_spec COLON NEWLINE INDENT func_init FOR ID COLON NEWLINE INDENT func_loop_body DEDENT NEWLINE RETURN func_expr DEDENT
(34) statement -> . CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
(35) statement -> . CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
(36) statement -> . CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEDENT
(37) statement -> . CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
(38) statement -> . CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEDENT
(39) statement -> . CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEDENT
(40) statement -> . CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT FOR ID COLON NEWLINE INDENT lambda_loop_body DEDENT RETURN func_expr NEWLINE DEDENT DEDENT
(41) statement -> . CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT FOR ID COLON NEWLINE INDENT lambda_loop_body DEDENT RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
(46) statement -> . ID COLON type_spec EQUALS expr
(47) statement -> . ID EQUALS expr
(48) statement -> . expr
(49) statement -> . NEWLINE
(50) statement -> . FOR ID COLON NEWLINE INDENT for_body DEDENT
(82) expr -> . expr PLUS term
(83) expr -> . expr MINUS term
(84) expr -> . term
(85) term -> . term TIMES factor
(86) term -> . term DIVIDE factor
(87) term -> . term MATMUL factor
(88) term -> . term POWER factor
(89) term -> . factor
(90) factor -> . ID LPAREN args RPAREN
(91) factor -> . NUMBER
(92) factor -> . MINUS factor
(93) factor -> . ID
(94) factor -> . LPAREN expr RPAREN
(95) factor -> . LBRACKET elements RBRACKET
(96) factor -> . STRING
(101) factor -> . ID LBRACKET NUMBER RBRACKET
(102) factor -> . ID LBRACKET NUMBER COLON NUMBER RBRACKET
DEF shift and go to state 4
CLASS shift and go to state 9
ID shift and go to state 5
NEWLINE shift and go to state 7
FOR shift and go to state 8
NUMBER shift and go to state 14
MINUS shift and go to state 12
LPAREN shift and go to state 6
LBRACKET shift and go to state 15
STRING shift and go to state 16
program shift and go to state 1
statements shift and go to state 2
statement shift and go to state 3
expr shift and go to state 10
term shift and go to state 11
factor shift and go to state 13
state 1
(0) S' -> program .
state 2
(1) program -> statements .
(2) statements -> statements . statement
(15) statement -> . DEF ID LPAREN params RPAREN COLON type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT
(16) statement -> . DEF ID LPAREN params RPAREN COLON type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT
(24) statement -> . DEF ID LPAREN params RPAREN COLON type_spec COLON NEWLINE INDENT func_init FOR ID COLON NEWLINE INDENT func_loop_body DEDENT NEWLINE RETURN func_expr DEDENT
(34) statement -> . CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
(35) statement -> . CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
(36) statement -> . CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEDENT
(37) statement -> . CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
(38) statement -> . CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEDENT
(39) statement -> . CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEDENT
(40) statement -> . CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT FOR ID COLON NEWLINE INDENT lambda_loop_body DEDENT RETURN func_expr NEWLINE DEDENT DEDENT
(41) statement -> . CLASS ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT FOR ID COLON NEWLINE INDENT lambda_loop_body DEDENT RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
(46) statement -> . ID COLON type_spec EQUALS expr
(47) statement -> . ID EQUALS expr
(48) statement -> . expr
(49) statement -> . NEWLINE
(50) statement -> . FOR ID COLON NEWLINE INDENT for_body DEDENT
(82) expr -> . expr PLUS term
(83) expr -> . expr MINUS term
(84) expr -> . term
(85) term -> . term TIMES factor
(86) term -> . term DIVIDE factor
(87) term -> . term MATMUL factor
(88) term -> . term POWER factor
(89) term -> . factor
(90) factor -> . ID LPAREN args RPAREN
(91) factor -> . NUMBER
(92) factor -> . MINUS factor
(93) factor -> . ID
(94) factor -> . LPAREN expr RPAREN
(95) factor -> . LBRACKET elements RBRACKET
(96) factor -> . STRING
(101) factor -> . ID LBRACKET NUMBER RBRACKET
(102) factor -> . ID LBRACKET NUMBER COLON NUMBER RBRACKET
$end reduce using rule 1 (program -> statements .)
DEF shift and go to state 4
CLASS shift and go to state 9
ID shift and go to state 5
NEWLINE shift and go to state 7
FOR shift and go to state 8
NUMBER shift and go to state 14
MINUS shift and go to state 12
LPAREN shift and go to state 6
LBRACKET shift and go to state 15
STRING shift and go to state 16
statement shift and go to state 17
expr shift and go to state 10
term shift and go to state 11
factor shift and go to state 13
state 3
(3) statements -> statement .
DEF reduce using rule 3 (statements -> statement .)
CLASS reduce using rule 3 (statements -> statement .)
ID reduce using rule 3 (statements -> statement .)
NEWLINE reduce using rule 3 (statements -> statement .)
FOR reduce using rule 3 (statements -> statement .)
NUMBER reduce using rule 3 (statements -> statement .)
MINUS reduce using rule 3 (statements -> statement .)
LPAREN reduce using rule 3 (statements -> statement .)
LBRACKET reduce using rule 3 (statements -> statement .)
STRING reduce using rule 3 (statements -> statement .)
$end reduce using rule 3 (statements -> statement .)
state 4
(15) statement -> DEF . ID LPAREN params RPAREN COLON type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT
(16) statement -> DEF . ID LPAREN params RPAREN COLON type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT
(24) statement -> DEF . ID LPAREN params RPAREN COLON type_spec COLON NEWLINE INDENT func_init FOR ID COLON NEWLINE INDENT func_loop_body DEDENT NEWLINE RETURN func_expr DEDENT
ID shift and go to state 18
state 5
(46) statement -> ID . COLON type_spec EQUALS expr
(47) statement -> ID . EQUALS expr
(90) factor -> ID . LPAREN args RPAREN
(93) factor -> ID .
(101) factor -> ID . LBRACKET NUMBER RBRACKET
(102) factor -> ID . LBRACKET NUMBER COLON NUMBER RBRACKET
! shift/reduce conflict for LPAREN resolved as shift
! shift/reduce conflict for LBRACKET resolved as shift
COLON shift and go to state 19
EQUALS shift and go to state 20
LPAREN shift and go to state 21
TIMES reduce using rule 93 (factor -> ID .)
DIVIDE reduce using rule 93 (factor -> ID .)
MATMUL reduce using rule 93 (factor -> ID .)
POWER reduce using rule 93 (factor -> ID .)
PLUS reduce using rule 93 (factor -> ID .)
MINUS reduce using rule 93 (factor -> ID .)
DEF reduce using rule 93 (factor -> ID .)
CLASS reduce using rule 93 (factor -> ID .)
ID reduce using rule 93 (factor -> ID .)
NEWLINE reduce using rule 93 (factor -> ID .)
FOR reduce using rule 93 (factor -> ID .)
NUMBER reduce using rule 93 (factor -> ID .)
STRING reduce using rule 93 (factor -> ID .)
$end reduce using rule 93 (factor -> ID .)
LBRACKET shift and go to state 22
! LPAREN [ reduce using rule 93 (factor -> ID .) ]
! LBRACKET [ reduce using rule 93 (factor -> ID .) ]
state 6
(94) factor -> LPAREN . expr RPAREN
(82) expr -> . expr PLUS term
(83) expr -> . expr MINUS term
(84) expr -> . term
(85) term -> . term TIMES factor
(86) term -> . term DIVIDE factor
(87) term -> . term MATMUL factor
(88) term -> . term POWER factor
(89) term -> . factor
(90) factor -> . ID LPAREN args RPAREN
(91) factor -> . NUMBER
(92) factor -> . MINUS factor
(93) factor -> . ID
(94) factor -> . LPAREN expr RPAREN
(95) factor -> . LBRACKET elements RBRACKET
(96) factor -> . STRING
(101) factor -> . ID LBRACKET NUMBER RBRACKET
(102) factor -> . ID LBRACKET NUMBER COLON NUMBER RBRACKET
ID shift and go to state 24
NUMBER shift and go to state 14
MINUS shift and go to state 12
LPAREN shift and go to state 6
LBRACKET shift and go to state 15
STRING shift and go to state 16
expr shift and go to state 23
term shift and go to state 11
factor shift and go to state 13
state 7
(49) statement -> NEWLINE .
DEF reduce using rule 49 (statement -> NEWLINE .)
CLASS reduce using rule 49 (statement -> NEWLINE .)
ID reduce using rule 49 (statement -> NEWLINE .)
NEWLINE reduce using rule 49 (statement -> NEWLINE .)
FOR reduce using rule 49 (statement -> NEWLINE .)
NUMBER reduce using rule 49 (statement -> NEWLINE .)
MINUS reduce using rule 49 (statement -> NEWLINE .)
LPAREN reduce using rule 49 (statement -> NEWLINE .)
LBRACKET reduce using rule 49 (statement -> NEWLINE .)
STRING reduce using rule 49 (statement -> NEWLINE .)
$end reduce using rule 49 (statement -> NEWLINE .)
state 8
(50) statement -> FOR . ID COLON NEWLINE INDENT for_body DEDENT
ID shift and go to state 25
state 9
(34) statement -> CLASS . ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
(35) statement -> CLASS . ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
(36) statement -> CLASS . ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEDENT
(37) statement -> CLASS . ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
(38) statement -> CLASS . ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEDENT
(39) statement -> CLASS . ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEDENT
(40) statement -> CLASS . ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT FOR ID COLON NEWLINE INDENT lambda_loop_body DEDENT RETURN func_expr NEWLINE DEDENT DEDENT
(41) statement -> CLASS . ID LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT FOR ID COLON NEWLINE INDENT lambda_loop_body DEDENT RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
ID shift and go to state 26
state 10
(48) statement -> expr .
(82) expr -> expr . PLUS term
(83) expr -> expr . MINUS term
! shift/reduce conflict for MINUS resolved as shift
DEF reduce using rule 48 (statement -> expr .)
CLASS reduce using rule 48 (statement -> expr .)
ID reduce using rule 48 (statement -> expr .)
NEWLINE reduce using rule 48 (statement -> expr .)
FOR reduce using rule 48 (statement -> expr .)
NUMBER reduce using rule 48 (statement -> expr .)
LPAREN reduce using rule 48 (statement -> expr .)
LBRACKET reduce using rule 48 (statement -> expr .)
STRING reduce using rule 48 (statement -> expr .)
$end reduce using rule 48 (statement -> expr .)
PLUS shift and go to state 27
MINUS shift and go to state 28
! MINUS [ reduce using rule 48 (statement -> expr .) ]
state 11
(84) expr -> term .
(85) term -> term . TIMES factor
(86) term -> term . DIVIDE factor
(87) term -> term . MATMUL factor
(88) term -> term . POWER factor
PLUS reduce using rule 84 (expr -> term .)
MINUS reduce using rule 84 (expr -> term .)
DEF reduce using rule 84 (expr -> term .)
CLASS reduce using rule 84 (expr -> term .)
ID reduce using rule 84 (expr -> term .)
NEWLINE reduce using rule 84 (expr -> term .)
FOR reduce using rule 84 (expr -> term .)
NUMBER reduce using rule 84 (expr -> term .)
LPAREN reduce using rule 84 (expr -> term .)
LBRACKET reduce using rule 84 (expr -> term .)
STRING reduce using rule 84 (expr -> term .)
$end reduce using rule 84 (expr -> term .)
RPAREN reduce using rule 84 (expr -> term .)
COMMA reduce using rule 84 (expr -> term .)
RBRACKET reduce using rule 84 (expr -> term .)
TIMES shift and go to state 29
DIVIDE shift and go to state 30
MATMUL shift and go to state 31
POWER shift and go to state 32
state 12
(92) factor -> MINUS . factor
(90) factor -> . ID LPAREN args RPAREN
(91) factor -> . NUMBER
(92) factor -> . MINUS factor
(93) factor -> . ID
(94) factor -> . LPAREN expr RPAREN
(95) factor -> . LBRACKET elements RBRACKET
(96) factor -> . STRING
(101) factor -> . ID LBRACKET NUMBER RBRACKET
(102) factor -> . ID LBRACKET NUMBER COLON NUMBER RBRACKET
ID shift and go to state 24
NUMBER shift and go to state 14
MINUS shift and go to state 12
LPAREN shift and go to state 6
LBRACKET shift and go to state 15
STRING shift and go to state 16
factor shift and go to state 33
state 13
(89) term -> factor .
TIMES reduce using rule 89 (term -> factor .)
DIVIDE reduce using rule 89 (term -> factor .)
MATMUL reduce using rule 89 (term -> factor .)
POWER reduce using rule 89 (term -> factor .)
PLUS reduce using rule 89 (term -> factor .)
MINUS reduce using rule 89 (term -> factor .)
DEF reduce using rule 89 (term -> factor .)
CLASS reduce using rule 89 (term -> factor .)
ID reduce using rule 89 (term -> factor .)
NEWLINE reduce using rule 89 (term -> factor .)
FOR reduce using rule 89 (term -> factor .)
NUMBER reduce using rule 89 (term -> factor .)
LPAREN reduce using rule 89 (term -> factor .)
LBRACKET reduce using rule 89 (term -> factor .)
STRING reduce using rule 89 (term -> factor .)
$end reduce using rule 89 (term -> factor .)
RPAREN reduce using rule 89 (term -> factor .)
COMMA reduce using rule 89 (term -> factor .)
RBRACKET reduce using rule 89 (term -> factor .)
state 14
(91) factor -> NUMBER .
TIMES reduce using rule 91 (factor -> NUMBER .)
DIVIDE reduce using rule 91 (factor -> NUMBER .)
MATMUL reduce using rule 91 (factor -> NUMBER .)
POWER reduce using rule 91 (factor -> NUMBER .)
PLUS reduce using rule 91 (factor -> NUMBER .)
MINUS reduce using rule 91 (factor -> NUMBER .)
DEF reduce using rule 91 (factor -> NUMBER .)
CLASS reduce using rule 91 (factor -> NUMBER .)
ID reduce using rule 91 (factor -> NUMBER .)
NEWLINE reduce using rule 91 (factor -> NUMBER .)
FOR reduce using rule 91 (factor -> NUMBER .)
NUMBER reduce using rule 91 (factor -> NUMBER .)
LPAREN reduce using rule 91 (factor -> NUMBER .)
LBRACKET reduce using rule 91 (factor -> NUMBER .)
STRING reduce using rule 91 (factor -> NUMBER .)
$end reduce using rule 91 (factor -> NUMBER .)
RPAREN reduce using rule 91 (factor -> NUMBER .)
COMMA reduce using rule 91 (factor -> NUMBER .)
RBRACKET reduce using rule 91 (factor -> NUMBER .)
state 15
(95) factor -> LBRACKET . elements RBRACKET
(97) elements -> . expr
(98) elements -> . expr COMMA elements
(99) elements -> . NEWLINE elements
(100) elements -> . elements NEWLINE
(82) expr -> . expr PLUS term
(83) expr -> . expr MINUS term
(84) expr -> . term
(85) term -> . term TIMES factor
(86) term -> . term DIVIDE factor
(87) term -> . term MATMUL factor
(88) term -> . term POWER factor
(89) term -> . factor
(90) factor -> . ID LPAREN args RPAREN
(91) factor -> . NUMBER
(92) factor -> . MINUS factor
(93) factor -> . ID
(94) factor -> . LPAREN expr RPAREN
(95) factor -> . LBRACKET elements RBRACKET
(96) factor -> . STRING
(101) factor -> . ID LBRACKET NUMBER RBRACKET
(102) factor -> . ID LBRACKET NUMBER COLON NUMBER RBRACKET
NEWLINE shift and go to state 36
ID shift and go to state 24
NUMBER shift and go to state 14
MINUS shift and go to state 12
LPAREN shift and go to state 6
LBRACKET shift and go to state 15
STRING shift and go to state 16
elements shift and go to state 34
expr shift and go to state 35
term shift and go to state 11
factor shift and go to state 13
state 16
(96) factor -> STRING .
TIMES reduce using rule 96 (factor -> STRING .)
DIVIDE reduce using rule 96 (factor -> STRING .)
MATMUL reduce using rule 96 (factor -> STRING .)
POWER reduce using rule 96 (factor -> STRING .)
PLUS reduce using rule 96 (factor -> STRING .)
MINUS reduce using rule 96 (factor -> STRING .)
DEF reduce using rule 96 (factor -> STRING .)
CLASS reduce using rule 96 (factor -> STRING .)
ID reduce using rule 96 (factor -> STRING .)
NEWLINE reduce using rule 96 (factor -> STRING .)
FOR reduce using rule 96 (factor -> STRING .)
NUMBER reduce using rule 96 (factor -> STRING .)
LPAREN reduce using rule 96 (factor -> STRING .)
LBRACKET reduce using rule 96 (factor -> STRING .)
STRING reduce using rule 96 (factor -> STRING .)
$end reduce using rule 96 (factor -> STRING .)
RPAREN reduce using rule 96 (factor -> STRING .)
COMMA reduce using rule 96 (factor -> STRING .)
RBRACKET reduce using rule 96 (factor -> STRING .)
state 17
(2) statements -> statements statement .
DEF reduce using rule 2 (statements -> statements statement .)
CLASS reduce using rule 2 (statements -> statements statement .)
ID reduce using rule 2 (statements -> statements statement .)
NEWLINE reduce using rule 2 (statements -> statements statement .)
FOR reduce using rule 2 (statements -> statements statement .)
NUMBER reduce using rule 2 (statements -> statements statement .)
MINUS reduce using rule 2 (statements -> statements statement .)
LPAREN reduce using rule 2 (statements -> statements statement .)
LBRACKET reduce using rule 2 (statements -> statements statement .)
STRING reduce using rule 2 (statements -> statements statement .)
$end reduce using rule 2 (statements -> statements statement .)
state 18
(15) statement -> DEF ID . LPAREN params RPAREN COLON type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT
(16) statement -> DEF ID . LPAREN params RPAREN COLON type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT
(24) statement -> DEF ID . LPAREN params RPAREN COLON type_spec COLON NEWLINE INDENT func_init FOR ID COLON NEWLINE INDENT func_loop_body DEDENT NEWLINE RETURN func_expr DEDENT
LPAREN shift and go to state 37
state 19
(46) statement -> ID COLON . type_spec EQUALS expr
(4) type_spec -> . TYPE
(5) type_spec -> . TYPE ARROW TYPE
(6) type_spec -> . TANGENT ID TYPE
(7) type_spec -> . TYPE LBRACKET dimension_list RBRACKET
TYPE shift and go to state 39
TANGENT shift and go to state 40
type_spec shift and go to state 38
state 20
(47) statement -> ID EQUALS . expr
(82) expr -> . expr PLUS term
(83) expr -> . expr MINUS term
(84) expr -> . term
(85) term -> . term TIMES factor
(86) term -> . term DIVIDE factor
(87) term -> . term MATMUL factor
(88) term -> . term POWER factor
(89) term -> . factor
(90) factor -> . ID LPAREN args RPAREN
(91) factor -> . NUMBER
(92) factor -> . MINUS factor
(93) factor -> . ID
(94) factor -> . LPAREN expr RPAREN
(95) factor -> . LBRACKET elements RBRACKET
(96) factor -> . STRING
(101) factor -> . ID LBRACKET NUMBER RBRACKET
(102) factor -> . ID LBRACKET NUMBER COLON NUMBER RBRACKET
ID shift and go to state 24
NUMBER shift and go to state 14
MINUS shift and go to state 12
LPAREN shift and go to state 6
LBRACKET shift and go to state 15
STRING shift and go to state 16
expr shift and go to state 41
term shift and go to state 11
factor shift and go to state 13
state 21
(90) factor -> ID LPAREN . args RPAREN
(103) args -> .
(104) args -> . expr
(105) args -> . expr COMMA args
(82) expr -> . expr PLUS term
(83) expr -> . expr MINUS term
(84) expr -> . term
(85) term -> . term TIMES factor
(86) term -> . term DIVIDE factor
(87) term -> . term MATMUL factor
(88) term -> . term POWER factor
(89) term -> . factor
(90) factor -> . ID LPAREN args RPAREN
(91) factor -> . NUMBER
(92) factor -> . MINUS factor
(93) factor -> . ID
(94) factor -> . LPAREN expr RPAREN
(95) factor -> . LBRACKET elements RBRACKET
(96) factor -> . STRING
(101) factor -> . ID LBRACKET NUMBER RBRACKET
(102) factor -> . ID LBRACKET NUMBER COLON NUMBER RBRACKET
RPAREN reduce using rule 103 (args -> .)
ID shift and go to state 24
NUMBER shift and go to state 14
MINUS shift and go to state 12
LPAREN shift and go to state 6
LBRACKET shift and go to state 15
STRING shift and go to state 16
args shift and go to state 42
expr shift and go to state 43
term shift and go to state 11
factor shift and go to state 13
state 22
(101) factor -> ID LBRACKET . NUMBER RBRACKET
(102) factor -> ID LBRACKET . NUMBER COLON NUMBER RBRACKET
NUMBER shift and go to state 44
state 23
(94) factor -> LPAREN expr . RPAREN
(82) expr -> expr . PLUS term
(83) expr -> expr . MINUS term
RPAREN shift and go to state 45
PLUS shift and go to state 27
MINUS shift and go to state 28
state 24
(90) factor -> ID . LPAREN args RPAREN
(93) factor -> ID .
(101) factor -> ID . LBRACKET NUMBER RBRACKET
(102) factor -> ID . LBRACKET NUMBER COLON NUMBER RBRACKET
! shift/reduce conflict for LPAREN resolved as shift
! shift/reduce conflict for LBRACKET resolved as shift
LPAREN shift and go to state 21
TIMES reduce using rule 93 (factor -> ID .)
DIVIDE reduce using rule 93 (factor -> ID .)
MATMUL reduce using rule 93 (factor -> ID .)
POWER reduce using rule 93 (factor -> ID .)
RPAREN reduce using rule 93 (factor -> ID .)
PLUS reduce using rule 93 (factor -> ID .)
MINUS reduce using rule 93 (factor -> ID .)
DEF reduce using rule 93 (factor -> ID .)
CLASS reduce using rule 93 (factor -> ID .)
ID reduce using rule 93 (factor -> ID .)
NEWLINE reduce using rule 93 (factor -> ID .)
FOR reduce using rule 93 (factor -> ID .)
NUMBER reduce using rule 93 (factor -> ID .)
STRING reduce using rule 93 (factor -> ID .)
$end reduce using rule 93 (factor -> ID .)
COMMA reduce using rule 93 (factor -> ID .)
RBRACKET reduce using rule 93 (factor -> ID .)
LBRACKET shift and go to state 22
! LPAREN [ reduce using rule 93 (factor -> ID .) ]
! LBRACKET [ reduce using rule 93 (factor -> ID .) ]
state 25
(50) statement -> FOR ID . COLON NEWLINE INDENT for_body DEDENT
COLON shift and go to state 46
state 26
(34) statement -> CLASS ID . LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
(35) statement -> CLASS ID . LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
(36) statement -> CLASS ID . LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEDENT
(37) statement -> CLASS ID . LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
(38) statement -> CLASS ID . LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEDENT
(39) statement -> CLASS ID . LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT func_body_stmts RETURN func_expr NEWLINE DEDENT DEDENT
(40) statement -> CLASS ID . LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT FOR ID COLON NEWLINE INDENT lambda_loop_body DEDENT RETURN func_expr NEWLINE DEDENT DEDENT
(41) statement -> CLASS ID . LPAREN params RPAREN COLON NEWLINE INDENT DEF LAMBDA LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT FOR ID COLON NEWLINE INDENT lambda_loop_body DEDENT RETURN func_expr NEWLINE DEDENT DEF ID LPAREN params RPAREN ARROW type_spec COLON NEWLINE INDENT RETURN func_expr NEWLINE DEDENT DEDENT
LPAREN shift and go to state 47
state 27
(82) expr -> expr PLUS . term
(85) term -> . term TIMES factor
(86) term -> . term DIVIDE factor
(87) term -> . term MATMUL factor
(88) term -> . term POWER factor
(89) term -> . factor
(90) factor -> . ID LPAREN args RPAREN
(91) factor -> . NUMBER
(92) factor -> . MINUS factor
(93) factor -> . ID
(94) factor -> . LPAREN expr RPAREN
(95) factor -> . LBRACKET elements RBRACKET
(96) factor -> . STRING
(101) factor -> . ID LBRACKET NUMBER RBRACKET
(102) factor -> . ID LBRACKET NUMBER COLON NUMBER RBRACKET
ID shift and go to state 24
NUMBER shift and go to state 14
MINUS shift and go to state 12
LPAREN shift and go to state 6
LBRACKET shift and go to state 15
STRING shift and go to state 16
term shift and go to state 48
factor shift and go to state 13
state 28
(83) expr -> expr MINUS . term
(85) term -> . term TIMES factor
(86) term -> . term DIVIDE factor
(87) term -> . term MATMUL factor
(88) term -> . term POWER factor
(89) term -> . factor
(90) factor -> . ID LPAREN args RPAREN
(91) factor -> . NUMBER
(92) factor -> . MINUS factor
(93) factor -> . ID
(94) factor -> . LPAREN expr RPAREN
(95) factor -> . LBRACKET elements RBRACKET
(96) factor -> . STRING
(101) factor -> . ID LBRACKET NUMBER RBRACKET
(102) factor -> . ID LBRACKET NUMBER COLON NUMBER RBRACKET
ID shift and go to state 24
NUMBER shift and go to state 14
MINUS shift and go to state 12
LPAREN shift and go to state 6
LBRACKET shift and go to state 15
STRING shift and go to state 16
term shift and go to state 49
factor shift and go to state 13
state 29
(85) term -> term TIMES . factor
(90) factor -> . ID LPAREN args RPAREN
(91) factor -> . NUMBER
(92) factor -> . MINUS factor
(93) factor -> . ID
(94) factor -> . LPAREN expr RPAREN
(95) factor -> . LBRACKET elements RBRACKET
(96) factor -> . STRING
(101) factor -> . ID LBRACKET NUMBER RBRACKET
(102) factor -> . ID LBRACKET NUMBER COLON NUMBER RBRACKET
ID shift and go to state 24
NUMBER shift and go to state 14
MINUS shift and go to state 12
LPAREN shift and go to state 6
LBRACKET shift and go to state 15
STRING shift and go to state 16
factor shift and go to state 50
state 30
(86) term -> term DIVIDE . factor
(90) factor -> . ID LPAREN args RPAREN
(91) factor -> . NUMBER
(92) factor -> . MINUS factor
(93) factor -> . ID
(94) factor -> . LPAREN expr RPAREN
(95) factor -> . LBRACKET elements RBRACKET
(96) factor -> . STRING
(101) factor -> . ID LBRACKET NUMBER RBRACKET
(102) factor -> . ID LBRACKET NUMBER COLON NUMBER RBRACKET
ID shift and go to state 24
NUMBER shift and go to state 14
MINUS shift and go to state 12
LPAREN shift and go to state 6
LBRACKET shift and go to state 15
STRING shift and go to state 16
factor shift and go to state 51
state 31
(87) term -> term MATMUL . factor
(90) factor -> . ID LPAREN args RPAREN
(91) factor -> . NUMBER
(92) factor -> . MINUS factor
(93) factor -> . ID
(94) factor -> . LPAREN expr RPAREN
(95) factor -> . LBRACKET elements RBRACKET
(96) factor -> . STRING
(101) factor -> . ID LBRACKET NUMBER RBRACKET
(102) factor -> . ID LBRACKET NUMBER COLON NUMBER RBRACKET
ID shift and go to state 24
NUMBER shift and go to state 14
MINUS shift and go to state 12
LPAREN shift and go to state 6
LBRACKET shift and go to state 15
STRING shift and go to state 16
factor shift and go to state 52
state 32
(88) term -> term POWER . factor
(90) factor -> . ID LPAREN args RPAREN
(91) factor -> . NUMBER
(92) factor -> . MINUS factor
(93) factor -> . ID
(94) factor -> . LPAREN expr RPAREN
(95) factor -> . LBRACKET elements RBRACKET
(96) factor -> . STRING
(101) factor -> . ID LBRACKET NUMBER RBRACKET
(102) factor -> . ID LBRACKET NUMBER COLON NUMBER RBRACKET
ID shift and go to state 24
NUMBER shift and go to state 14
MINUS shift and go to state 12
LPAREN shift and go to state 6
LBRACKET shift and go to state 15
STRING shift and go to state 16
factor shift and go to state 53
state 33
(92) factor -> MINUS factor .
TIMES reduce using rule 92 (factor -> MINUS factor .)
DIVIDE reduce using rule 92 (factor -> MINUS factor .)
MATMUL reduce using rule 92 (factor -> MINUS factor .)
POWER reduce using rule 92 (factor -> MINUS factor .)
PLUS reduce using rule 92 (factor -> MINUS factor .)
MINUS reduce using rule 92 (factor -> MINUS factor .)
DEF reduce using rule 92 (factor -> MINUS factor .)
CLASS reduce using rule 92 (factor -> MINUS factor .)
ID reduce using rule 92 (factor -> MINUS factor .)
NEWLINE reduce using rule 92 (factor -> MINUS factor .)
FOR reduce using rule 92 (factor -> MINUS factor .)
NUMBER reduce using rule 92 (factor -> MINUS factor .)
LPAREN reduce using rule 92 (factor -> MINUS factor .)
LBRACKET reduce using rule 92 (factor -> MINUS factor .)
STRING reduce using rule 92 (factor -> MINUS factor .)
$end reduce using rule 92 (factor -> MINUS factor .)
RPAREN reduce using rule 92 (factor -> MINUS factor .)
COMMA reduce using rule 92 (factor -> MINUS factor .)
RBRACKET reduce using rule 92 (factor -> MINUS factor .)
state 34
(95) factor -> LBRACKET elements . RBRACKET
(100) elements -> elements . NEWLINE
RBRACKET shift and go to state 54
NEWLINE shift and go to state 55
state 35
(97) elements -> expr .
(98) elements -> expr . COMMA elements
(82) expr -> expr . PLUS term
(83) expr -> expr . MINUS term
RBRACKET reduce using rule 97 (elements -> expr .)
NEWLINE reduce using rule 97 (elements -> expr .)
COMMA shift and go to state 56
PLUS shift and go to state 27
MINUS shift and go to state 28
state 36
(99) elements -> NEWLINE . elements
(97) elements -> . expr
(98) elements -> . expr COMMA elements
(99) elements -> . NEWLINE elements
(100) elements -> . elements NEWLINE
(82) expr -> . expr PLUS term
(83) expr -> . expr MINUS term
(84) expr -> . term
(85) term -> . term TIMES factor
(86) term -> . term DIVIDE factor
(87) term -> . term MATMUL factor
(88) term -> . term POWER factor
(89) term -> . factor