-
Notifications
You must be signed in to change notification settings - Fork 51
/
y.output
7034 lines (4752 loc) · 160 KB
/
y.output
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
State 0 conflicts: 1 shift/reduce
State 88 conflicts: 1 shift/reduce
State 91 conflicts: 1 shift/reduce
State 101 conflicts: 1 shift/reduce
State 105 conflicts: 1 shift/reduce
State 187 conflicts: 1 shift/reduce
State 261 conflicts: 1 shift/reduce
State 310 conflicts: 1 shift/reduce
State 374 conflicts: 2 shift/reduce
Grammar
0 $accept: block $end
1 block: /* empty */
2 | '.' NL
3 @1: /* empty */
4 block: block @1 debug xstmt
5 | script_params
6 | script_body
7 | error NL
8 debug: /* empty */
9 @2: /* empty */
10 debug: D_XXX EOST @2 debug
11 D_XXX: D_D
12 | D_PEEK Y_CONSTANT
13 | '~'
14 script_params: proc_stmt var_decls begin_stmt
15 @3: /* empty */
16 script_body: begin_stmt @3 s_list opnl end_stmt
17 @4: /* empty */
18 proc_stmt: Y_PROCEDURE @4 param bparam_list EOST
19 bparam_list: /* empty */
20 | LP param_list RP
21 param_list: /* empty */
22 | xparam_list
23 xparam_list: param
24 | xparam_list DELIM param
25 var_decls: /* empty */
26 | var_decl_block
27 var_decl_block: var_decl_line
28 | var_decl_block var_decl_line
29 var_decl_line: EOST
30 | var_decl_stmt
31 | error NL
32 @5: /* empty */
33 var_decl_stmt: typedefs @5 var_decl_list EOST
34 typedefs: Y_BOOL
35 | Y_STRING
36 | Y_REAL
37 | Y_FILE
38 | Y_GCUR
39 | Y_IMCUR
40 | Y_UKEY
41 | Y_PSET
42 | Y_INT
43 | Y_STRUCT
44 var_decl_list: var_decl_plus
45 | var_decl_plus DELIM var_decl_list
46 var_decl_plus: var_decl
47 | var_decl '{' options_list ';' '}'
48 var_decl: var_def
49 @6: /* empty */
50 var_decl: var_def '=' @6 init_list
51 var_def: var_name
52 @7: /* empty */
53 var_def: var_name @7 '[' init_index_list ']'
54 var_name: param
55 | '*' param
56 init_index_list: /* empty */
57 | init_index_range
58 | init_index_list DELIM init_index_range
59 init_index_range: const
60 | const ':' const
61 init_list: init_elem
62 | init_list DELIM init_elem
63 init_elem: const
64 | Y_CONSTANT LP const RP
65 const: Y_CONSTANT
66 | number
67 number: sign Y_CONSTANT
68 sign: '+'
69 | '-'
70 options_list: init_list DELIM options
71 | init_list
72 | options
73 options: option
74 | options DELIM option
75 option: Y_IDENT '=' const
76 begin_stmt: Y_BEGIN NL
77 expr: expr0
78 | ref
79 expr0: expr1
80 | Y_CONSTANT
81 | Y_GCUR
82 | Y_IMCUR
83 | Y_UKEY
84 | Y_PSET
85 expr1: LP expr RP
86 | expr '+' opnl expr
87 | expr '-' opnl expr
88 | expr '*' opnl expr
89 | expr '/' opnl expr
90 | expr YOP_POW opnl expr
91 | expr '%' opnl expr
92 | expr YOP_CONCAT opnl expr
93 | expr '<' opnl expr
94 | expr '>' opnl expr
95 | expr YOP_LE opnl expr
96 | expr YOP_GE opnl expr
97 | expr YOP_EQ opnl expr
98 | expr YOP_NE opnl expr
99 | expr YOP_OR opnl expr
100 | expr YOP_AND opnl expr
101 | YOP_NOT expr
102 | '-' expr
103 @8: /* empty */
104 expr1: Y_SCAN LP @8 scanarg RP
105 @9: /* empty */
106 expr1: Y_SCANF LP @9 scanfmt DELIM scanarg RP
107 @10: /* empty */
108 expr1: Y_FSCAN LP @10 scanarg RP
109 @11: /* empty */
110 expr1: Y_FSCANF LP Y_IDENT DELIM @11 scanfmt DELIM scanarg RP
111 @12: /* empty */
112 expr1: intrinsx LP @12 intrarg RP
113 intrinsx: intrins
114 | Y_INT
115 | Y_REAL
116 scanfmt: expr
117 scanarg: /* empty */
118 | Y_IDENT
119 | Y_IDENT DELIM scanarg
120 intrarg: /* empty */
121 | expr
122 | intrarg DELIM expr
123 stmt: c_stmt
124 | assign EOST
125 | cmdlist EOST
126 | immed EOST
127 | inspect EOST
128 | osesc EOST
129 | popstk EOST
130 | if
131 | ifelse
132 | iferr
133 | iferr_else
134 | while
135 | for
136 | switch
137 | case
138 | default
139 | next EOST
140 | break EOST
141 | goto EOST
142 | return EOST
143 | label_stmt
144 | nullstmt
145 c_stmt: c_blk
146 | c_blk NL
147 @13: /* empty */
148 @14: /* empty */
149 c_blk: '{' @13 s_list opnl @14 '}'
150 s_list: /* empty */
151 | s_list opnl xstmt
152 assign: ref equals expr0
153 | ref equals ref
154 @15: /* empty */
155 assign: ref @15 assign_oper expr
156 equals: '='
157 assign_oper: YOP_AOADD
158 | YOP_AOSUB
159 | YOP_AOMUL
160 | YOP_AODIV
161 | YOP_AOCAT
162 @16: /* empty */
163 cmdlist: command @16 cmdpipe
164 cmdpipe: /* empty */
165 @17: /* empty */
166 cmdpipe: cmdpipe pipe @17 command
167 pipe: '|' opnl
168 | Y_ALLPIPE opnl
169 @18: /* empty */
170 @19: /* empty */
171 command: tasknam @18 BARG @19 args EARG
172 @20: /* empty */
173 args: DELIM @20 arglist
174 | arglist
175 arglist: arg
176 | arglist DELIM arg
177 arg: /* empty */
178 | expr0
179 | ref
180 | ref '=' expr0
181 | ref '=' ref
182 | param '+'
183 | param '-'
184 | '<' file
185 | '>' file
186 | Y_ALLREDIR file
187 | Y_APPEND file
188 | Y_ALLAPPEND file
189 | Y_GSREDIR file
190 file: expr0
191 | param
192 immed: equals expr0
193 | equals ref
194 inspect: ref equals
195 osesc: Y_OSESC
196 popstk: equals
197 iferr: iferr_stat
198 @21: /* empty */
199 @22: /* empty */
200 iferr_stat: iferr_tok @21 c_blk @22 op_then opnl xstmt
201 @23: /* empty */
202 iferr_else: iferr_stat Y_ELSE @23 opnl xstmt
203 iferr_tok: Y_IFERR
204 | Y_IFNOERR
205 op_then: /* empty */
206 | Y_THEN
207 if: if_stat
208 @24: /* empty */
209 if_stat: Y_IF LP expr RP @24 opnl xstmt
210 @25: /* empty */
211 ifelse: if_stat Y_ELSE @25 opnl xstmt
212 @26: /* empty */
213 @27: /* empty */
214 while: Y_WHILE LP @26 expr RP @27 opnl xstmt
215 @28: /* empty */
216 @29: /* empty */
217 @30: /* empty */
218 for: Y_FOR LP opnl xassign ';' opnl @28 xexpr ';' opnl @29 xassign RP opnl @30 stmt
219 xassign: assign
220 | /* empty */
221 xexpr: expr
222 | /* empty */
223 @31: /* empty */
224 switch: Y_SWITCH opnl LP opnl expr opnl RP opnl @31 xstmt
225 @32: /* empty */
226 @33: /* empty */
227 case: Y_CASE @32 const_expr_list ':' opnl @33 xstmt
228 @34: /* empty */
229 default: Y_DEFAULT ':' opnl @34 xstmt
230 next: Y_NEXT
231 break: Y_BREAK
232 return: Y_RETURN
233 | Y_RETURN expr
234 end_stmt: Y_END NL
235 @35: /* empty */
236 label_stmt: Y_IDENT ':' opnl @35 xstmt
237 goto: Y_GOTO Y_IDENT
238 nullstmt: ';'
239 | ';' NL
240 @36: /* empty */
241 xstmt: @36 stmt
242 | var_decl_stmt
243 | error NL
244 const_expr_list: const_expr
245 | const_expr DELIM const_expr_list
246 const_expr: const
247 opnl: /* empty */
248 | NL
249 ref: param
250 @37: /* empty */
251 ref: param @37 '[' index_list ']'
252 index_list: index
253 @38: /* empty */
254 index_list: index @38 DELIM index_list
255 index: expr1
256 | ref
257 | '*'
258 | Y_CONSTANT
259 intrins: Y_IDENT
260 param: Y_IDENT
261 tasknam: Y_IDENT
262 EOST: NL
263 | ';'
264 DELIM: ','
265 BARG: /* empty */
266 | LP
267 EARG: /* empty */
268 | RP
269 LP: '('
270 RP: ')'
271 NL: Y_NEWLINE
Terminals, with rules where they appear
$end (0) 0
'%' (37) 91
'(' (40) 269
')' (41) 270
'*' (42) 55 88 257
'+' (43) 68 86 182
',' (44) 264
'-' (45) 69 87 102 183
'.' (46) 2
'/' (47) 89
':' (58) 60 227 229 236
';' (59) 47 218 238 239 263
'<' (60) 93 184
'=' (61) 50 75 156 180 181
'>' (62) 94 185
'[' (91) 53 251
']' (93) 53 251
'{' (123) 47 149
'|' (124) 167
'}' (125) 47 149
'~' (126) 13
error (256) 7 31 243
Y_SCAN (258) 104
Y_SCANF (259) 106
Y_FSCAN (260) 108
Y_FSCANF (261) 110
Y_OSESC (262) 195
Y_APPEND (263) 187
Y_ALLAPPEND (264) 188
Y_ALLREDIR (265) 186
Y_GSREDIR (266) 189
Y_ALLPIPE (267) 168
D_D (268) 11
D_PEEK (269) 12
Y_NEWLINE (270) 271
Y_CONSTANT (271) 12 64 65 67 80 258
Y_IDENT (272) 75 110 118 119 236 237 259 260 261
Y_WHILE (273) 214
Y_IF (274) 209
Y_ELSE (275) 202 211
Y_FOR (276) 218
Y_BREAK (277) 231
Y_NEXT (278) 230
Y_SWITCH (279) 224
Y_CASE (280) 227
Y_DEFAULT (281) 229
Y_RETURN (282) 232 233
Y_GOTO (283) 237
Y_PROCEDURE (284) 18
Y_BEGIN (285) 76
Y_END (286) 234
Y_BOOL (287) 34
Y_INT (288) 42 114
Y_REAL (289) 36 115
Y_STRING (290) 35
Y_FILE (291) 37
Y_STRUCT (292) 43
Y_GCUR (293) 38 81
Y_IMCUR (294) 39 82
Y_UKEY (295) 40 83
Y_PSET (296) 41 84
Y_IFERR (297) 203
Y_IFNOERR (298) 204
Y_THEN (299) 206
YOP_AOCAT (300) 161
YOP_AODIV (301) 160
YOP_AOMUL (302) 159
YOP_AOSUB (303) 158
YOP_AOADD (304) 157
YOP_OR (305) 99
YOP_AND (306) 100
YOP_NE (307) 98
YOP_EQ (308) 97
YOP_GE (309) 96
YOP_LE (310) 95
YOP_CONCAT (311) 92
UMINUS (312)
YOP_NOT (313) 101
YOP_POW (314) 90
Nonterminals, with rules where they appear
$accept (80)
on left: 0
block (81)
on left: 1 2 4 5 6 7, on right: 0 4
@1 (82)
on left: 3, on right: 4
debug (83)
on left: 8 10, on right: 4 10
@2 (84)
on left: 9, on right: 10
D_XXX (85)
on left: 11 12 13, on right: 10
script_params (86)
on left: 14, on right: 5
script_body (87)
on left: 16, on right: 6
@3 (88)
on left: 15, on right: 16
proc_stmt (89)
on left: 18, on right: 14
@4 (90)
on left: 17, on right: 18
bparam_list (91)
on left: 19 20, on right: 18
param_list (92)
on left: 21 22, on right: 20
xparam_list (93)
on left: 23 24, on right: 22 24
var_decls (94)
on left: 25 26, on right: 14
var_decl_block (95)
on left: 27 28, on right: 26 28
var_decl_line (96)
on left: 29 30 31, on right: 27 28
var_decl_stmt (97)
on left: 33, on right: 30 242
@5 (98)
on left: 32, on right: 33
typedefs (99)
on left: 34 35 36 37 38 39 40 41 42 43, on right: 33
var_decl_list (100)
on left: 44 45, on right: 33 45
var_decl_plus (101)
on left: 46 47, on right: 44 45
var_decl (102)
on left: 48 50, on right: 46 47
@6 (103)
on left: 49, on right: 50
var_def (104)
on left: 51 53, on right: 48 50
@7 (105)
on left: 52, on right: 53
var_name (106)
on left: 54 55, on right: 51 53
init_index_list (107)
on left: 56 57 58, on right: 53 58
init_index_range (108)
on left: 59 60, on right: 57 58
init_list (109)
on left: 61 62, on right: 50 62 70 71
init_elem (110)
on left: 63 64, on right: 61 62
const (111)
on left: 65 66, on right: 59 60 63 64 75 246
number (112)
on left: 67, on right: 66
sign (113)
on left: 68 69, on right: 67
options_list (114)
on left: 70 71 72, on right: 47
options (115)
on left: 73 74, on right: 70 72 74
option (116)
on left: 75, on right: 73 74
begin_stmt (117)
on left: 76, on right: 14 16
expr (118)
on left: 77 78, on right: 85 86 87 88 89 90 91 92 93 94 95 96 97
98 99 100 101 102 116 121 122 155 209 214 221 224 233
expr0 (119)
on left: 79 80 81 82 83 84, on right: 77 152 178 180 190 192
expr1 (120)
on left: 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
104 106 108 110 112, on right: 79 255
@8 (121)
on left: 103, on right: 104
@9 (122)
on left: 105, on right: 106
@10 (123)
on left: 107, on right: 108
@11 (124)
on left: 109, on right: 110
@12 (125)
on left: 111, on right: 112
intrinsx (126)
on left: 113 114 115, on right: 112
scanfmt (127)
on left: 116, on right: 106 110
scanarg (128)
on left: 117 118 119, on right: 104 106 108 110 119
intrarg (129)
on left: 120 121 122, on right: 112 122
stmt (130)
on left: 123 124 125 126 127 128 129 130 131 132 133 134 135 136
137 138 139 140 141 142 143 144, on right: 218 241
c_stmt (131)
on left: 145 146, on right: 123
c_blk (132)
on left: 149, on right: 145 146 200
@13 (133)
on left: 147, on right: 149
@14 (134)
on left: 148, on right: 149
s_list (135)
on left: 150 151, on right: 16 149 151
assign (136)
on left: 152 153 155, on right: 124 219
@15 (137)
on left: 154, on right: 155
equals (138)
on left: 156, on right: 152 153 192 193 194 196
assign_oper (139)
on left: 157 158 159 160 161, on right: 155
cmdlist (140)
on left: 163, on right: 125
@16 (141)
on left: 162, on right: 163
cmdpipe (142)
on left: 164 166, on right: 163 166
@17 (143)
on left: 165, on right: 166
pipe (144)
on left: 167 168, on right: 166
command (145)
on left: 171, on right: 163 166
@18 (146)
on left: 169, on right: 171
@19 (147)
on left: 170, on right: 171
args (148)
on left: 173 174, on right: 171
@20 (149)
on left: 172, on right: 173
arglist (150)
on left: 175 176, on right: 173 174 176
arg (151)
on left: 177 178 179 180 181 182 183 184 185 186 187 188 189,
on right: 175 176
file (152)
on left: 190 191, on right: 184 185 186 187 188 189
immed (153)
on left: 192 193, on right: 126
inspect (154)
on left: 194, on right: 127
osesc (155)
on left: 195, on right: 128
popstk (156)
on left: 196, on right: 129
iferr (157)
on left: 197, on right: 132
iferr_stat (158)
on left: 200, on right: 197 202
@21 (159)
on left: 198, on right: 200
@22 (160)
on left: 199, on right: 200
iferr_else (161)
on left: 202, on right: 133
@23 (162)
on left: 201, on right: 202
iferr_tok (163)
on left: 203 204, on right: 200
op_then (164)
on left: 205 206, on right: 200
if (165)
on left: 207, on right: 130
if_stat (166)
on left: 209, on right: 207 211
@24 (167)
on left: 208, on right: 209
ifelse (168)
on left: 211, on right: 131
@25 (169)
on left: 210, on right: 211
while (170)
on left: 214, on right: 134
@26 (171)
on left: 212, on right: 214
@27 (172)
on left: 213, on right: 214
for (173)
on left: 218, on right: 135
@28 (174)
on left: 215, on right: 218
@29 (175)
on left: 216, on right: 218
@30 (176)
on left: 217, on right: 218
xassign (177)
on left: 219 220, on right: 218
xexpr (178)
on left: 221 222, on right: 218
switch (179)
on left: 224, on right: 136
@31 (180)
on left: 223, on right: 224
case (181)
on left: 227, on right: 137
@32 (182)
on left: 225, on right: 227
@33 (183)
on left: 226, on right: 227
default (184)
on left: 229, on right: 138
@34 (185)
on left: 228, on right: 229
next (186)
on left: 230, on right: 139
break (187)
on left: 231, on right: 140
return (188)
on left: 232 233, on right: 142
end_stmt (189)
on left: 234, on right: 16
label_stmt (190)
on left: 236, on right: 143
@35 (191)
on left: 235, on right: 236
goto (192)
on left: 237, on right: 141
nullstmt (193)
on left: 238 239, on right: 144
xstmt (194)
on left: 241 242 243, on right: 4 151 200 202 209 211 214 224 227
229 236
@36 (195)
on left: 240, on right: 241
const_expr_list (196)
on left: 244 245, on right: 227 245
const_expr (197)
on left: 246, on right: 244 245
opnl (198)
on left: 247 248, on right: 16 86 87 88 89 90 91 92 93 94 95 96
97 98 99 100 149 151 167 168 200 202 209 211 214 218 224 227 229
236
ref (199)
on left: 249 251, on right: 78 152 153 155 179 180 181 193 194
256
@37 (200)
on left: 250, on right: 251
index_list (201)
on left: 252 254, on right: 251 254
@38 (202)
on left: 253, on right: 254
index (203)
on left: 255 256 257 258, on right: 252 254
intrins (204)
on left: 259, on right: 113
param (205)
on left: 260, on right: 18 23 24 54 55 182 183 191 249 251
tasknam (206)
on left: 261, on right: 171
EOST (207)
on left: 262 263, on right: 10 18 29 33 124 125 126 127 128 129
139 140 141 142
DELIM (208)
on left: 264, on right: 24 45 58 62 70 74 106 110 119 122 173 176
245 254
BARG (209)
on left: 265 266, on right: 171
EARG (210)
on left: 267 268, on right: 171
LP (211)
on left: 269, on right: 20 64 85 104 106 108 110 112 209 214 218
224 266
RP (212)
on left: 270, on right: 20 64 85 104 106 108 110 112 209 214 218
224 268
NL (213)
on left: 271, on right: 2 7 31 76 146 234 239 243 248 262
state 0
0 $accept: . block $end
error shift, and go to state 1
Y_PROCEDURE shift, and go to state 2
Y_BEGIN shift, and go to state 3
'.' shift, and go to state 4
$end reduce using rule 1 (block)
error [reduce using rule 1 (block)]
Y_OSESC reduce using rule 1 (block)
D_D reduce using rule 1 (block)
D_PEEK reduce using rule 1 (block)
Y_IDENT reduce using rule 1 (block)
Y_WHILE reduce using rule 1 (block)
Y_IF reduce using rule 1 (block)
Y_FOR reduce using rule 1 (block)
Y_BREAK reduce using rule 1 (block)
Y_NEXT reduce using rule 1 (block)
Y_SWITCH reduce using rule 1 (block)
Y_CASE reduce using rule 1 (block)
Y_DEFAULT reduce using rule 1 (block)
Y_RETURN reduce using rule 1 (block)
Y_GOTO reduce using rule 1 (block)
Y_BOOL reduce using rule 1 (block)
Y_INT reduce using rule 1 (block)
Y_REAL reduce using rule 1 (block)
Y_STRING reduce using rule 1 (block)
Y_FILE reduce using rule 1 (block)
Y_STRUCT reduce using rule 1 (block)
Y_GCUR reduce using rule 1 (block)
Y_IMCUR reduce using rule 1 (block)
Y_UKEY reduce using rule 1 (block)
Y_PSET reduce using rule 1 (block)
Y_IFERR reduce using rule 1 (block)
Y_IFNOERR reduce using rule 1 (block)
'=' reduce using rule 1 (block)
'~' reduce using rule 1 (block)
'{' reduce using rule 1 (block)
';' reduce using rule 1 (block)
block go to state 5
script_params go to state 6
script_body go to state 7
proc_stmt go to state 8
begin_stmt go to state 9
state 1
7 block: error . NL
Y_NEWLINE shift, and go to state 10
NL go to state 11
state 2
18 proc_stmt: Y_PROCEDURE . @4 param bparam_list EOST
$default reduce using rule 17 (@4)
@4 go to state 12
state 3
76 begin_stmt: Y_BEGIN . NL
Y_NEWLINE shift, and go to state 10
NL go to state 13
state 4
2 block: '.' . NL
Y_NEWLINE shift, and go to state 10
NL go to state 14
state 5
0 $accept: block . $end
4 block: block . @1 debug xstmt
$end shift, and go to state 15
$default reduce using rule 3 (@1)
@1 go to state 16
state 6
5 block: script_params .
$default reduce using rule 5 (block)
state 7
6 block: script_body .
$default reduce using rule 6 (block)
state 8
14 script_params: proc_stmt . var_decls begin_stmt
error shift, and go to state 17
Y_NEWLINE shift, and go to state 10
Y_BOOL shift, and go to state 18
Y_INT shift, and go to state 19
Y_REAL shift, and go to state 20
Y_STRING shift, and go to state 21
Y_FILE shift, and go to state 22
Y_STRUCT shift, and go to state 23
Y_GCUR shift, and go to state 24
Y_IMCUR shift, and go to state 25
Y_UKEY shift, and go to state 26
Y_PSET shift, and go to state 27
';' shift, and go to state 28
Y_BEGIN reduce using rule 25 (var_decls)
var_decls go to state 29
var_decl_block go to state 30
var_decl_line go to state 31
var_decl_stmt go to state 32
typedefs go to state 33
EOST go to state 34
NL go to state 35
state 9
16 script_body: begin_stmt . @3 s_list opnl end_stmt
$default reduce using rule 15 (@3)
@3 go to state 36
state 10
271 NL: Y_NEWLINE .
$default reduce using rule 271 (NL)
state 11
7 block: error NL .
$default reduce using rule 7 (block)
state 12
18 proc_stmt: Y_PROCEDURE @4 . param bparam_list EOST
Y_IDENT shift, and go to state 37
param go to state 38
state 13
76 begin_stmt: Y_BEGIN NL .
$default reduce using rule 76 (begin_stmt)
state 14
2 block: '.' NL .
$default reduce using rule 2 (block)
state 15
0 $accept: block $end .
$default accept
state 16
4 block: block @1 . debug xstmt
D_D shift, and go to state 39
D_PEEK shift, and go to state 40
'~' shift, and go to state 41