-
Notifications
You must be signed in to change notification settings - Fork 0
/
parser.out
3577 lines (3150 loc) · 155 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
Created by PLY version 3.11 (http://www.dabeaz.com/ply)
Grammar
Rule 0 S' -> program
Rule 1 program -> command
Rule 2 program -> program command
Rule 3 command -> FORWARD value
Rule 4 command -> FD value
Rule 5 command -> BACK value
Rule 6 command -> BK value
Rule 7 command -> LT value
Rule 8 command -> LEFT value
Rule 9 command -> RT value
Rule 10 command -> RIGHT value
Rule 11 command -> SETPOS [ value value ]
Rule 12 command -> SETXY value value
Rule 13 command -> SETX value
Rule 14 command -> SETY value
Rule 15 command -> HOME
Rule 16 command -> PD
Rule 17 command -> PENDOWN
Rule 18 command -> PU
Rule 19 command -> PENUP
Rule 20 command -> SETPENCOLOR [ value value value ]
Rule 21 command -> MAKE VARNAME value
Rule 22 command -> IF condition [ program ]
Rule 23 command -> IFELSE condition [ program ] [ program ]
Rule 24 command -> REPEAT value [ program ]
Rule 25 command -> WHILE [ condition ] [ program ]
Rule 26 command -> WHILE condition [ program ]
Rule 27 command -> TO NAMETO program END
Rule 28 command -> TO NAMETO vars program END
Rule 29 command -> NAMETO
Rule 30 command -> NAMETO values
Rule 31 value -> NUM
Rule 32 value -> VARUSE
Rule 33 value -> value + value
Rule 34 value -> value - value
Rule 35 value -> value * value
Rule 36 value -> value / value
Rule 37 value -> ( value )
Rule 38 values -> value
Rule 39 values -> values value
Rule 40 condition -> value
Rule 41 condition -> value LOGIC value
Rule 42 vars -> VARUSE
Rule 43 vars -> vars VARUSE
Terminals, with rules where they appear
( : 37
) : 37
* : 35
+ : 33
- : 34
/ : 36
BACK : 5
BK : 6
END : 27 28
FD : 4
FORWARD : 3
HOME : 15
IF : 22
IFELSE : 23
LEFT : 8
LOGIC : 41
LT : 7
MAKE : 21
NAMETO : 27 28 29 30
NUM : 31
PD : 16
PENDOWN : 17
PENUP : 19
PU : 18
REPEAT : 24
RIGHT : 10
RT : 9
SETPENCOLOR : 20
SETPOS : 11
SETX : 13
SETXY : 12
SETY : 14
TO : 27 28
VARNAME : 21
VARUSE : 32 42 43
WHILE : 25 26
[ : 11 20 22 23 23 24 25 25 26
] : 11 20 22 23 23 24 25 25 26
error :
Nonterminals, with rules where they appear
command : 1 2
condition : 22 23 25 26
program : 2 22 23 23 24 25 26 27 28 0
value : 3 4 5 6 7 8 9 10 11 11 12 12 13 14 20 20 20 21 24 33 33 34 34 35 35 36 36 37 38 39 40 41 41
values : 30 39
vars : 28 43
Parsing method: LALR
state 0
(0) S' -> . program
(1) program -> . command
(2) program -> . program command
(3) command -> . FORWARD value
(4) command -> . FD value
(5) command -> . BACK value
(6) command -> . BK value
(7) command -> . LT value
(8) command -> . LEFT value
(9) command -> . RT value
(10) command -> . RIGHT value
(11) command -> . SETPOS [ value value ]
(12) command -> . SETXY value value
(13) command -> . SETX value
(14) command -> . SETY value
(15) command -> . HOME
(16) command -> . PD
(17) command -> . PENDOWN
(18) command -> . PU
(19) command -> . PENUP
(20) command -> . SETPENCOLOR [ value value value ]
(21) command -> . MAKE VARNAME value
(22) command -> . IF condition [ program ]
(23) command -> . IFELSE condition [ program ] [ program ]
(24) command -> . REPEAT value [ program ]
(25) command -> . WHILE [ condition ] [ program ]
(26) command -> . WHILE condition [ program ]
(27) command -> . TO NAMETO program END
(28) command -> . TO NAMETO vars program END
(29) command -> . NAMETO
(30) command -> . NAMETO values
FORWARD shift and go to state 3
FD shift and go to state 4
BACK shift and go to state 5
BK shift and go to state 6
LT shift and go to state 7
LEFT shift and go to state 8
RT shift and go to state 9
RIGHT shift and go to state 10
SETPOS shift and go to state 11
SETXY shift and go to state 12
SETX shift and go to state 13
SETY shift and go to state 14
HOME shift and go to state 15
PD shift and go to state 16
PENDOWN shift and go to state 17
PU shift and go to state 18
PENUP shift and go to state 19
SETPENCOLOR shift and go to state 20
MAKE shift and go to state 21
IF shift and go to state 22
IFELSE shift and go to state 23
REPEAT shift and go to state 24
WHILE shift and go to state 25
TO shift and go to state 26
NAMETO shift and go to state 27
program shift and go to state 1
command shift and go to state 2
state 1
(0) S' -> program .
(2) program -> program . command
(3) command -> . FORWARD value
(4) command -> . FD value
(5) command -> . BACK value
(6) command -> . BK value
(7) command -> . LT value
(8) command -> . LEFT value
(9) command -> . RT value
(10) command -> . RIGHT value
(11) command -> . SETPOS [ value value ]
(12) command -> . SETXY value value
(13) command -> . SETX value
(14) command -> . SETY value
(15) command -> . HOME
(16) command -> . PD
(17) command -> . PENDOWN
(18) command -> . PU
(19) command -> . PENUP
(20) command -> . SETPENCOLOR [ value value value ]
(21) command -> . MAKE VARNAME value
(22) command -> . IF condition [ program ]
(23) command -> . IFELSE condition [ program ] [ program ]
(24) command -> . REPEAT value [ program ]
(25) command -> . WHILE [ condition ] [ program ]
(26) command -> . WHILE condition [ program ]
(27) command -> . TO NAMETO program END
(28) command -> . TO NAMETO vars program END
(29) command -> . NAMETO
(30) command -> . NAMETO values
FORWARD shift and go to state 3
FD shift and go to state 4
BACK shift and go to state 5
BK shift and go to state 6
LT shift and go to state 7
LEFT shift and go to state 8
RT shift and go to state 9
RIGHT shift and go to state 10
SETPOS shift and go to state 11
SETXY shift and go to state 12
SETX shift and go to state 13
SETY shift and go to state 14
HOME shift and go to state 15
PD shift and go to state 16
PENDOWN shift and go to state 17
PU shift and go to state 18
PENUP shift and go to state 19
SETPENCOLOR shift and go to state 20
MAKE shift and go to state 21
IF shift and go to state 22
IFELSE shift and go to state 23
REPEAT shift and go to state 24
WHILE shift and go to state 25
TO shift and go to state 26
NAMETO shift and go to state 27
command shift and go to state 28
state 2
(1) program -> command .
FORWARD reduce using rule 1 (program -> command .)
FD reduce using rule 1 (program -> command .)
BACK reduce using rule 1 (program -> command .)
BK reduce using rule 1 (program -> command .)
LT reduce using rule 1 (program -> command .)
LEFT reduce using rule 1 (program -> command .)
RT reduce using rule 1 (program -> command .)
RIGHT reduce using rule 1 (program -> command .)
SETPOS reduce using rule 1 (program -> command .)
SETXY reduce using rule 1 (program -> command .)
SETX reduce using rule 1 (program -> command .)
SETY reduce using rule 1 (program -> command .)
HOME reduce using rule 1 (program -> command .)
PD reduce using rule 1 (program -> command .)
PENDOWN reduce using rule 1 (program -> command .)
PU reduce using rule 1 (program -> command .)
PENUP reduce using rule 1 (program -> command .)
SETPENCOLOR reduce using rule 1 (program -> command .)
MAKE reduce using rule 1 (program -> command .)
IF reduce using rule 1 (program -> command .)
IFELSE reduce using rule 1 (program -> command .)
REPEAT reduce using rule 1 (program -> command .)
WHILE reduce using rule 1 (program -> command .)
TO reduce using rule 1 (program -> command .)
NAMETO reduce using rule 1 (program -> command .)
$end reduce using rule 1 (program -> command .)
END reduce using rule 1 (program -> command .)
] reduce using rule 1 (program -> command .)
state 3
(3) command -> FORWARD . value
(31) value -> . NUM
(32) value -> . VARUSE
(33) value -> . value + value
(34) value -> . value - value
(35) value -> . value * value
(36) value -> . value / value
(37) value -> . ( value )
NUM shift and go to state 30
VARUSE shift and go to state 31
( shift and go to state 32
value shift and go to state 29
state 4
(4) command -> FD . value
(31) value -> . NUM
(32) value -> . VARUSE
(33) value -> . value + value
(34) value -> . value - value
(35) value -> . value * value
(36) value -> . value / value
(37) value -> . ( value )
NUM shift and go to state 30
VARUSE shift and go to state 31
( shift and go to state 32
value shift and go to state 33
state 5
(5) command -> BACK . value
(31) value -> . NUM
(32) value -> . VARUSE
(33) value -> . value + value
(34) value -> . value - value
(35) value -> . value * value
(36) value -> . value / value
(37) value -> . ( value )
NUM shift and go to state 30
VARUSE shift and go to state 31
( shift and go to state 32
value shift and go to state 34
state 6
(6) command -> BK . value
(31) value -> . NUM
(32) value -> . VARUSE
(33) value -> . value + value
(34) value -> . value - value
(35) value -> . value * value
(36) value -> . value / value
(37) value -> . ( value )
NUM shift and go to state 30
VARUSE shift and go to state 31
( shift and go to state 32
value shift and go to state 35
state 7
(7) command -> LT . value
(31) value -> . NUM
(32) value -> . VARUSE
(33) value -> . value + value
(34) value -> . value - value
(35) value -> . value * value
(36) value -> . value / value
(37) value -> . ( value )
NUM shift and go to state 30
VARUSE shift and go to state 31
( shift and go to state 32
value shift and go to state 36
state 8
(8) command -> LEFT . value
(31) value -> . NUM
(32) value -> . VARUSE
(33) value -> . value + value
(34) value -> . value - value
(35) value -> . value * value
(36) value -> . value / value
(37) value -> . ( value )
NUM shift and go to state 30
VARUSE shift and go to state 31
( shift and go to state 32
value shift and go to state 37
state 9
(9) command -> RT . value
(31) value -> . NUM
(32) value -> . VARUSE
(33) value -> . value + value
(34) value -> . value - value
(35) value -> . value * value
(36) value -> . value / value
(37) value -> . ( value )
NUM shift and go to state 30
VARUSE shift and go to state 31
( shift and go to state 32
value shift and go to state 38
state 10
(10) command -> RIGHT . value
(31) value -> . NUM
(32) value -> . VARUSE
(33) value -> . value + value
(34) value -> . value - value
(35) value -> . value * value
(36) value -> . value / value
(37) value -> . ( value )
NUM shift and go to state 30
VARUSE shift and go to state 31
( shift and go to state 32
value shift and go to state 39
state 11
(11) command -> SETPOS . [ value value ]
[ shift and go to state 40
state 12
(12) command -> SETXY . value value
(31) value -> . NUM
(32) value -> . VARUSE
(33) value -> . value + value
(34) value -> . value - value
(35) value -> . value * value
(36) value -> . value / value
(37) value -> . ( value )
NUM shift and go to state 30
VARUSE shift and go to state 31
( shift and go to state 32
value shift and go to state 41
state 13
(13) command -> SETX . value
(31) value -> . NUM
(32) value -> . VARUSE
(33) value -> . value + value
(34) value -> . value - value
(35) value -> . value * value
(36) value -> . value / value
(37) value -> . ( value )
NUM shift and go to state 30
VARUSE shift and go to state 31
( shift and go to state 32
value shift and go to state 42
state 14
(14) command -> SETY . value
(31) value -> . NUM
(32) value -> . VARUSE
(33) value -> . value + value
(34) value -> . value - value
(35) value -> . value * value
(36) value -> . value / value
(37) value -> . ( value )
NUM shift and go to state 30
VARUSE shift and go to state 31
( shift and go to state 32
value shift and go to state 43
state 15
(15) command -> HOME .
FORWARD reduce using rule 15 (command -> HOME .)
FD reduce using rule 15 (command -> HOME .)
BACK reduce using rule 15 (command -> HOME .)
BK reduce using rule 15 (command -> HOME .)
LT reduce using rule 15 (command -> HOME .)
LEFT reduce using rule 15 (command -> HOME .)
RT reduce using rule 15 (command -> HOME .)
RIGHT reduce using rule 15 (command -> HOME .)
SETPOS reduce using rule 15 (command -> HOME .)
SETXY reduce using rule 15 (command -> HOME .)
SETX reduce using rule 15 (command -> HOME .)
SETY reduce using rule 15 (command -> HOME .)
HOME reduce using rule 15 (command -> HOME .)
PD reduce using rule 15 (command -> HOME .)
PENDOWN reduce using rule 15 (command -> HOME .)
PU reduce using rule 15 (command -> HOME .)
PENUP reduce using rule 15 (command -> HOME .)
SETPENCOLOR reduce using rule 15 (command -> HOME .)
MAKE reduce using rule 15 (command -> HOME .)
IF reduce using rule 15 (command -> HOME .)
IFELSE reduce using rule 15 (command -> HOME .)
REPEAT reduce using rule 15 (command -> HOME .)
WHILE reduce using rule 15 (command -> HOME .)
TO reduce using rule 15 (command -> HOME .)
NAMETO reduce using rule 15 (command -> HOME .)
$end reduce using rule 15 (command -> HOME .)
END reduce using rule 15 (command -> HOME .)
] reduce using rule 15 (command -> HOME .)
state 16
(16) command -> PD .
FORWARD reduce using rule 16 (command -> PD .)
FD reduce using rule 16 (command -> PD .)
BACK reduce using rule 16 (command -> PD .)
BK reduce using rule 16 (command -> PD .)
LT reduce using rule 16 (command -> PD .)
LEFT reduce using rule 16 (command -> PD .)
RT reduce using rule 16 (command -> PD .)
RIGHT reduce using rule 16 (command -> PD .)
SETPOS reduce using rule 16 (command -> PD .)
SETXY reduce using rule 16 (command -> PD .)
SETX reduce using rule 16 (command -> PD .)
SETY reduce using rule 16 (command -> PD .)
HOME reduce using rule 16 (command -> PD .)
PD reduce using rule 16 (command -> PD .)
PENDOWN reduce using rule 16 (command -> PD .)
PU reduce using rule 16 (command -> PD .)
PENUP reduce using rule 16 (command -> PD .)
SETPENCOLOR reduce using rule 16 (command -> PD .)
MAKE reduce using rule 16 (command -> PD .)
IF reduce using rule 16 (command -> PD .)
IFELSE reduce using rule 16 (command -> PD .)
REPEAT reduce using rule 16 (command -> PD .)
WHILE reduce using rule 16 (command -> PD .)
TO reduce using rule 16 (command -> PD .)
NAMETO reduce using rule 16 (command -> PD .)
$end reduce using rule 16 (command -> PD .)
END reduce using rule 16 (command -> PD .)
] reduce using rule 16 (command -> PD .)
state 17
(17) command -> PENDOWN .
FORWARD reduce using rule 17 (command -> PENDOWN .)
FD reduce using rule 17 (command -> PENDOWN .)
BACK reduce using rule 17 (command -> PENDOWN .)
BK reduce using rule 17 (command -> PENDOWN .)
LT reduce using rule 17 (command -> PENDOWN .)
LEFT reduce using rule 17 (command -> PENDOWN .)
RT reduce using rule 17 (command -> PENDOWN .)
RIGHT reduce using rule 17 (command -> PENDOWN .)
SETPOS reduce using rule 17 (command -> PENDOWN .)
SETXY reduce using rule 17 (command -> PENDOWN .)
SETX reduce using rule 17 (command -> PENDOWN .)
SETY reduce using rule 17 (command -> PENDOWN .)
HOME reduce using rule 17 (command -> PENDOWN .)
PD reduce using rule 17 (command -> PENDOWN .)
PENDOWN reduce using rule 17 (command -> PENDOWN .)
PU reduce using rule 17 (command -> PENDOWN .)
PENUP reduce using rule 17 (command -> PENDOWN .)
SETPENCOLOR reduce using rule 17 (command -> PENDOWN .)
MAKE reduce using rule 17 (command -> PENDOWN .)
IF reduce using rule 17 (command -> PENDOWN .)
IFELSE reduce using rule 17 (command -> PENDOWN .)
REPEAT reduce using rule 17 (command -> PENDOWN .)
WHILE reduce using rule 17 (command -> PENDOWN .)
TO reduce using rule 17 (command -> PENDOWN .)
NAMETO reduce using rule 17 (command -> PENDOWN .)
$end reduce using rule 17 (command -> PENDOWN .)
END reduce using rule 17 (command -> PENDOWN .)
] reduce using rule 17 (command -> PENDOWN .)
state 18
(18) command -> PU .
FORWARD reduce using rule 18 (command -> PU .)
FD reduce using rule 18 (command -> PU .)
BACK reduce using rule 18 (command -> PU .)
BK reduce using rule 18 (command -> PU .)
LT reduce using rule 18 (command -> PU .)
LEFT reduce using rule 18 (command -> PU .)
RT reduce using rule 18 (command -> PU .)
RIGHT reduce using rule 18 (command -> PU .)
SETPOS reduce using rule 18 (command -> PU .)
SETXY reduce using rule 18 (command -> PU .)
SETX reduce using rule 18 (command -> PU .)
SETY reduce using rule 18 (command -> PU .)
HOME reduce using rule 18 (command -> PU .)
PD reduce using rule 18 (command -> PU .)
PENDOWN reduce using rule 18 (command -> PU .)
PU reduce using rule 18 (command -> PU .)
PENUP reduce using rule 18 (command -> PU .)
SETPENCOLOR reduce using rule 18 (command -> PU .)
MAKE reduce using rule 18 (command -> PU .)
IF reduce using rule 18 (command -> PU .)
IFELSE reduce using rule 18 (command -> PU .)
REPEAT reduce using rule 18 (command -> PU .)
WHILE reduce using rule 18 (command -> PU .)
TO reduce using rule 18 (command -> PU .)
NAMETO reduce using rule 18 (command -> PU .)
$end reduce using rule 18 (command -> PU .)
END reduce using rule 18 (command -> PU .)
] reduce using rule 18 (command -> PU .)
state 19
(19) command -> PENUP .
FORWARD reduce using rule 19 (command -> PENUP .)
FD reduce using rule 19 (command -> PENUP .)
BACK reduce using rule 19 (command -> PENUP .)
BK reduce using rule 19 (command -> PENUP .)
LT reduce using rule 19 (command -> PENUP .)
LEFT reduce using rule 19 (command -> PENUP .)
RT reduce using rule 19 (command -> PENUP .)
RIGHT reduce using rule 19 (command -> PENUP .)
SETPOS reduce using rule 19 (command -> PENUP .)
SETXY reduce using rule 19 (command -> PENUP .)
SETX reduce using rule 19 (command -> PENUP .)
SETY reduce using rule 19 (command -> PENUP .)
HOME reduce using rule 19 (command -> PENUP .)
PD reduce using rule 19 (command -> PENUP .)
PENDOWN reduce using rule 19 (command -> PENUP .)
PU reduce using rule 19 (command -> PENUP .)
PENUP reduce using rule 19 (command -> PENUP .)
SETPENCOLOR reduce using rule 19 (command -> PENUP .)
MAKE reduce using rule 19 (command -> PENUP .)
IF reduce using rule 19 (command -> PENUP .)
IFELSE reduce using rule 19 (command -> PENUP .)
REPEAT reduce using rule 19 (command -> PENUP .)
WHILE reduce using rule 19 (command -> PENUP .)
TO reduce using rule 19 (command -> PENUP .)
NAMETO reduce using rule 19 (command -> PENUP .)
$end reduce using rule 19 (command -> PENUP .)
END reduce using rule 19 (command -> PENUP .)
] reduce using rule 19 (command -> PENUP .)
state 20
(20) command -> SETPENCOLOR . [ value value value ]
[ shift and go to state 44
state 21
(21) command -> MAKE . VARNAME value
VARNAME shift and go to state 45
state 22
(22) command -> IF . condition [ program ]
(40) condition -> . value
(41) condition -> . value LOGIC value
(31) value -> . NUM
(32) value -> . VARUSE
(33) value -> . value + value
(34) value -> . value - value
(35) value -> . value * value
(36) value -> . value / value
(37) value -> . ( value )
NUM shift and go to state 30
VARUSE shift and go to state 31
( shift and go to state 32
condition shift and go to state 46
value shift and go to state 47
state 23
(23) command -> IFELSE . condition [ program ] [ program ]
(40) condition -> . value
(41) condition -> . value LOGIC value
(31) value -> . NUM
(32) value -> . VARUSE
(33) value -> . value + value
(34) value -> . value - value
(35) value -> . value * value
(36) value -> . value / value
(37) value -> . ( value )
NUM shift and go to state 30
VARUSE shift and go to state 31
( shift and go to state 32
condition shift and go to state 48
value shift and go to state 47
state 24
(24) command -> REPEAT . value [ program ]
(31) value -> . NUM
(32) value -> . VARUSE
(33) value -> . value + value
(34) value -> . value - value
(35) value -> . value * value
(36) value -> . value / value
(37) value -> . ( value )
NUM shift and go to state 30
VARUSE shift and go to state 31
( shift and go to state 32
value shift and go to state 49
state 25
(25) command -> WHILE . [ condition ] [ program ]
(26) command -> WHILE . condition [ program ]
(40) condition -> . value
(41) condition -> . value LOGIC value
(31) value -> . NUM
(32) value -> . VARUSE
(33) value -> . value + value
(34) value -> . value - value
(35) value -> . value * value
(36) value -> . value / value
(37) value -> . ( value )
[ shift and go to state 50
NUM shift and go to state 30
VARUSE shift and go to state 31
( shift and go to state 32
condition shift and go to state 51
value shift and go to state 47
state 26
(27) command -> TO . NAMETO program END
(28) command -> TO . NAMETO vars program END
NAMETO shift and go to state 52
state 27
(29) command -> NAMETO .
(30) command -> NAMETO . values
(38) values -> . value
(39) values -> . values value
(31) value -> . NUM
(32) value -> . VARUSE
(33) value -> . value + value
(34) value -> . value - value
(35) value -> . value * value
(36) value -> . value / value
(37) value -> . ( value )
FORWARD reduce using rule 29 (command -> NAMETO .)
FD reduce using rule 29 (command -> NAMETO .)
BACK reduce using rule 29 (command -> NAMETO .)
BK reduce using rule 29 (command -> NAMETO .)
LT reduce using rule 29 (command -> NAMETO .)
LEFT reduce using rule 29 (command -> NAMETO .)
RT reduce using rule 29 (command -> NAMETO .)
RIGHT reduce using rule 29 (command -> NAMETO .)
SETPOS reduce using rule 29 (command -> NAMETO .)
SETXY reduce using rule 29 (command -> NAMETO .)
SETX reduce using rule 29 (command -> NAMETO .)
SETY reduce using rule 29 (command -> NAMETO .)
HOME reduce using rule 29 (command -> NAMETO .)
PD reduce using rule 29 (command -> NAMETO .)
PENDOWN reduce using rule 29 (command -> NAMETO .)
PU reduce using rule 29 (command -> NAMETO .)
PENUP reduce using rule 29 (command -> NAMETO .)
SETPENCOLOR reduce using rule 29 (command -> NAMETO .)
MAKE reduce using rule 29 (command -> NAMETO .)
IF reduce using rule 29 (command -> NAMETO .)
IFELSE reduce using rule 29 (command -> NAMETO .)
REPEAT reduce using rule 29 (command -> NAMETO .)
WHILE reduce using rule 29 (command -> NAMETO .)
TO reduce using rule 29 (command -> NAMETO .)
NAMETO reduce using rule 29 (command -> NAMETO .)
$end reduce using rule 29 (command -> NAMETO .)
END reduce using rule 29 (command -> NAMETO .)
] reduce using rule 29 (command -> NAMETO .)
NUM shift and go to state 30
VARUSE shift and go to state 31
( shift and go to state 32
values shift and go to state 53
value shift and go to state 54
state 28
(2) program -> program command .
FORWARD reduce using rule 2 (program -> program command .)
FD reduce using rule 2 (program -> program command .)
BACK reduce using rule 2 (program -> program command .)
BK reduce using rule 2 (program -> program command .)
LT reduce using rule 2 (program -> program command .)
LEFT reduce using rule 2 (program -> program command .)
RT reduce using rule 2 (program -> program command .)
RIGHT reduce using rule 2 (program -> program command .)
SETPOS reduce using rule 2 (program -> program command .)
SETXY reduce using rule 2 (program -> program command .)
SETX reduce using rule 2 (program -> program command .)
SETY reduce using rule 2 (program -> program command .)
HOME reduce using rule 2 (program -> program command .)
PD reduce using rule 2 (program -> program command .)
PENDOWN reduce using rule 2 (program -> program command .)
PU reduce using rule 2 (program -> program command .)
PENUP reduce using rule 2 (program -> program command .)
SETPENCOLOR reduce using rule 2 (program -> program command .)
MAKE reduce using rule 2 (program -> program command .)
IF reduce using rule 2 (program -> program command .)
IFELSE reduce using rule 2 (program -> program command .)
REPEAT reduce using rule 2 (program -> program command .)
WHILE reduce using rule 2 (program -> program command .)
TO reduce using rule 2 (program -> program command .)
NAMETO reduce using rule 2 (program -> program command .)
$end reduce using rule 2 (program -> program command .)
END reduce using rule 2 (program -> program command .)
] reduce using rule 2 (program -> program command .)
state 29
(3) command -> FORWARD value .
(33) value -> value . + value
(34) value -> value . - value
(35) value -> value . * value
(36) value -> value . / value
FORWARD reduce using rule 3 (command -> FORWARD value .)
FD reduce using rule 3 (command -> FORWARD value .)
BACK reduce using rule 3 (command -> FORWARD value .)
BK reduce using rule 3 (command -> FORWARD value .)
LT reduce using rule 3 (command -> FORWARD value .)
LEFT reduce using rule 3 (command -> FORWARD value .)
RT reduce using rule 3 (command -> FORWARD value .)
RIGHT reduce using rule 3 (command -> FORWARD value .)
SETPOS reduce using rule 3 (command -> FORWARD value .)
SETXY reduce using rule 3 (command -> FORWARD value .)
SETX reduce using rule 3 (command -> FORWARD value .)
SETY reduce using rule 3 (command -> FORWARD value .)
HOME reduce using rule 3 (command -> FORWARD value .)
PD reduce using rule 3 (command -> FORWARD value .)
PENDOWN reduce using rule 3 (command -> FORWARD value .)
PU reduce using rule 3 (command -> FORWARD value .)
PENUP reduce using rule 3 (command -> FORWARD value .)
SETPENCOLOR reduce using rule 3 (command -> FORWARD value .)
MAKE reduce using rule 3 (command -> FORWARD value .)
IF reduce using rule 3 (command -> FORWARD value .)
IFELSE reduce using rule 3 (command -> FORWARD value .)
REPEAT reduce using rule 3 (command -> FORWARD value .)
WHILE reduce using rule 3 (command -> FORWARD value .)
TO reduce using rule 3 (command -> FORWARD value .)
NAMETO reduce using rule 3 (command -> FORWARD value .)
$end reduce using rule 3 (command -> FORWARD value .)
END reduce using rule 3 (command -> FORWARD value .)
] reduce using rule 3 (command -> FORWARD value .)
+ shift and go to state 55
- shift and go to state 56
* shift and go to state 57
/ shift and go to state 58
state 30
(31) value -> NUM .
+ reduce using rule 31 (value -> NUM .)
- reduce using rule 31 (value -> NUM .)
* reduce using rule 31 (value -> NUM .)
/ reduce using rule 31 (value -> NUM .)
FORWARD reduce using rule 31 (value -> NUM .)
FD reduce using rule 31 (value -> NUM .)
BACK reduce using rule 31 (value -> NUM .)
BK reduce using rule 31 (value -> NUM .)
LT reduce using rule 31 (value -> NUM .)
LEFT reduce using rule 31 (value -> NUM .)
RT reduce using rule 31 (value -> NUM .)
RIGHT reduce using rule 31 (value -> NUM .)
SETPOS reduce using rule 31 (value -> NUM .)
SETXY reduce using rule 31 (value -> NUM .)
SETX reduce using rule 31 (value -> NUM .)
SETY reduce using rule 31 (value -> NUM .)
HOME reduce using rule 31 (value -> NUM .)
PD reduce using rule 31 (value -> NUM .)
PENDOWN reduce using rule 31 (value -> NUM .)
PU reduce using rule 31 (value -> NUM .)
PENUP reduce using rule 31 (value -> NUM .)
SETPENCOLOR reduce using rule 31 (value -> NUM .)
MAKE reduce using rule 31 (value -> NUM .)
IF reduce using rule 31 (value -> NUM .)
IFELSE reduce using rule 31 (value -> NUM .)
REPEAT reduce using rule 31 (value -> NUM .)
WHILE reduce using rule 31 (value -> NUM .)
TO reduce using rule 31 (value -> NUM .)
NAMETO reduce using rule 31 (value -> NUM .)
$end reduce using rule 31 (value -> NUM .)
END reduce using rule 31 (value -> NUM .)
] reduce using rule 31 (value -> NUM .)
NUM reduce using rule 31 (value -> NUM .)
VARUSE reduce using rule 31 (value -> NUM .)
( reduce using rule 31 (value -> NUM .)
LOGIC reduce using rule 31 (value -> NUM .)
[ reduce using rule 31 (value -> NUM .)
) reduce using rule 31 (value -> NUM .)
state 31
(32) value -> VARUSE .
+ reduce using rule 32 (value -> VARUSE .)
- reduce using rule 32 (value -> VARUSE .)
* reduce using rule 32 (value -> VARUSE .)
/ reduce using rule 32 (value -> VARUSE .)
FORWARD reduce using rule 32 (value -> VARUSE .)
FD reduce using rule 32 (value -> VARUSE .)
BACK reduce using rule 32 (value -> VARUSE .)
BK reduce using rule 32 (value -> VARUSE .)
LT reduce using rule 32 (value -> VARUSE .)
LEFT reduce using rule 32 (value -> VARUSE .)
RT reduce using rule 32 (value -> VARUSE .)
RIGHT reduce using rule 32 (value -> VARUSE .)
SETPOS reduce using rule 32 (value -> VARUSE .)
SETXY reduce using rule 32 (value -> VARUSE .)
SETX reduce using rule 32 (value -> VARUSE .)
SETY reduce using rule 32 (value -> VARUSE .)
HOME reduce using rule 32 (value -> VARUSE .)
PD reduce using rule 32 (value -> VARUSE .)
PENDOWN reduce using rule 32 (value -> VARUSE .)
PU reduce using rule 32 (value -> VARUSE .)
PENUP reduce using rule 32 (value -> VARUSE .)
SETPENCOLOR reduce using rule 32 (value -> VARUSE .)
MAKE reduce using rule 32 (value -> VARUSE .)
IF reduce using rule 32 (value -> VARUSE .)
IFELSE reduce using rule 32 (value -> VARUSE .)
REPEAT reduce using rule 32 (value -> VARUSE .)
WHILE reduce using rule 32 (value -> VARUSE .)
TO reduce using rule 32 (value -> VARUSE .)
NAMETO reduce using rule 32 (value -> VARUSE .)
$end reduce using rule 32 (value -> VARUSE .)
END reduce using rule 32 (value -> VARUSE .)
] reduce using rule 32 (value -> VARUSE .)
NUM reduce using rule 32 (value -> VARUSE .)
VARUSE reduce using rule 32 (value -> VARUSE .)
( reduce using rule 32 (value -> VARUSE .)
LOGIC reduce using rule 32 (value -> VARUSE .)
[ reduce using rule 32 (value -> VARUSE .)
) reduce using rule 32 (value -> VARUSE .)
state 32
(37) value -> ( . value )
(31) value -> . NUM
(32) value -> . VARUSE
(33) value -> . value + value
(34) value -> . value - value
(35) value -> . value * value
(36) value -> . value / value
(37) value -> . ( value )
NUM shift and go to state 30
VARUSE shift and go to state 31
( shift and go to state 32
value shift and go to state 59
state 33
(4) command -> FD value .
(33) value -> value . + value
(34) value -> value . - value
(35) value -> value . * value
(36) value -> value . / value
FORWARD reduce using rule 4 (command -> FD value .)
FD reduce using rule 4 (command -> FD value .)
BACK reduce using rule 4 (command -> FD value .)
BK reduce using rule 4 (command -> FD value .)
LT reduce using rule 4 (command -> FD value .)
LEFT reduce using rule 4 (command -> FD value .)
RT reduce using rule 4 (command -> FD value .)
RIGHT reduce using rule 4 (command -> FD value .)
SETPOS reduce using rule 4 (command -> FD value .)
SETXY reduce using rule 4 (command -> FD value .)
SETX reduce using rule 4 (command -> FD value .)
SETY reduce using rule 4 (command -> FD value .)
HOME reduce using rule 4 (command -> FD value .)
PD reduce using rule 4 (command -> FD value .)
PENDOWN reduce using rule 4 (command -> FD value .)
PU reduce using rule 4 (command -> FD value .)
PENUP reduce using rule 4 (command -> FD value .)
SETPENCOLOR reduce using rule 4 (command -> FD value .)
MAKE reduce using rule 4 (command -> FD value .)
IF reduce using rule 4 (command -> FD value .)
IFELSE reduce using rule 4 (command -> FD value .)
REPEAT reduce using rule 4 (command -> FD value .)
WHILE reduce using rule 4 (command -> FD value .)
TO reduce using rule 4 (command -> FD value .)
NAMETO reduce using rule 4 (command -> FD value .)
$end reduce using rule 4 (command -> FD value .)
END reduce using rule 4 (command -> FD value .)
] reduce using rule 4 (command -> FD value .)
+ shift and go to state 55
- shift and go to state 56
* shift and go to state 57
/ shift and go to state 58
state 34
(5) command -> BACK value .