-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathparser.out
1796 lines (1348 loc) · 69.9 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.8 (http://www.dabeaz.com/ply)
Grammar
Rule 0 S' -> program
Rule 1 program -> block period_token
Rule 2 block -> con_dec var_dec proc_dec stmt
Rule 3 con_dec -> const_token ident_token eql_token number_token con_dec_cdr semicolom_token
Rule 4 con_dec -> empty
Rule 5 con_dec_cdr -> comma_token ident_token eql_token number_token con_dec_cdr
Rule 6 con_dec_cdr -> empty
Rule 7 var_dec -> var_token ident_token var_dec_cdr semicolom_token
Rule 8 var_dec -> empty
Rule 9 var_dec_cdr -> comma_token ident_token var_dec_cdr
Rule 10 var_dec_cdr -> empty
Rule 11 proc_dec -> proc_token ident_token semicolom_token block semicolom_token proc_dec_cdr
Rule 12 proc_dec -> empty
Rule 13 proc_dec_cdr -> proc_token ident_token semicolom_token block semicolom_token proc_dec_cdr
Rule 14 proc_dec_cdr -> empty
Rule 15 stmt -> assign_stmt
Rule 16 stmt -> call_stmt
Rule 17 stmt -> begin_stmt
Rule 18 stmt -> if_stmt
Rule 19 stmt -> while_stmt
Rule 20 stmt -> read_stmt
Rule 21 stmt -> write_stmt
Rule 22 stmt -> empty
Rule 23 assign_stmt -> ident_token become_token expr
Rule 24 call_stmt -> call_token ident_token
Rule 25 begin_stmt -> begin_token stmt begin_stmt_cdr end_token
Rule 26 begin_stmt_cdr -> semicolom_token stmt begin_stmt_cdr
Rule 27 begin_stmt_cdr -> empty
Rule 28 if_stmt -> if_token cond then_token stmt
Rule 29 if_stmt -> if_token cond then_token stmt else_token stmt
Rule 30 while_stmt -> while_token cond do_token stmt
Rule 31 read_stmt -> read_token ident_token
Rule 32 write_stmt -> write_token expr
Rule 33 cond -> odd_token expr
Rule 34 cond -> expr cmp expr
Rule 35 cmp -> eql_token
Rule 36 cmp -> les_token
Rule 37 cmp -> leq_token
Rule 38 cmp -> grt_token
Rule 39 cmp -> geq_token
Rule 40 cmp -> neq_token
Rule 41 expr -> flag no_flag_expr
Rule 42 expr -> no_flag_expr
Rule 43 no_flag_expr -> term plus_token term
Rule 44 no_flag_expr -> term minus_token term
Rule 45 no_flag_expr -> term
Rule 46 flag -> plus_token
Rule 47 flag -> minus_token
Rule 48 term -> factor
Rule 49 term -> factor mul_token term
Rule 50 term -> factor divide_token term
Rule 51 factor -> ident_token
Rule 52 factor -> number_token
Rule 53 factor -> lparent_token expr rparent_token
Rule 54 empty -> <empty>
Terminals, with rules where they appear
become_token : 23
begin_token : 25
call_token : 24
comma_token : 5 9
const_token : 3
divide_token : 50
do_token : 30
else_token : 29
end_token : 25
eql_token : 3 5 35
error :
geq_token : 39
grt_token : 38
ident_token : 3 5 7 9 11 13 23 24 31 51
if_token : 28 29
leq_token : 37
les_token : 36
lparent_token : 53
minus_token : 44 47
mul_token : 49
neq_token : 40
number_token : 3 5 52
odd_token : 33
period_token : 1
plus_token : 43 46
proc_token : 11 13
read_token : 31
rparent_token : 53
semicolom_token : 3 7 11 11 13 13 26
then_token : 28 29
var_token : 7
while_token : 30
write_token : 32
Nonterminals, with rules where they appear
assign_stmt : 15
begin_stmt : 17
begin_stmt_cdr : 25 26
block : 1 11 13
call_stmt : 16
cmp : 34
con_dec : 2
con_dec_cdr : 3 5
cond : 28 29 30
empty : 4 6 8 10 12 14 22 27
expr : 23 32 33 34 34 53
factor : 48 49 50
flag : 41
if_stmt : 18
no_flag_expr : 41 42
proc_dec : 2
proc_dec_cdr : 11 13
program : 0
read_stmt : 20
stmt : 2 25 26 28 29 29 30
term : 43 43 44 44 45 49 50
var_dec : 2
var_dec_cdr : 7 9
while_stmt : 19
write_stmt : 21
Parsing method: LALR
state 0
(0) S' -> . program
(1) program -> . block period_token
(2) block -> . con_dec var_dec proc_dec stmt
(3) con_dec -> . const_token ident_token eql_token number_token con_dec_cdr semicolom_token
(4) con_dec -> . empty
(54) empty -> .
const_token shift and go to state 1
var_token reduce using rule 54 (empty -> .)
proc_token reduce using rule 54 (empty -> .)
ident_token reduce using rule 54 (empty -> .)
call_token reduce using rule 54 (empty -> .)
begin_token reduce using rule 54 (empty -> .)
if_token reduce using rule 54 (empty -> .)
while_token reduce using rule 54 (empty -> .)
read_token reduce using rule 54 (empty -> .)
write_token reduce using rule 54 (empty -> .)
period_token reduce using rule 54 (empty -> .)
program shift and go to state 2
empty shift and go to state 3
con_dec shift and go to state 4
block shift and go to state 5
state 1
(3) con_dec -> const_token . ident_token eql_token number_token con_dec_cdr semicolom_token
ident_token shift and go to state 6
state 2
(0) S' -> program .
state 3
(4) con_dec -> empty .
var_token reduce using rule 4 (con_dec -> empty .)
proc_token reduce using rule 4 (con_dec -> empty .)
ident_token reduce using rule 4 (con_dec -> empty .)
call_token reduce using rule 4 (con_dec -> empty .)
begin_token reduce using rule 4 (con_dec -> empty .)
if_token reduce using rule 4 (con_dec -> empty .)
while_token reduce using rule 4 (con_dec -> empty .)
read_token reduce using rule 4 (con_dec -> empty .)
write_token reduce using rule 4 (con_dec -> empty .)
semicolom_token reduce using rule 4 (con_dec -> empty .)
period_token reduce using rule 4 (con_dec -> empty .)
state 4
(2) block -> con_dec . var_dec proc_dec stmt
(7) var_dec -> . var_token ident_token var_dec_cdr semicolom_token
(8) var_dec -> . empty
(54) empty -> .
var_token shift and go to state 8
proc_token reduce using rule 54 (empty -> .)
ident_token reduce using rule 54 (empty -> .)
call_token reduce using rule 54 (empty -> .)
begin_token reduce using rule 54 (empty -> .)
if_token reduce using rule 54 (empty -> .)
while_token reduce using rule 54 (empty -> .)
read_token reduce using rule 54 (empty -> .)
write_token reduce using rule 54 (empty -> .)
period_token reduce using rule 54 (empty -> .)
semicolom_token reduce using rule 54 (empty -> .)
var_dec shift and go to state 7
empty shift and go to state 9
state 5
(1) program -> block . period_token
period_token shift and go to state 10
state 6
(3) con_dec -> const_token ident_token . eql_token number_token con_dec_cdr semicolom_token
eql_token shift and go to state 11
state 7
(2) block -> con_dec var_dec . proc_dec stmt
(11) proc_dec -> . proc_token ident_token semicolom_token block semicolom_token proc_dec_cdr
(12) proc_dec -> . empty
(54) empty -> .
proc_token shift and go to state 12
ident_token reduce using rule 54 (empty -> .)
call_token reduce using rule 54 (empty -> .)
begin_token reduce using rule 54 (empty -> .)
if_token reduce using rule 54 (empty -> .)
while_token reduce using rule 54 (empty -> .)
read_token reduce using rule 54 (empty -> .)
write_token reduce using rule 54 (empty -> .)
period_token reduce using rule 54 (empty -> .)
semicolom_token reduce using rule 54 (empty -> .)
empty shift and go to state 13
proc_dec shift and go to state 14
state 8
(7) var_dec -> var_token . ident_token var_dec_cdr semicolom_token
ident_token shift and go to state 15
state 9
(8) var_dec -> empty .
proc_token reduce using rule 8 (var_dec -> empty .)
ident_token reduce using rule 8 (var_dec -> empty .)
call_token reduce using rule 8 (var_dec -> empty .)
begin_token reduce using rule 8 (var_dec -> empty .)
if_token reduce using rule 8 (var_dec -> empty .)
while_token reduce using rule 8 (var_dec -> empty .)
read_token reduce using rule 8 (var_dec -> empty .)
write_token reduce using rule 8 (var_dec -> empty .)
period_token reduce using rule 8 (var_dec -> empty .)
semicolom_token reduce using rule 8 (var_dec -> empty .)
state 10
(1) program -> block period_token .
$end reduce using rule 1 (program -> block period_token .)
state 11
(3) con_dec -> const_token ident_token eql_token . number_token con_dec_cdr semicolom_token
number_token shift and go to state 16
state 12
(11) proc_dec -> proc_token . ident_token semicolom_token block semicolom_token proc_dec_cdr
ident_token shift and go to state 17
state 13
(12) proc_dec -> empty .
ident_token reduce using rule 12 (proc_dec -> empty .)
call_token reduce using rule 12 (proc_dec -> empty .)
begin_token reduce using rule 12 (proc_dec -> empty .)
if_token reduce using rule 12 (proc_dec -> empty .)
while_token reduce using rule 12 (proc_dec -> empty .)
read_token reduce using rule 12 (proc_dec -> empty .)
write_token reduce using rule 12 (proc_dec -> empty .)
period_token reduce using rule 12 (proc_dec -> empty .)
semicolom_token reduce using rule 12 (proc_dec -> empty .)
state 14
(2) block -> con_dec var_dec proc_dec . stmt
(15) stmt -> . assign_stmt
(16) stmt -> . call_stmt
(17) stmt -> . begin_stmt
(18) stmt -> . if_stmt
(19) stmt -> . while_stmt
(20) stmt -> . read_stmt
(21) stmt -> . write_stmt
(22) stmt -> . empty
(23) assign_stmt -> . ident_token become_token expr
(24) call_stmt -> . call_token ident_token
(25) begin_stmt -> . begin_token stmt begin_stmt_cdr end_token
(28) if_stmt -> . if_token cond then_token stmt
(29) if_stmt -> . if_token cond then_token stmt else_token stmt
(30) while_stmt -> . while_token cond do_token stmt
(31) read_stmt -> . read_token ident_token
(32) write_stmt -> . write_token expr
(54) empty -> .
ident_token shift and go to state 27
call_token shift and go to state 32
begin_token shift and go to state 20
if_token shift and go to state 22
while_token shift and go to state 19
read_token shift and go to state 30
write_token shift and go to state 33
period_token reduce using rule 54 (empty -> .)
semicolom_token reduce using rule 54 (empty -> .)
write_stmt shift and go to state 24
begin_stmt shift and go to state 28
if_stmt shift and go to state 29
call_stmt shift and go to state 25
read_stmt shift and go to state 18
stmt shift and go to state 26
assign_stmt shift and go to state 21
while_stmt shift and go to state 31
empty shift and go to state 23
state 15
(7) var_dec -> var_token ident_token . var_dec_cdr semicolom_token
(9) var_dec_cdr -> . comma_token ident_token var_dec_cdr
(10) var_dec_cdr -> . empty
(54) empty -> .
comma_token shift and go to state 35
semicolom_token reduce using rule 54 (empty -> .)
var_dec_cdr shift and go to state 34
empty shift and go to state 36
state 16
(3) con_dec -> const_token ident_token eql_token number_token . con_dec_cdr semicolom_token
(5) con_dec_cdr -> . comma_token ident_token eql_token number_token con_dec_cdr
(6) con_dec_cdr -> . empty
(54) empty -> .
comma_token shift and go to state 38
semicolom_token reduce using rule 54 (empty -> .)
empty shift and go to state 39
con_dec_cdr shift and go to state 37
state 17
(11) proc_dec -> proc_token ident_token . semicolom_token block semicolom_token proc_dec_cdr
semicolom_token shift and go to state 40
state 18
(20) stmt -> read_stmt .
period_token reduce using rule 20 (stmt -> read_stmt .)
semicolom_token reduce using rule 20 (stmt -> read_stmt .)
end_token reduce using rule 20 (stmt -> read_stmt .)
else_token reduce using rule 20 (stmt -> read_stmt .)
state 19
(30) while_stmt -> while_token . cond do_token stmt
(33) cond -> . odd_token expr
(34) cond -> . expr cmp expr
(41) expr -> . flag no_flag_expr
(42) expr -> . no_flag_expr
(46) flag -> . plus_token
(47) flag -> . minus_token
(43) no_flag_expr -> . term plus_token term
(44) no_flag_expr -> . term minus_token term
(45) no_flag_expr -> . term
(48) term -> . factor
(49) term -> . factor mul_token term
(50) term -> . factor divide_token term
(51) factor -> . ident_token
(52) factor -> . number_token
(53) factor -> . lparent_token expr rparent_token
odd_token shift and go to state 43
plus_token shift and go to state 50
minus_token shift and go to state 47
ident_token shift and go to state 51
number_token shift and go to state 52
lparent_token shift and go to state 45
no_flag_expr shift and go to state 41
term shift and go to state 42
expr shift and go to state 44
flag shift and go to state 46
cond shift and go to state 48
factor shift and go to state 49
state 20
(25) begin_stmt -> begin_token . stmt begin_stmt_cdr end_token
(15) stmt -> . assign_stmt
(16) stmt -> . call_stmt
(17) stmt -> . begin_stmt
(18) stmt -> . if_stmt
(19) stmt -> . while_stmt
(20) stmt -> . read_stmt
(21) stmt -> . write_stmt
(22) stmt -> . empty
(23) assign_stmt -> . ident_token become_token expr
(24) call_stmt -> . call_token ident_token
(25) begin_stmt -> . begin_token stmt begin_stmt_cdr end_token
(28) if_stmt -> . if_token cond then_token stmt
(29) if_stmt -> . if_token cond then_token stmt else_token stmt
(30) while_stmt -> . while_token cond do_token stmt
(31) read_stmt -> . read_token ident_token
(32) write_stmt -> . write_token expr
(54) empty -> .
ident_token shift and go to state 27
call_token shift and go to state 32
begin_token shift and go to state 20
if_token shift and go to state 22
while_token shift and go to state 19
read_token shift and go to state 30
write_token shift and go to state 33
semicolom_token reduce using rule 54 (empty -> .)
end_token reduce using rule 54 (empty -> .)
write_stmt shift and go to state 24
begin_stmt shift and go to state 28
if_stmt shift and go to state 29
call_stmt shift and go to state 25
read_stmt shift and go to state 18
assign_stmt shift and go to state 21
while_stmt shift and go to state 31
stmt shift and go to state 53
empty shift and go to state 23
state 21
(15) stmt -> assign_stmt .
period_token reduce using rule 15 (stmt -> assign_stmt .)
semicolom_token reduce using rule 15 (stmt -> assign_stmt .)
end_token reduce using rule 15 (stmt -> assign_stmt .)
else_token reduce using rule 15 (stmt -> assign_stmt .)
state 22
(28) if_stmt -> if_token . cond then_token stmt
(29) if_stmt -> if_token . cond then_token stmt else_token stmt
(33) cond -> . odd_token expr
(34) cond -> . expr cmp expr
(41) expr -> . flag no_flag_expr
(42) expr -> . no_flag_expr
(46) flag -> . plus_token
(47) flag -> . minus_token
(43) no_flag_expr -> . term plus_token term
(44) no_flag_expr -> . term minus_token term
(45) no_flag_expr -> . term
(48) term -> . factor
(49) term -> . factor mul_token term
(50) term -> . factor divide_token term
(51) factor -> . ident_token
(52) factor -> . number_token
(53) factor -> . lparent_token expr rparent_token
odd_token shift and go to state 43
plus_token shift and go to state 50
minus_token shift and go to state 47
ident_token shift and go to state 51
number_token shift and go to state 52
lparent_token shift and go to state 45
no_flag_expr shift and go to state 41
term shift and go to state 42
expr shift and go to state 44
flag shift and go to state 46
cond shift and go to state 54
factor shift and go to state 49
state 23
(22) stmt -> empty .
period_token reduce using rule 22 (stmt -> empty .)
semicolom_token reduce using rule 22 (stmt -> empty .)
end_token reduce using rule 22 (stmt -> empty .)
else_token reduce using rule 22 (stmt -> empty .)
state 24
(21) stmt -> write_stmt .
period_token reduce using rule 21 (stmt -> write_stmt .)
semicolom_token reduce using rule 21 (stmt -> write_stmt .)
end_token reduce using rule 21 (stmt -> write_stmt .)
else_token reduce using rule 21 (stmt -> write_stmt .)
state 25
(16) stmt -> call_stmt .
period_token reduce using rule 16 (stmt -> call_stmt .)
semicolom_token reduce using rule 16 (stmt -> call_stmt .)
end_token reduce using rule 16 (stmt -> call_stmt .)
else_token reduce using rule 16 (stmt -> call_stmt .)
state 26
(2) block -> con_dec var_dec proc_dec stmt .
semicolom_token reduce using rule 2 (block -> con_dec var_dec proc_dec stmt .)
period_token reduce using rule 2 (block -> con_dec var_dec proc_dec stmt .)
state 27
(23) assign_stmt -> ident_token . become_token expr
become_token shift and go to state 55
state 28
(17) stmt -> begin_stmt .
period_token reduce using rule 17 (stmt -> begin_stmt .)
semicolom_token reduce using rule 17 (stmt -> begin_stmt .)
end_token reduce using rule 17 (stmt -> begin_stmt .)
else_token reduce using rule 17 (stmt -> begin_stmt .)
state 29
(18) stmt -> if_stmt .
period_token reduce using rule 18 (stmt -> if_stmt .)
semicolom_token reduce using rule 18 (stmt -> if_stmt .)
end_token reduce using rule 18 (stmt -> if_stmt .)
else_token reduce using rule 18 (stmt -> if_stmt .)
state 30
(31) read_stmt -> read_token . ident_token
ident_token shift and go to state 56
state 31
(19) stmt -> while_stmt .
period_token reduce using rule 19 (stmt -> while_stmt .)
semicolom_token reduce using rule 19 (stmt -> while_stmt .)
end_token reduce using rule 19 (stmt -> while_stmt .)
else_token reduce using rule 19 (stmt -> while_stmt .)
state 32
(24) call_stmt -> call_token . ident_token
ident_token shift and go to state 57
state 33
(32) write_stmt -> write_token . expr
(41) expr -> . flag no_flag_expr
(42) expr -> . no_flag_expr
(46) flag -> . plus_token
(47) flag -> . minus_token
(43) no_flag_expr -> . term plus_token term
(44) no_flag_expr -> . term minus_token term
(45) no_flag_expr -> . term
(48) term -> . factor
(49) term -> . factor mul_token term
(50) term -> . factor divide_token term
(51) factor -> . ident_token
(52) factor -> . number_token
(53) factor -> . lparent_token expr rparent_token
plus_token shift and go to state 50
minus_token shift and go to state 47
ident_token shift and go to state 51
number_token shift and go to state 52
lparent_token shift and go to state 45
no_flag_expr shift and go to state 41
expr shift and go to state 58
flag shift and go to state 46
term shift and go to state 42
factor shift and go to state 49
state 34
(7) var_dec -> var_token ident_token var_dec_cdr . semicolom_token
semicolom_token shift and go to state 59
state 35
(9) var_dec_cdr -> comma_token . ident_token var_dec_cdr
ident_token shift and go to state 60
state 36
(10) var_dec_cdr -> empty .
semicolom_token reduce using rule 10 (var_dec_cdr -> empty .)
state 37
(3) con_dec -> const_token ident_token eql_token number_token con_dec_cdr . semicolom_token
semicolom_token shift and go to state 61
state 38
(5) con_dec_cdr -> comma_token . ident_token eql_token number_token con_dec_cdr
ident_token shift and go to state 62
state 39
(6) con_dec_cdr -> empty .
semicolom_token reduce using rule 6 (con_dec_cdr -> empty .)
state 40
(11) proc_dec -> proc_token ident_token semicolom_token . block semicolom_token proc_dec_cdr
(2) block -> . con_dec var_dec proc_dec stmt
(3) con_dec -> . const_token ident_token eql_token number_token con_dec_cdr semicolom_token
(4) con_dec -> . empty
(54) empty -> .
const_token shift and go to state 1
var_token reduce using rule 54 (empty -> .)
proc_token reduce using rule 54 (empty -> .)
ident_token reduce using rule 54 (empty -> .)
call_token reduce using rule 54 (empty -> .)
begin_token reduce using rule 54 (empty -> .)
if_token reduce using rule 54 (empty -> .)
while_token reduce using rule 54 (empty -> .)
read_token reduce using rule 54 (empty -> .)
write_token reduce using rule 54 (empty -> .)
semicolom_token reduce using rule 54 (empty -> .)
empty shift and go to state 3
con_dec shift and go to state 4
block shift and go to state 63
state 41
(42) expr -> no_flag_expr .
do_token reduce using rule 42 (expr -> no_flag_expr .)
then_token reduce using rule 42 (expr -> no_flag_expr .)
period_token reduce using rule 42 (expr -> no_flag_expr .)
semicolom_token reduce using rule 42 (expr -> no_flag_expr .)
end_token reduce using rule 42 (expr -> no_flag_expr .)
else_token reduce using rule 42 (expr -> no_flag_expr .)
rparent_token reduce using rule 42 (expr -> no_flag_expr .)
eql_token reduce using rule 42 (expr -> no_flag_expr .)
les_token reduce using rule 42 (expr -> no_flag_expr .)
leq_token reduce using rule 42 (expr -> no_flag_expr .)
grt_token reduce using rule 42 (expr -> no_flag_expr .)
geq_token reduce using rule 42 (expr -> no_flag_expr .)
neq_token reduce using rule 42 (expr -> no_flag_expr .)
state 42
(43) no_flag_expr -> term . plus_token term
(44) no_flag_expr -> term . minus_token term
(45) no_flag_expr -> term .
plus_token shift and go to state 64
minus_token shift and go to state 65
do_token reduce using rule 45 (no_flag_expr -> term .)
then_token reduce using rule 45 (no_flag_expr -> term .)
eql_token reduce using rule 45 (no_flag_expr -> term .)
les_token reduce using rule 45 (no_flag_expr -> term .)
leq_token reduce using rule 45 (no_flag_expr -> term .)
grt_token reduce using rule 45 (no_flag_expr -> term .)
geq_token reduce using rule 45 (no_flag_expr -> term .)
neq_token reduce using rule 45 (no_flag_expr -> term .)
period_token reduce using rule 45 (no_flag_expr -> term .)
semicolom_token reduce using rule 45 (no_flag_expr -> term .)
end_token reduce using rule 45 (no_flag_expr -> term .)
else_token reduce using rule 45 (no_flag_expr -> term .)
rparent_token reduce using rule 45 (no_flag_expr -> term .)
state 43
(33) cond -> odd_token . expr
(41) expr -> . flag no_flag_expr
(42) expr -> . no_flag_expr
(46) flag -> . plus_token
(47) flag -> . minus_token
(43) no_flag_expr -> . term plus_token term
(44) no_flag_expr -> . term minus_token term
(45) no_flag_expr -> . term
(48) term -> . factor
(49) term -> . factor mul_token term
(50) term -> . factor divide_token term
(51) factor -> . ident_token
(52) factor -> . number_token
(53) factor -> . lparent_token expr rparent_token
plus_token shift and go to state 50
minus_token shift and go to state 47
ident_token shift and go to state 51
number_token shift and go to state 52
lparent_token shift and go to state 45
no_flag_expr shift and go to state 41
expr shift and go to state 66
flag shift and go to state 46
term shift and go to state 42
factor shift and go to state 49
state 44
(34) cond -> expr . cmp expr
(35) cmp -> . eql_token
(36) cmp -> . les_token
(37) cmp -> . leq_token
(38) cmp -> . grt_token
(39) cmp -> . geq_token
(40) cmp -> . neq_token
eql_token shift and go to state 70
les_token shift and go to state 71
leq_token shift and go to state 67
grt_token shift and go to state 68
geq_token shift and go to state 69
neq_token shift and go to state 72
cmp shift and go to state 73
state 45
(53) factor -> lparent_token . expr rparent_token
(41) expr -> . flag no_flag_expr
(42) expr -> . no_flag_expr
(46) flag -> . plus_token
(47) flag -> . minus_token
(43) no_flag_expr -> . term plus_token term
(44) no_flag_expr -> . term minus_token term
(45) no_flag_expr -> . term
(48) term -> . factor
(49) term -> . factor mul_token term
(50) term -> . factor divide_token term
(51) factor -> . ident_token
(52) factor -> . number_token
(53) factor -> . lparent_token expr rparent_token
plus_token shift and go to state 50
minus_token shift and go to state 47
ident_token shift and go to state 51
number_token shift and go to state 52
lparent_token shift and go to state 45
no_flag_expr shift and go to state 41
expr shift and go to state 74
flag shift and go to state 46
term shift and go to state 42
factor shift and go to state 49
state 46
(41) expr -> flag . no_flag_expr
(43) no_flag_expr -> . term plus_token term
(44) no_flag_expr -> . term minus_token term
(45) no_flag_expr -> . term
(48) term -> . factor
(49) term -> . factor mul_token term
(50) term -> . factor divide_token term
(51) factor -> . ident_token
(52) factor -> . number_token
(53) factor -> . lparent_token expr rparent_token
ident_token shift and go to state 51
number_token shift and go to state 52
lparent_token shift and go to state 45
no_flag_expr shift and go to state 75
term shift and go to state 42
factor shift and go to state 49
state 47
(47) flag -> minus_token .
ident_token reduce using rule 47 (flag -> minus_token .)
number_token reduce using rule 47 (flag -> minus_token .)
lparent_token reduce using rule 47 (flag -> minus_token .)
state 48
(30) while_stmt -> while_token cond . do_token stmt
do_token shift and go to state 76
state 49
(48) term -> factor .
(49) term -> factor . mul_token term
(50) term -> factor . divide_token term
plus_token reduce using rule 48 (term -> factor .)
minus_token reduce using rule 48 (term -> factor .)
eql_token reduce using rule 48 (term -> factor .)
les_token reduce using rule 48 (term -> factor .)
leq_token reduce using rule 48 (term -> factor .)
grt_token reduce using rule 48 (term -> factor .)
geq_token reduce using rule 48 (term -> factor .)
neq_token reduce using rule 48 (term -> factor .)
rparent_token reduce using rule 48 (term -> factor .)
period_token reduce using rule 48 (term -> factor .)
semicolom_token reduce using rule 48 (term -> factor .)
end_token reduce using rule 48 (term -> factor .)
else_token reduce using rule 48 (term -> factor .)
do_token reduce using rule 48 (term -> factor .)
then_token reduce using rule 48 (term -> factor .)
mul_token shift and go to state 77
divide_token shift and go to state 78
state 50
(46) flag -> plus_token .
ident_token reduce using rule 46 (flag -> plus_token .)
number_token reduce using rule 46 (flag -> plus_token .)
lparent_token reduce using rule 46 (flag -> plus_token .)
state 51
(51) factor -> ident_token .
mul_token reduce using rule 51 (factor -> ident_token .)
divide_token reduce using rule 51 (factor -> ident_token .)
plus_token reduce using rule 51 (factor -> ident_token .)
minus_token reduce using rule 51 (factor -> ident_token .)
period_token reduce using rule 51 (factor -> ident_token .)
semicolom_token reduce using rule 51 (factor -> ident_token .)
end_token reduce using rule 51 (factor -> ident_token .)
else_token reduce using rule 51 (factor -> ident_token .)
eql_token reduce using rule 51 (factor -> ident_token .)
les_token reduce using rule 51 (factor -> ident_token .)
leq_token reduce using rule 51 (factor -> ident_token .)
grt_token reduce using rule 51 (factor -> ident_token .)
geq_token reduce using rule 51 (factor -> ident_token .)
neq_token reduce using rule 51 (factor -> ident_token .)
do_token reduce using rule 51 (factor -> ident_token .)
then_token reduce using rule 51 (factor -> ident_token .)
rparent_token reduce using rule 51 (factor -> ident_token .)
state 52
(52) factor -> number_token .
mul_token reduce using rule 52 (factor -> number_token .)
divide_token reduce using rule 52 (factor -> number_token .)
plus_token reduce using rule 52 (factor -> number_token .)
minus_token reduce using rule 52 (factor -> number_token .)
period_token reduce using rule 52 (factor -> number_token .)
semicolom_token reduce using rule 52 (factor -> number_token .)
end_token reduce using rule 52 (factor -> number_token .)
else_token reduce using rule 52 (factor -> number_token .)
eql_token reduce using rule 52 (factor -> number_token .)
les_token reduce using rule 52 (factor -> number_token .)
leq_token reduce using rule 52 (factor -> number_token .)
grt_token reduce using rule 52 (factor -> number_token .)
geq_token reduce using rule 52 (factor -> number_token .)
neq_token reduce using rule 52 (factor -> number_token .)
do_token reduce using rule 52 (factor -> number_token .)
then_token reduce using rule 52 (factor -> number_token .)
rparent_token reduce using rule 52 (factor -> number_token .)
state 53
(25) begin_stmt -> begin_token stmt . begin_stmt_cdr end_token
(26) begin_stmt_cdr -> . semicolom_token stmt begin_stmt_cdr
(27) begin_stmt_cdr -> . empty
(54) empty -> .
semicolom_token shift and go to state 79
end_token reduce using rule 54 (empty -> .)
empty shift and go to state 81
begin_stmt_cdr shift and go to state 80
state 54
(28) if_stmt -> if_token cond . then_token stmt
(29) if_stmt -> if_token cond . then_token stmt else_token stmt
then_token shift and go to state 82
state 55
(23) assign_stmt -> ident_token become_token . expr
(41) expr -> . flag no_flag_expr
(42) expr -> . no_flag_expr
(46) flag -> . plus_token
(47) flag -> . minus_token
(43) no_flag_expr -> . term plus_token term
(44) no_flag_expr -> . term minus_token term
(45) no_flag_expr -> . term
(48) term -> . factor
(49) term -> . factor mul_token term
(50) term -> . factor divide_token term
(51) factor -> . ident_token
(52) factor -> . number_token
(53) factor -> . lparent_token expr rparent_token
plus_token shift and go to state 50
minus_token shift and go to state 47
ident_token shift and go to state 51
number_token shift and go to state 52
lparent_token shift and go to state 45
no_flag_expr shift and go to state 41
expr shift and go to state 83
flag shift and go to state 46
term shift and go to state 42
factor shift and go to state 49
state 56
(31) read_stmt -> read_token ident_token .
period_token reduce using rule 31 (read_stmt -> read_token ident_token .)
semicolom_token reduce using rule 31 (read_stmt -> read_token ident_token .)
end_token reduce using rule 31 (read_stmt -> read_token ident_token .)
else_token reduce using rule 31 (read_stmt -> read_token ident_token .)
state 57
(24) call_stmt -> call_token ident_token .
period_token reduce using rule 24 (call_stmt -> call_token ident_token .)
semicolom_token reduce using rule 24 (call_stmt -> call_token ident_token .)
end_token reduce using rule 24 (call_stmt -> call_token ident_token .)
else_token reduce using rule 24 (call_stmt -> call_token ident_token .)
state 58
(32) write_stmt -> write_token expr .
semicolom_token reduce using rule 32 (write_stmt -> write_token expr .)
end_token reduce using rule 32 (write_stmt -> write_token expr .)
period_token reduce using rule 32 (write_stmt -> write_token expr .)
else_token reduce using rule 32 (write_stmt -> write_token expr .)