Ticket #5631: test_rules2.hs

File test_rules2.hs, 30.6 KB (added by simonmar, 2 years ago)

compilation-time regression test

Line 
1{-# OPTIONS_GHC -w #-}
2import Control.Monad(when)
3import System.Exit
4
5-- parser produced by Happy Version 1.18.6
6
7data HappyAbsSyn t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 t29 t30 t31 t32 t33 t34 t35 t36 t37 t38 t39 t40 t41 t42 t43 t44 t45 t46 t47 t48 t49 t50 t51 t52 t53 t54 t55 t56 t57 t58 t59 t60 t61
8        = HappyTerminal (Char)
9        | HappyErrorToken Int
10        | HappyAbsSyn14 t14
11        | HappyAbsSyn15 t15
12        | HappyAbsSyn16 t16
13        | HappyAbsSyn17 t17
14        | HappyAbsSyn18 t18
15        | HappyAbsSyn19 t19
16        | HappyAbsSyn20 t20
17        | HappyAbsSyn21 t21
18        | HappyAbsSyn22 t22
19        | HappyAbsSyn23 t23
20        | HappyAbsSyn24 t24
21        | HappyAbsSyn25 t25
22        | HappyAbsSyn26 t26
23        | HappyAbsSyn27 t27
24        | HappyAbsSyn28 t28
25        | HappyAbsSyn29 t29
26        | HappyAbsSyn30 t30
27        | HappyAbsSyn31 t31
28        | HappyAbsSyn32 t32
29        | HappyAbsSyn33 t33
30        | HappyAbsSyn34 t34
31        | HappyAbsSyn35 t35
32        | HappyAbsSyn36 t36
33        | HappyAbsSyn37 t37
34        | HappyAbsSyn38 t38
35        | HappyAbsSyn39 t39
36        | HappyAbsSyn40 t40
37        | HappyAbsSyn41 t41
38        | HappyAbsSyn42 t42
39        | HappyAbsSyn43 t43
40        | HappyAbsSyn44 t44
41        | HappyAbsSyn45 t45
42        | HappyAbsSyn46 t46
43        | HappyAbsSyn47 t47
44        | HappyAbsSyn48 t48
45        | HappyAbsSyn49 t49
46        | HappyAbsSyn50 t50
47        | HappyAbsSyn51 t51
48        | HappyAbsSyn52 t52
49        | HappyAbsSyn53 t53
50        | HappyAbsSyn54 t54
51        | HappyAbsSyn55 t55
52        | HappyAbsSyn56 t56
53        | HappyAbsSyn57 t57
54        | HappyAbsSyn58 t58
55        | HappyAbsSyn59 t59
56        | HappyAbsSyn60 t60
57        | HappyAbsSyn61 t61
58
59action_0 (62) = happyShift action_22
60action_0 (14) = happyGoto action_66
61action_0 (17) = happyGoto action_12
62action_0 (18) = happyGoto action_13
63action_0 (19) = happyGoto action_14
64action_0 (31) = happyGoto action_15
65action_0 (32) = happyGoto action_16
66action_0 (33) = happyGoto action_17
67action_0 (35) = happyGoto action_18
68action_0 (43) = happyGoto action_19
69action_0 (44) = happyGoto action_20
70action_0 (45) = happyGoto action_21
71action_0 _ = happyFail
72
73action_1 (62) = happyShift action_22
74action_1 (15) = happyGoto action_63
75action_1 (34) = happyGoto action_64
76action_1 (35) = happyGoto action_65
77action_1 _ = happyReduce_32
78
79action_2 (62) = happyShift action_62
80action_2 (16) = happyGoto action_56
81action_2 (25) = happyGoto action_57
82action_2 (36) = happyGoto action_58
83action_2 (46) = happyGoto action_59
84action_2 (53) = happyGoto action_60
85action_2 (60) = happyGoto action_61
86action_2 _ = happyReduce_35
87
88action_3 (62) = happyShift action_22
89action_3 (17) = happyGoto action_55
90action_3 (18) = happyGoto action_13
91action_3 (19) = happyGoto action_14
92action_3 (32) = happyGoto action_16
93action_3 (33) = happyGoto action_17
94action_3 (35) = happyGoto action_18
95action_3 (44) = happyGoto action_20
96action_3 (45) = happyGoto action_21
97action_3 _ = happyFail
98
99action_4 (62) = happyShift action_22
100action_4 (18) = happyGoto action_54
101action_4 (19) = happyGoto action_14
102action_4 (33) = happyGoto action_17
103action_4 (35) = happyGoto action_18
104action_4 (45) = happyGoto action_21
105action_4 _ = happyFail
106
107action_5 (62) = happyShift action_22
108action_5 (19) = happyGoto action_53
109action_5 (35) = happyGoto action_18
110action_5 _ = happyFail
111
112action_6 (62) = happyShift action_52
113action_6 (20) = happyGoto action_47
114action_6 (26) = happyGoto action_48
115action_6 (38) = happyGoto action_49
116action_6 (47) = happyGoto action_50
117action_6 (55) = happyGoto action_51
118action_6 _ = happyFail
119
120action_7 (62) = happyShift action_46
121action_7 (21) = happyGoto action_41
122action_7 (27) = happyGoto action_42
123action_7 (39) = happyGoto action_43
124action_7 (48) = happyGoto action_44
125action_7 (56) = happyGoto action_45
126action_7 _ = happyFail
127
128action_8 (62) = happyShift action_40
129action_8 (22) = happyGoto action_35
130action_8 (28) = happyGoto action_36
131action_8 (40) = happyGoto action_37
132action_8 (49) = happyGoto action_38
133action_8 (57) = happyGoto action_39
134action_8 _ = happyFail
135
136action_9 (62) = happyShift action_34
137action_9 (23) = happyGoto action_29
138action_9 (29) = happyGoto action_30
139action_9 (41) = happyGoto action_31
140action_9 (50) = happyGoto action_32
141action_9 (58) = happyGoto action_33
142action_9 _ = happyFail
143
144action_10 (62) = happyShift action_28
145action_10 (24) = happyGoto action_23
146action_10 (30) = happyGoto action_24
147action_10 (42) = happyGoto action_25
148action_10 (51) = happyGoto action_26
149action_10 (59) = happyGoto action_27
150action_10 _ = happyFail
151
152action_11 (62) = happyShift action_22
153action_11 (17) = happyGoto action_12
154action_11 (18) = happyGoto action_13
155action_11 (19) = happyGoto action_14
156action_11 (31) = happyGoto action_15
157action_11 (32) = happyGoto action_16
158action_11 (33) = happyGoto action_17
159action_11 (35) = happyGoto action_18
160action_11 (43) = happyGoto action_19
161action_11 (44) = happyGoto action_20
162action_11 (45) = happyGoto action_21
163action_11 _ = happyFail
164
165action_12 _ = happyReduce_43
166
167action_13 _ = happyReduce_45
168
169action_14 _ = happyReduce_47
170
171action_15 _ = happyReduce_11
172
173action_16 _ = happyReduce_14
174
175action_17 _ = happyReduce_15
176
177action_18 _ = happyReduce_16
178
179action_19 (62) = happyShift action_22
180action_19 (17) = happyGoto action_86
181action_19 (18) = happyGoto action_13
182action_19 (19) = happyGoto action_14
183action_19 (32) = happyGoto action_16
184action_19 (33) = happyGoto action_17
185action_19 (35) = happyGoto action_18
186action_19 (44) = happyGoto action_20
187action_19 (45) = happyGoto action_21
188action_19 _ = happyReduce_28
189
190action_20 (62) = happyShift action_22
191action_20 (18) = happyGoto action_85
192action_20 (19) = happyGoto action_14
193action_20 (33) = happyGoto action_17
194action_20 (35) = happyGoto action_18
195action_20 (45) = happyGoto action_21
196action_20 _ = happyReduce_29
197
198action_21 (62) = happyShift action_22
199action_21 (19) = happyGoto action_84
200action_21 (35) = happyGoto action_18
201action_21 _ = happyReduce_30
202
203action_22 (63) = happyShift action_83
204action_22 (37) = happyGoto action_79
205action_22 (52) = happyGoto action_80
206action_22 (54) = happyGoto action_81
207action_22 (61) = happyGoto action_82
208action_22 _ = happyReduce_37
209
210action_23 (64) = happyAccept
211action_23 _ = happyFail
212
213action_24 _ = happyReduce_21
214
215action_25 _ = happyReduce_27
216
217action_26 _ = happyReduce_66
218
219action_27 (62) = happyShift action_28
220action_27 (51) = happyGoto action_78
221action_27 _ = happyReduce_42
222
223action_28 (62) = happyShift action_22
224action_28 (19) = happyGoto action_77
225action_28 (35) = happyGoto action_18
226action_28 _ = happyFail
227
228action_29 (64) = happyAccept
229action_29 _ = happyFail
230
231action_30 _ = happyReduce_20
232
233action_31 _ = happyReduce_26
234
235action_32 _ = happyReduce_64
236
237action_33 (62) = happyShift action_34
238action_33 (50) = happyGoto action_76
239action_33 _ = happyReduce_41
240
241action_34 (62) = happyShift action_22
242action_34 (18) = happyGoto action_75
243action_34 (19) = happyGoto action_14
244action_34 (33) = happyGoto action_17
245action_34 (35) = happyGoto action_18
246action_34 (45) = happyGoto action_21
247action_34 _ = happyFail
248
249action_35 (64) = happyAccept
250action_35 _ = happyFail
251
252action_36 _ = happyReduce_19
253
254action_37 _ = happyReduce_25
255
256action_38 _ = happyReduce_62
257
258action_39 (62) = happyShift action_40
259action_39 (49) = happyGoto action_74
260action_39 _ = happyReduce_40
261
262action_40 (62) = happyShift action_22
263action_40 (17) = happyGoto action_73
264action_40 (18) = happyGoto action_13
265action_40 (19) = happyGoto action_14
266action_40 (32) = happyGoto action_16
267action_40 (33) = happyGoto action_17
268action_40 (35) = happyGoto action_18
269action_40 (44) = happyGoto action_20
270action_40 (45) = happyGoto action_21
271action_40 _ = happyFail
272
273action_41 (64) = happyAccept
274action_41 _ = happyFail
275
276action_42 _ = happyReduce_18
277
278action_43 _ = happyReduce_24
279
280action_44 _ = happyReduce_60
281
282action_45 (62) = happyShift action_46
283action_45 (48) = happyGoto action_72
284action_45 _ = happyReduce_39
285
286action_46 (62) = happyShift action_62
287action_46 (16) = happyGoto action_71
288action_46 (25) = happyGoto action_57
289action_46 (36) = happyGoto action_58
290action_46 (46) = happyGoto action_59
291action_46 (53) = happyGoto action_60
292action_46 (60) = happyGoto action_61
293action_46 _ = happyReduce_35
294
295action_47 (64) = happyAccept
296action_47 _ = happyFail
297
298action_48 _ = happyReduce_17
299
300action_49 _ = happyReduce_23
301
302action_50 _ = happyReduce_58
303
304action_51 (62) = happyShift action_52
305action_51 (47) = happyGoto action_70
306action_51 _ = happyReduce_38
307
308action_52 (62) = happyShift action_22
309action_52 (15) = happyGoto action_69
310action_52 (34) = happyGoto action_64
311action_52 (35) = happyGoto action_65
312action_52 _ = happyReduce_32
313
314action_53 (64) = happyAccept
315action_53 _ = happyFail
316
317action_54 (64) = happyAccept
318action_54 _ = happyFail
319
320action_55 (64) = happyAccept
321action_55 _ = happyFail
322
323action_56 (64) = happyAccept
324action_56 _ = happyFail
325
326action_57 _ = happyReduce_13
327
328action_58 _ = happyReduce_22
329
330action_59 _ = happyReduce_68
331
332action_60 _ = happyReduce_34
333
334action_61 (62) = happyShift action_62
335action_61 (46) = happyGoto action_68
336action_61 _ = happyReduce_56
337
338action_62 (63) = happyShift action_67
339action_62 _ = happyFail
340
341action_63 (64) = happyAccept
342action_63 _ = happyFail
343
344action_64 _ = happyReduce_12
345
346action_65 _ = happyReduce_31
347
348action_66 (64) = happyAccept
349action_66 _ = happyFail
350
351action_67 _ = happyReduce_49
352
353action_68 _ = happyReduce_69
354
355action_69 _ = happyReduce_50
356
357action_70 _ = happyReduce_59
358
359action_71 _ = happyReduce_51
360
361action_72 _ = happyReduce_61
362
363action_73 _ = happyReduce_52
364
365action_74 _ = happyReduce_63
366
367action_75 _ = happyReduce_53
368
369action_76 _ = happyReduce_65
370
371action_77 _ = happyReduce_54
372
373action_78 _ = happyReduce_67
374
375action_79 _ = happyReduce_33
376
377action_80 _ = happyReduce_70
378
379action_81 _ = happyReduce_36
380
381action_82 (63) = happyShift action_83
382action_82 (52) = happyGoto action_88
383action_82 _ = happyReduce_57
384
385action_83 (62) = happyShift action_87
386action_83 _ = happyFail
387
388action_84 _ = happyReduce_48
389
390action_85 _ = happyReduce_46
391
392action_86 _ = happyReduce_44
393
394action_87 _ = happyReduce_55
395
396action_88 _ = happyReduce_71
397
398happyReduce_11 = happySpecReduce_1  14 happyReduction_11
399happyReduction_11 (HappyAbsSyn31  happy_var_1)
400         =  HappyAbsSyn14
401                 (happy_var_1
402        )
403happyReduction_11 _  = notHappyAtAll
404
405happyReduce_12 = happySpecReduce_1  15 happyReduction_12
406happyReduction_12 (HappyAbsSyn34  happy_var_1)
407         =  HappyAbsSyn15
408                 (happy_var_1
409        )
410happyReduction_12 _  = notHappyAtAll
411
412happyReduce_13 = happySpecReduce_1  16 happyReduction_13
413happyReduction_13 (HappyAbsSyn25  happy_var_1)
414         =  HappyAbsSyn16
415                 (happy_var_1
416        )
417happyReduction_13 _  = notHappyAtAll
418
419happyReduce_14 = happySpecReduce_1  17 happyReduction_14
420happyReduction_14 (HappyAbsSyn32  happy_var_1)
421         =  HappyAbsSyn17
422                 (happy_var_1
423        )
424happyReduction_14 _  = notHappyAtAll
425
426happyReduce_15 = happySpecReduce_1  18 happyReduction_15
427happyReduction_15 (HappyAbsSyn33  happy_var_1)
428         =  HappyAbsSyn18
429                 (happy_var_1
430        )
431happyReduction_15 _  = notHappyAtAll
432
433happyReduce_16 = happySpecReduce_1  19 happyReduction_16
434happyReduction_16 (HappyAbsSyn35  happy_var_1)
435         =  HappyAbsSyn19
436                 (happy_var_1
437        )
438happyReduction_16 _  = notHappyAtAll
439
440happyReduce_17 = happySpecReduce_1  20 happyReduction_17
441happyReduction_17 (HappyAbsSyn26  happy_var_1)
442         =  HappyAbsSyn20
443                 (happy_var_1
444        )
445happyReduction_17 _  = notHappyAtAll
446
447happyReduce_18 = happySpecReduce_1  21 happyReduction_18
448happyReduction_18 (HappyAbsSyn27  happy_var_1)
449         =  HappyAbsSyn21
450                 (happy_var_1
451        )
452happyReduction_18 _  = notHappyAtAll
453
454happyReduce_19 = happySpecReduce_1  22 happyReduction_19
455happyReduction_19 (HappyAbsSyn28  happy_var_1)
456         =  HappyAbsSyn22
457                 (happy_var_1
458        )
459happyReduction_19 _  = notHappyAtAll
460
461happyReduce_20 = happySpecReduce_1  23 happyReduction_20
462happyReduction_20 (HappyAbsSyn29  happy_var_1)
463         =  HappyAbsSyn23
464                 (happy_var_1
465        )
466happyReduction_20 _  = notHappyAtAll
467
468happyReduce_21 = happySpecReduce_1  24 happyReduction_21
469happyReduction_21 (HappyAbsSyn30  happy_var_1)
470         =  HappyAbsSyn24
471                 (happy_var_1
472        )
473happyReduction_21 _  = notHappyAtAll
474
475happyReduce_22 = happySpecReduce_1  25 happyReduction_22
476happyReduction_22 (HappyAbsSyn36  happy_var_1)
477         =  HappyAbsSyn25
478                 (happy_var_1
479        )
480happyReduction_22 _  = notHappyAtAll
481
482happyReduce_23 = happySpecReduce_1  26 happyReduction_23
483happyReduction_23 (HappyAbsSyn38  happy_var_1)
484         =  HappyAbsSyn26
485                 (happy_var_1
486        )
487happyReduction_23 _  = notHappyAtAll
488
489happyReduce_24 = happySpecReduce_1  27 happyReduction_24
490happyReduction_24 (HappyAbsSyn39  happy_var_1)
491         =  HappyAbsSyn27
492                 (happy_var_1
493        )
494happyReduction_24 _  = notHappyAtAll
495
496happyReduce_25 = happySpecReduce_1  28 happyReduction_25
497happyReduction_25 (HappyAbsSyn40  happy_var_1)
498         =  HappyAbsSyn28
499                 (happy_var_1
500        )
501happyReduction_25 _  = notHappyAtAll
502
503happyReduce_26 = happySpecReduce_1  29 happyReduction_26
504happyReduction_26 (HappyAbsSyn41  happy_var_1)
505         =  HappyAbsSyn29
506                 (happy_var_1
507        )
508happyReduction_26 _  = notHappyAtAll
509
510happyReduce_27 = happySpecReduce_1  30 happyReduction_27
511happyReduction_27 (HappyAbsSyn42  happy_var_1)
512         =  HappyAbsSyn30
513                 (happy_var_1
514        )
515happyReduction_27 _  = notHappyAtAll
516
517happyReduce_28 = happySpecReduce_1  31 happyReduction_28
518happyReduction_28 (HappyAbsSyn43  happy_var_1)
519         =  HappyAbsSyn31
520                 (reverse happy_var_1
521        )
522happyReduction_28 _  = notHappyAtAll
523
524happyReduce_29 = happySpecReduce_1  32 happyReduction_29
525happyReduction_29 (HappyAbsSyn44  happy_var_1)
526         =  HappyAbsSyn32
527                 (reverse happy_var_1
528        )
529happyReduction_29 _  = notHappyAtAll
530
531happyReduce_30 = happySpecReduce_1  33 happyReduction_30
532happyReduction_30 (HappyAbsSyn45  happy_var_1)
533         =  HappyAbsSyn33
534                 (reverse happy_var_1
535        )
536happyReduction_30 _  = notHappyAtAll
537
538happyReduce_31 = happySpecReduce_1  34 happyReduction_31
539happyReduction_31 (HappyAbsSyn35  happy_var_1)
540         =  HappyAbsSyn34
541                 (happy_var_1
542        )
543happyReduction_31 _  = notHappyAtAll
544
545happyReduce_32 = happySpecReduce_0  34 happyReduction_32
546happyReduction_32  =  HappyAbsSyn34
547                 ([]
548        )
549
550happyReduce_33 = happySpecReduce_2  35 happyReduction_33
551happyReduction_33 (HappyAbsSyn37  happy_var_2)
552        (HappyTerminal happy_var_1)
553         =  HappyAbsSyn35
554                 (happy_var_1 : happy_var_2
555        )
556happyReduction_33 _ _  = notHappyAtAll
557
558happyReduce_34 = happySpecReduce_1  36 happyReduction_34
559happyReduction_34 (HappyAbsSyn53  happy_var_1)
560         =  HappyAbsSyn36
561                 (happy_var_1
562        )
563happyReduction_34 _  = notHappyAtAll
564
565happyReduce_35 = happySpecReduce_0  36 happyReduction_35
566happyReduction_35  =  HappyAbsSyn36
567                 ([]
568        )
569
570happyReduce_36 = happySpecReduce_1  37 happyReduction_36
571happyReduction_36 (HappyAbsSyn54  happy_var_1)
572         =  HappyAbsSyn37
573                 (happy_var_1
574        )
575happyReduction_36 _  = notHappyAtAll
576
577happyReduce_37 = happySpecReduce_0  37 happyReduction_37
578happyReduction_37  =  HappyAbsSyn37
579                 ([]
580        )
581
582happyReduce_38 = happySpecReduce_1  38 happyReduction_38
583happyReduction_38 (HappyAbsSyn55  happy_var_1)
584         =  HappyAbsSyn38
585                 (reverse happy_var_1
586        )
587happyReduction_38 _  = notHappyAtAll
588
589happyReduce_39 = happySpecReduce_1  39 happyReduction_39
590happyReduction_39 (HappyAbsSyn56  happy_var_1)
591         =  HappyAbsSyn39
592                 (reverse happy_var_1
593        )
594happyReduction_39 _  = notHappyAtAll
595
596happyReduce_40 = happySpecReduce_1  40 happyReduction_40
597happyReduction_40 (HappyAbsSyn57  happy_var_1)
598         =  HappyAbsSyn40
599                 (reverse happy_var_1
600        )
601happyReduction_40 _  = notHappyAtAll
602
603happyReduce_41 = happySpecReduce_1  41 happyReduction_41
604happyReduction_41 (HappyAbsSyn58  happy_var_1)
605         =  HappyAbsSyn41
606                 (reverse happy_var_1
607        )
608happyReduction_41 _  = notHappyAtAll
609
610happyReduce_42 = happySpecReduce_1  42 happyReduction_42
611happyReduction_42 (HappyAbsSyn59  happy_var_1)
612         =  HappyAbsSyn42
613                 (reverse happy_var_1
614        )
615happyReduction_42 _  = notHappyAtAll
616
617happyReduce_43 = happySpecReduce_1  43 happyReduction_43
618happyReduction_43 (HappyAbsSyn17  happy_var_1)
619         =  HappyAbsSyn43
620                 ([happy_var_1]
621        )
622happyReduction_43 _  = notHappyAtAll
623
624happyReduce_44 = happySpecReduce_2  43 happyReduction_44
625happyReduction_44 (HappyAbsSyn17  happy_var_2)
626        (HappyAbsSyn43  happy_var_1)
627         =  HappyAbsSyn43
628                 (happy_var_2 : happy_var_1
629        )
630happyReduction_44 _ _  = notHappyAtAll
631
632happyReduce_45 = happySpecReduce_1  44 happyReduction_45
633happyReduction_45 (HappyAbsSyn18  happy_var_1)
634         =  HappyAbsSyn44
635                 ([happy_var_1]
636        )
637happyReduction_45 _  = notHappyAtAll
638
639happyReduce_46 = happySpecReduce_2  44 happyReduction_46
640happyReduction_46 (HappyAbsSyn18  happy_var_2)
641        (HappyAbsSyn44  happy_var_1)
642         =  HappyAbsSyn44
643                 (happy_var_2 : happy_var_1
644        )
645happyReduction_46 _ _  = notHappyAtAll
646
647happyReduce_47 = happySpecReduce_1  45 happyReduction_47
648happyReduction_47 (HappyAbsSyn19  happy_var_1)
649         =  HappyAbsSyn45
650                 ([happy_var_1]
651        )
652happyReduction_47 _  = notHappyAtAll
653
654happyReduce_48 = happySpecReduce_2  45 happyReduction_48
655happyReduction_48 (HappyAbsSyn19  happy_var_2)
656        (HappyAbsSyn45  happy_var_1)
657         =  HappyAbsSyn45
658                 (happy_var_2 : happy_var_1
659        )
660happyReduction_48 _ _  = notHappyAtAll
661
662happyReduce_49 = happySpecReduce_2  46 happyReduction_49
663happyReduction_49 _
664        (HappyTerminal happy_var_1)
665         =  HappyAbsSyn46
666                 (happy_var_1
667        )
668happyReduction_49 _ _  = notHappyAtAll
669
670happyReduce_50 = happySpecReduce_2  47 happyReduction_50
671happyReduction_50 _
672        (HappyTerminal happy_var_1)
673         =  HappyAbsSyn47
674                 (happy_var_1
675        )
676happyReduction_50 _ _  = notHappyAtAll
677
678happyReduce_51 = happySpecReduce_2  48 happyReduction_51
679happyReduction_51 _
680        (HappyTerminal happy_var_1)
681         =  HappyAbsSyn48
682                 (happy_var_1
683        )
684happyReduction_51 _ _  = notHappyAtAll
685
686happyReduce_52 = happySpecReduce_2  49 happyReduction_52
687happyReduction_52 _
688        (HappyTerminal happy_var_1)
689         =  HappyAbsSyn49
690                 (happy_var_1
691        )
692happyReduction_52 _ _  = notHappyAtAll
693
694happyReduce_53 = happySpecReduce_2  50 happyReduction_53
695happyReduction_53 _
696        (HappyTerminal happy_var_1)
697         =  HappyAbsSyn50
698                 (happy_var_1
699        )
700happyReduction_53 _ _  = notHappyAtAll
701
702happyReduce_54 = happySpecReduce_2  51 happyReduction_54
703happyReduction_54 _
704        (HappyTerminal happy_var_1)
705         =  HappyAbsSyn51
706                 (happy_var_1
707        )
708happyReduction_54 _ _  = notHappyAtAll
709
710happyReduce_55 = happySpecReduce_2  52 happyReduction_55
711happyReduction_55 (HappyTerminal happy_var_2)
712        _
713         =  HappyAbsSyn52
714                 (happy_var_2
715        )
716happyReduction_55 _ _  = notHappyAtAll
717
718happyReduce_56 = happySpecReduce_1  53 happyReduction_56
719happyReduction_56 (HappyAbsSyn60  happy_var_1)
720         =  HappyAbsSyn53
721                 (reverse happy_var_1
722        )
723happyReduction_56 _  = notHappyAtAll
724
725happyReduce_57 = happySpecReduce_1  54 happyReduction_57
726happyReduction_57 (HappyAbsSyn61  happy_var_1)
727         =  HappyAbsSyn54
728                 (reverse happy_var_1
729        )
730happyReduction_57 _  = notHappyAtAll
731
732happyReduce_58 = happySpecReduce_1  55 happyReduction_58
733happyReduction_58 (HappyAbsSyn47  happy_var_1)
734         =  HappyAbsSyn55
735                 ([happy_var_1]
736        )
737happyReduction_58 _  = notHappyAtAll
738
739happyReduce_59 = happySpecReduce_2  55 happyReduction_59
740happyReduction_59 (HappyAbsSyn47  happy_var_2)
741        (HappyAbsSyn55  happy_var_1)
742         =  HappyAbsSyn55
743                 (happy_var_2 : happy_var_1
744        )
745happyReduction_59 _ _  = notHappyAtAll
746
747happyReduce_60 = happySpecReduce_1  56 happyReduction_60
748happyReduction_60 (HappyAbsSyn48  happy_var_1)
749         =  HappyAbsSyn56
750                 ([happy_var_1]
751        )
752happyReduction_60 _  = notHappyAtAll
753
754happyReduce_61 = happySpecReduce_2  56 happyReduction_61
755happyReduction_61 (HappyAbsSyn48  happy_var_2)
756        (HappyAbsSyn56  happy_var_1)
757         =  HappyAbsSyn56
758                 (happy_var_2 : happy_var_1
759        )
760happyReduction_61 _ _  = notHappyAtAll
761
762happyReduce_62 = happySpecReduce_1  57 happyReduction_62
763happyReduction_62 (HappyAbsSyn49  happy_var_1)
764         =  HappyAbsSyn57
765                 ([happy_var_1]
766        )
767happyReduction_62 _  = notHappyAtAll
768
769happyReduce_63 = happySpecReduce_2  57 happyReduction_63
770happyReduction_63 (HappyAbsSyn49  happy_var_2)
771        (HappyAbsSyn57  happy_var_1)
772         =  HappyAbsSyn57
773                 (happy_var_2 : happy_var_1
774        )
775happyReduction_63 _ _  = notHappyAtAll
776
777happyReduce_64 = happySpecReduce_1  58 happyReduction_64
778happyReduction_64 (HappyAbsSyn50  happy_var_1)
779         =  HappyAbsSyn58
780                 ([happy_var_1]
781        )
782happyReduction_64 _  = notHappyAtAll
783
784happyReduce_65 = happySpecReduce_2  58 happyReduction_65
785happyReduction_65 (HappyAbsSyn50  happy_var_2)
786        (HappyAbsSyn58  happy_var_1)
787         =  HappyAbsSyn58
788                 (happy_var_2 : happy_var_1
789        )
790happyReduction_65 _ _  = notHappyAtAll
791
792happyReduce_66 = happySpecReduce_1  59 happyReduction_66
793happyReduction_66 (HappyAbsSyn51  happy_var_1)
794         =  HappyAbsSyn59
795                 ([happy_var_1]
796        )
797happyReduction_66 _  = notHappyAtAll
798
799happyReduce_67 = happySpecReduce_2  59 happyReduction_67
800happyReduction_67 (HappyAbsSyn51  happy_var_2)
801        (HappyAbsSyn59  happy_var_1)
802         =  HappyAbsSyn59
803                 (happy_var_2 : happy_var_1
804        )
805happyReduction_67 _ _  = notHappyAtAll
806
807happyReduce_68 = happySpecReduce_1  60 happyReduction_68
808happyReduction_68 (HappyAbsSyn46  happy_var_1)
809         =  HappyAbsSyn60
810                 ([happy_var_1]
811        )
812happyReduction_68 _  = notHappyAtAll
813
814happyReduce_69 = happySpecReduce_2  60 happyReduction_69
815happyReduction_69 (HappyAbsSyn46  happy_var_2)
816        (HappyAbsSyn60  happy_var_1)
817         =  HappyAbsSyn60
818                 (happy_var_2 : happy_var_1
819        )
820happyReduction_69 _ _  = notHappyAtAll
821
822happyReduce_70 = happySpecReduce_1  61 happyReduction_70
823happyReduction_70 (HappyAbsSyn52  happy_var_1)
824         =  HappyAbsSyn61
825                 ([happy_var_1]
826        )
827happyReduction_70 _  = notHappyAtAll
828
829happyReduce_71 = happySpecReduce_2  61 happyReduction_71
830happyReduction_71 (HappyAbsSyn52  happy_var_2)
831        (HappyAbsSyn61  happy_var_1)
832         =  HappyAbsSyn61
833                 (happy_var_2 : happy_var_1
834        )
835happyReduction_71 _ _  = notHappyAtAll
836
837happyNewToken action sts stk [] =
838        action 64 64 notHappyAtAll (HappyState action) sts stk []
839
840happyNewToken action sts stk (tk:tks) =
841        let cont i = action i i tk (HappyState action) sts stk tks in
842        case tk of {
843        'a' -> cont 62;
844        'b' -> cont 63;
845        _ -> happyError' (tk:tks)
846        }
847
848happyError_ tk tks = happyError' (tk:tks)
849
850happyThen :: () => Maybe a -> (a -> Maybe b) -> Maybe b
851happyThen = ((>>=))
852happyReturn :: () => a -> Maybe a
853happyReturn = (return)
854happyThen1 m k tks = ((>>=)) m (\a -> k a tks)
855happyReturn1 :: () => a -> b -> Maybe a
856happyReturn1 = \a tks -> (return) a
857happyError' :: () => [(Char)] -> Maybe a
858happyError' = happyError
859
860test0 tks = happySomeParser where
861  happySomeParser = happyThen (happyParse action_0 tks) (\x -> case x of {HappyAbsSyn14 z -> happyReturn z; _other -> notHappyAtAll })
862
863test1 tks = happySomeParser where
864  happySomeParser = happyThen (happyParse action_1 tks) (\x -> case x of {HappyAbsSyn15 z -> happyReturn z; _other -> notHappyAtAll })
865
866test2 tks = happySomeParser where
867  happySomeParser = happyThen (happyParse action_2 tks) (\x -> case x of {HappyAbsSyn16 z -> happyReturn z; _other -> notHappyAtAll })
868
869test3 tks = happySomeParser where
870  happySomeParser = happyThen (happyParse action_3 tks) (\x -> case x of {HappyAbsSyn17 z -> happyReturn z; _other -> notHappyAtAll })
871
872test4 tks = happySomeParser where
873  happySomeParser = happyThen (happyParse action_4 tks) (\x -> case x of {HappyAbsSyn18 z -> happyReturn z; _other -> notHappyAtAll })
874
875test5 tks = happySomeParser where
876  happySomeParser = happyThen (happyParse action_5 tks) (\x -> case x of {HappyAbsSyn19 z -> happyReturn z; _other -> notHappyAtAll })
877
878test6 tks = happySomeParser where
879  happySomeParser = happyThen (happyParse action_6 tks) (\x -> case x of {HappyAbsSyn20 z -> happyReturn z; _other -> notHappyAtAll })
880
881test7 tks = happySomeParser where
882  happySomeParser = happyThen (happyParse action_7 tks) (\x -> case x of {HappyAbsSyn21 z -> happyReturn z; _other -> notHappyAtAll })
883
884test8 tks = happySomeParser where
885  happySomeParser = happyThen (happyParse action_8 tks) (\x -> case x of {HappyAbsSyn22 z -> happyReturn z; _other -> notHappyAtAll })
886
887test9 tks = happySomeParser where
888  happySomeParser = happyThen (happyParse action_9 tks) (\x -> case x of {HappyAbsSyn23 z -> happyReturn z; _other -> notHappyAtAll })
889
890test10 tks = happySomeParser where
891  happySomeParser = happyThen (happyParse action_10 tks) (\x -> case x of {HappyAbsSyn24 z -> happyReturn z; _other -> notHappyAtAll })
892
893happySeq = happyDontSeq
894
895
896happyError _  = Nothing
897
898tests         = [ test1 ""      == Just ""
899                , test1 "a"     == Just "a"
900                , test1 "ab"    == Nothing
901                , test1 "aba"   == Just "aa"
902                , test1 "abab"  == Nothing
903
904                , test2 ""      == Just ""
905                , test2 "a"     == Nothing
906                , test2 "ab"    == Just "a"
907                , test2 "aba"   == Nothing
908                , test2 "abab"  == Just "aa"
909                ]
910
911main        = do let failed = filter (not . snd) (zip [0..] tests)
912                 when (not (null failed)) $
913                   do putStrLn ("Failed tests: " ++ show (map fst failed))
914                      exitFailure
915                 putStrLn "Tests passed."
916{-# LINE 1 "templates/GenericTemplate.hs" #-}
917{-# LINE 1 "templates/GenericTemplate.hs" #-}
918{-# LINE 1 "<built-in>" #-}
919{-# LINE 1 "<command-line>" #-}
920{-# LINE 1 "templates/GenericTemplate.hs" #-}
921-- Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp
922
923{-# LINE 30 "templates/GenericTemplate.hs" #-}
924
925
926
927
928
929
930
931
932{-# LINE 51 "templates/GenericTemplate.hs" #-}
933
934{-# LINE 61 "templates/GenericTemplate.hs" #-}
935
936{-# LINE 70 "templates/GenericTemplate.hs" #-}
937
938infixr 9 `HappyStk`
939data HappyStk a = HappyStk a (HappyStk a)
940
941-----------------------------------------------------------------------------
942-- starting the parse
943
944happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll
945
946-----------------------------------------------------------------------------
947-- Accepting the parse
948
949-- If the current token is (1), it means we've just accepted a partial
950-- parse (a %partial parser).  We must ignore the saved token on the top of
951-- the stack in this case.
952happyAccept (1) tk st sts (_ `HappyStk` ans `HappyStk` _) =
953        happyReturn1 ans
954happyAccept j tk st sts (HappyStk ans _) = 
955         (happyReturn1 ans)
956
957-----------------------------------------------------------------------------
958-- Arrays only: do the next action
959
960{-# LINE 148 "templates/GenericTemplate.hs" #-}
961
962-----------------------------------------------------------------------------
963-- HappyState data type (not arrays)
964
965
966
967newtype HappyState b c = HappyState
968        (Int ->                    -- token number
969         Int ->                    -- token number (yes, again)
970         b ->                           -- token semantic value
971         HappyState b c ->              -- current state
972         [HappyState b c] ->            -- state stack
973         c)
974
975
976
977-----------------------------------------------------------------------------
978-- Shifting a token
979
980happyShift new_state (1) tk st sts stk@(x `HappyStk` _) =
981     let (i) = (case x of { HappyErrorToken (i) -> i }) in
982--     trace "shifting the error token" $
983     new_state i i tk (HappyState (new_state)) ((st):(sts)) (stk)
984
985happyShift new_state i tk st sts stk =
986     happyNewToken new_state ((st):(sts)) ((HappyTerminal (tk))`HappyStk`stk)
987
988-- happyReduce is specialised for the common cases.
989
990happySpecReduce_0 i fn (1) tk st sts stk
991     = happyFail (1) tk st sts stk
992happySpecReduce_0 nt fn j tk st@((HappyState (action))) sts stk
993     = action nt j tk st ((st):(sts)) (fn `HappyStk` stk)
994
995happySpecReduce_1 i fn (1) tk st sts stk
996     = happyFail (1) tk st sts stk
997happySpecReduce_1 nt fn j tk _ sts@(((st@(HappyState (action))):(_))) (v1`HappyStk`stk')
998     = let r = fn v1 in
999       happySeq r (action nt j tk st sts (r `HappyStk` stk'))
1000
1001happySpecReduce_2 i fn (1) tk st sts stk
1002     = happyFail (1) tk st sts stk
1003happySpecReduce_2 nt fn j tk _ ((_):(sts@(((st@(HappyState (action))):(_))))) (v1`HappyStk`v2`HappyStk`stk')
1004     = let r = fn v1 v2 in
1005       happySeq r (action nt j tk st sts (r `HappyStk` stk'))
1006
1007happySpecReduce_3 i fn (1) tk st sts stk
1008     = happyFail (1) tk st sts stk
1009happySpecReduce_3 nt fn j tk _ ((_):(((_):(sts@(((st@(HappyState (action))):(_))))))) (v1`HappyStk`v2`HappyStk`v3`HappyStk`stk')
1010     = let r = fn v1 v2 v3 in
1011       happySeq r (action nt j tk st sts (r `HappyStk` stk'))
1012
1013happyReduce k i fn (1) tk st sts stk
1014     = happyFail (1) tk st sts stk
1015happyReduce k nt fn j tk st sts stk
1016     = case happyDrop (k - ((1) :: Int)) sts of
1017         sts1@(((st1@(HappyState (action))):(_))) ->
1018                let r = fn stk in  -- it doesn't hurt to always seq here...
1019                happyDoSeq r (action nt j tk st1 sts1 r)
1020
1021happyMonadReduce k nt fn (1) tk st sts stk
1022     = happyFail (1) tk st sts stk
1023happyMonadReduce k nt fn j tk st sts stk =
1024        happyThen1 (fn stk tk) (\r -> action nt j tk st1 sts1 (r `HappyStk` drop_stk))
1025       where (sts1@(((st1@(HappyState (action))):(_)))) = happyDrop k ((st):(sts))
1026             drop_stk = happyDropStk k stk
1027
1028happyMonad2Reduce k nt fn (1) tk st sts stk
1029     = happyFail (1) tk st sts stk
1030happyMonad2Reduce k nt fn j tk st sts stk =
1031       happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))
1032       where (sts1@(((st1@(HappyState (action))):(_)))) = happyDrop k ((st):(sts))
1033             drop_stk = happyDropStk k stk
1034
1035
1036
1037
1038
1039             new_state = action
1040
1041
1042happyDrop (0) l = l
1043happyDrop n ((_):(t)) = happyDrop (n - ((1) :: Int)) t
1044
1045happyDropStk (0) l = l
1046happyDropStk n (x `HappyStk` xs) = happyDropStk (n - ((1)::Int)) xs
1047
1048-----------------------------------------------------------------------------
1049-- Moving to a new state after a reduction
1050
1051{-# LINE 246 "templates/GenericTemplate.hs" #-}
1052happyGoto action j tk st = action j j tk (HappyState action)
1053
1054
1055-----------------------------------------------------------------------------
1056-- Error recovery ((1) is the error token)
1057
1058-- parse error if we are in recovery and we fail again
1059happyFail  (1) tk old_st _ stk =
1060--      trace "failing" $
1061        happyError_ tk
1062
1063{-  We don't need state discarding for our restricted implementation of
1064    "error".  In fact, it can cause some bogus parses, so I've disabled it
1065    for now --SDM
1066
1067-- discard a state
1068happyFail  (1) tk old_st (((HappyState (action))):(sts))
1069                                                (saved_tok `HappyStk` _ `HappyStk` stk) =
1070--      trace ("discarding state, depth " ++ show (length stk))  $
1071        action (1) (1) tk (HappyState (action)) sts ((saved_tok`HappyStk`stk))
1072-}
1073
1074-- Enter error recovery: generate an error token,
1075--                       save the old token and carry on.
1076happyFail  i tk (HappyState (action)) sts stk =
1077--      trace "entering error recovery" $
1078        action (1) (1) tk (HappyState (action)) sts ( (HappyErrorToken (i)) `HappyStk` stk)
1079
1080-- Internal happy errors:
1081
1082notHappyAtAll :: a
1083notHappyAtAll = error "Internal Happy error\n"
1084
1085-----------------------------------------------------------------------------
1086-- Hack to get the typechecker to accept our action functions
1087
1088
1089
1090
1091
1092
1093
1094-----------------------------------------------------------------------------
1095-- Seq-ing.  If the --strict flag is given, then Happy emits
1096--      happySeq = happyDoSeq
1097-- otherwise it emits
1098--      happySeq = happyDontSeq
1099
1100happyDoSeq, happyDontSeq :: a -> b -> b
1101happyDoSeq   a b = a `seq` b
1102happyDontSeq a b = b
1103
1104-----------------------------------------------------------------------------
1105-- Don't inline any functions from the template.  GHC has a nasty habit
1106-- of deciding to inline happyGoto everywhere, which increases the size of
1107-- the generated parser quite a bit.
1108
1109{-# LINE 311 "templates/GenericTemplate.hs" #-}
1110{-# NOINLINE happyShift #-}
1111{-# NOINLINE happySpecReduce_0 #-}
1112{-# NOINLINE happySpecReduce_1 #-}
1113{-# NOINLINE happySpecReduce_2 #-}
1114{-# NOINLINE happySpecReduce_3 #-}
1115{-# NOINLINE happyReduce #-}
1116{-# NOINLINE happyMonadReduce #-}
1117{-# NOINLINE happyGoto #-}
1118{-# NOINLINE happyFail #-}
1119
1120-- end of Happy Template.