]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G13.expected.txt
add benchmarks
[haskell/symantic-parser.git] / test / Golden / Splice / G13.expected.txt
1 \(input :: inp) ->
2 let !(#
3 init,
4 readMore,
5 readNext
6 #) =
7 let _ = "cursorOf"
8 in let next
9 ( t@( Data.Text.Internal.Text
10 arr
11 off
12 unconsumed
13 )
14 ) =
15 let !( Data.Text.Unsafe.Iter
16 c
17 d
18 ) = Data.Text.Unsafe.iter t 0
19 in (#
20 c,
21 Data.Text.Internal.Text arr (off GHC.Num.+ d) (unconsumed GHC.Num.- d)
22 #)
23 more
24 ( Data.Text.Internal.Text
25 _
26 _
27 unconsumed
28 ) = unconsumed GHC.Classes.> 0
29 in (# input, more, next #)
30 finalRet = \_farInp _farExp v _inp -> Data.Either.Right v
31 finalRaise ::
32 forall b.
33 Symantic.Parser.Machine.Generate.Catcher
34 inp
35 b = \(!exn) _failInp (!farInp) (!farExp) ->
36 Data.Either.Left
37 Symantic.Parser.Machine.Generate.ParsingErrorStandard
38 { Symantic.Parser.Machine.Generate.parsingErrorOffset = Symantic.Parser.Machine.Input.offset farInp,
39 Symantic.Parser.Machine.Generate.parsingErrorException = exn,
40 Symantic.Parser.Machine.Generate.parsingErrorUnexpected =
41 if readMore farInp
42 then
43 GHC.Maybe.Just
44 ( let (#
45 c,
46 _
47 #) = readNext farInp
48 in c
49 )
50 else GHC.Maybe.Nothing,
51 Symantic.Parser.Machine.Generate.parsingErrorExpecting = farExp
52 }
53 in let inputToken = Data.Proxy.Proxy :: Data.Proxy.Proxy (Symantic.Parser.Machine.Input.InputToken inp)
54 in let name = \(!ok) (!inp) (!koByLabel) ->
55 name
56 ( let _ = "suspend"
57 in \farInp farExp v (!inp) ->
58 let _ = "resume"
59 in ok
60 farInp
61 farExp
62 ( let _ = "resume.genCode"
63 in GHC.Tuple . ()
64 )
65 inp
66 )
67 inp
68 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure koByLabel) Data.Map.Internal.Tip Data.Map.Internal.Tip)
69 name = \(!ok) (!inp) (!koByLabel) ->
70 name
71 ( let _ = "suspend"
72 in \farInp farExp v (!inp) ->
73 let _ = "resume"
74 in ok
75 farInp
76 farExp
77 ( let _ = "resume.genCode"
78 in v GHC.Types . []
79 )
80 inp
81 )
82 inp
83 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure koByLabel) Data.Map.Internal.Tip Data.Map.Internal.Tip)
84 name = \(!ok) (!inp) (!koByLabel) ->
85 let _ = "catch ExceptionFailure"
86 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
87 let _ = "catch.ko ExceptionFailure"
88 in if ( \( Data.Text.Internal.Text
89 _
90 i
91 _
92 )
93 ( Data.Text.Internal.Text
94 _
95 j
96 _
97 ) -> i GHC.Classes.== j
98 )
99 inp
100 failInp
101 then
102 let _ = "choicesBranch.then"
103 in let _ = "resume"
104 in ok
105 farInp
106 farExp
107 ( let _ = "resume.genCode"
108 in \x -> x
109 )
110 failInp
111 else
112 let _ = "choicesBranch.else"
113 in Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure koByLabel Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
114 in let join = \farInp farExp v (!inp) ->
115 name
116 ( let _ = "suspend"
117 in \farInp farExp v (!inp) ->
118 name
119 ( let _ = "suspend"
120 in \farInp farExp v (!inp) ->
121 let _ = "resume"
122 in ok
123 farInp
124 farExp
125 ( let _ = "resume.genCode"
126 in \x -> v GHC.Types.: v x
127 )
128 inp
129 )
130 inp
131 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure catchHandler Data.Map.Internal.Tip Data.Map.Internal.Tip)
132 )
133 inp
134 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure catchHandler Data.Map.Internal.Tip Data.Map.Internal.Tip)
135 in let readFail = catchHandler
136 in if readMore inp
137 then
138 let !(#
139 c,
140 cs
141 #) = readNext inp
142 in if (\x -> \x -> x) GHC.Types.True c
143 then
144 if '<' GHC.Classes.== c
145 then
146 let _ = "choicesBranch.then"
147 in let readFail = readFail
148 in if readMore inp
149 then
150 let !(#
151 c,
152 cs
153 #) = readNext inp
154 in if (\x -> \x -> x) GHC.Types.True c
155 then
156 let _ = "resume"
157 in join
158 init
159 Data.Set.Internal.empty
160 ( let _ = "resume.genCode"
161 in Parsers.Brainfuck.Types.Backward
162 )
163 cs
164 else
165 let _ = "checkToken.else"
166 in let failExp =
167 Data.Set.Internal.Bin
168 1
169 ( Symantic.Parser.Grammar.Combinators.SomeFailure
170 ( case inputToken of
171 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'
172 )
173 )
174 Data.Set.Internal.Tip
175 Data.Set.Internal.Tip
176 in let (#
177 farInp,
178 farExp
179 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
180 GHC.Types.LT ->
181 (#
182 inp,
183 failExp
184 #)
185 GHC.Types.EQ ->
186 (#
187 init,
188 failExp GHC.Base.<> Data.Set.Internal.empty
189 #)
190 GHC.Types.GT ->
191 (#
192 init,
193 Data.Set.Internal.empty
194 #)
195 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
196 else
197 let _ = "checkHorizon.else"
198 in let failExp =
199 Data.Set.Internal.Bin
200 1
201 ( Symantic.Parser.Grammar.Combinators.SomeFailure
202 ( case inputToken of
203 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
204 )
205 )
206 Data.Set.Internal.Tip
207 Data.Set.Internal.Tip
208 in let (#
209 farInp,
210 farExp
211 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
212 GHC.Types.LT ->
213 (#
214 inp,
215 failExp
216 #)
217 GHC.Types.EQ ->
218 (#
219 init,
220 failExp GHC.Base.<> Data.Set.Internal.empty
221 #)
222 GHC.Types.GT ->
223 (#
224 init,
225 Data.Set.Internal.empty
226 #)
227 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
228 else
229 let _ = "choicesBranch.else"
230 in if '>' GHC.Classes.== c
231 then
232 let _ = "choicesBranch.then"
233 in let readFail = readFail
234 in if readMore inp
235 then
236 let !(#
237 c,
238 cs
239 #) = readNext inp
240 in if (\x -> \x -> x) GHC.Types.True c
241 then
242 let _ = "resume"
243 in join
244 init
245 Data.Set.Internal.empty
246 ( let _ = "resume.genCode"
247 in Parsers.Brainfuck.Types.Forward
248 )
249 cs
250 else
251 let _ = "checkToken.else"
252 in let failExp =
253 Data.Set.Internal.Bin
254 1
255 ( Symantic.Parser.Grammar.Combinators.SomeFailure
256 ( case inputToken of
257 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'
258 )
259 )
260 Data.Set.Internal.Tip
261 Data.Set.Internal.Tip
262 in let (#
263 farInp,
264 farExp
265 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
266 GHC.Types.LT ->
267 (#
268 inp,
269 failExp
270 #)
271 GHC.Types.EQ ->
272 (#
273 init,
274 failExp GHC.Base.<> Data.Set.Internal.empty
275 #)
276 GHC.Types.GT ->
277 (#
278 init,
279 Data.Set.Internal.empty
280 #)
281 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
282 else
283 let _ = "checkHorizon.else"
284 in let failExp =
285 Data.Set.Internal.Bin
286 1
287 ( Symantic.Parser.Grammar.Combinators.SomeFailure
288 ( case inputToken of
289 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
290 )
291 )
292 Data.Set.Internal.Tip
293 Data.Set.Internal.Tip
294 in let (#
295 farInp,
296 farExp
297 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
298 GHC.Types.LT ->
299 (#
300 inp,
301 failExp
302 #)
303 GHC.Types.EQ ->
304 (#
305 init,
306 failExp GHC.Base.<> Data.Set.Internal.empty
307 #)
308 GHC.Types.GT ->
309 (#
310 init,
311 Data.Set.Internal.empty
312 #)
313 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
314 else
315 let _ = "choicesBranch.else"
316 in if '+' GHC.Classes.== c
317 then
318 let _ = "choicesBranch.then"
319 in let readFail = readFail
320 in if readMore inp
321 then
322 let !(#
323 c,
324 cs
325 #) = readNext inp
326 in if (\x -> \x -> x) GHC.Types.True c
327 then
328 let _ = "resume"
329 in join
330 init
331 Data.Set.Internal.empty
332 ( let _ = "resume.genCode"
333 in Parsers.Brainfuck.Types.Increment
334 )
335 cs
336 else
337 let _ = "checkToken.else"
338 in let failExp =
339 Data.Set.Internal.Bin
340 1
341 ( Symantic.Parser.Grammar.Combinators.SomeFailure
342 ( case inputToken of
343 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'
344 )
345 )
346 Data.Set.Internal.Tip
347 Data.Set.Internal.Tip
348 in let (#
349 farInp,
350 farExp
351 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
352 GHC.Types.LT ->
353 (#
354 inp,
355 failExp
356 #)
357 GHC.Types.EQ ->
358 (#
359 init,
360 failExp GHC.Base.<> Data.Set.Internal.empty
361 #)
362 GHC.Types.GT ->
363 (#
364 init,
365 Data.Set.Internal.empty
366 #)
367 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
368 else
369 let _ = "checkHorizon.else"
370 in let failExp =
371 Data.Set.Internal.Bin
372 1
373 ( Symantic.Parser.Grammar.Combinators.SomeFailure
374 ( case inputToken of
375 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
376 )
377 )
378 Data.Set.Internal.Tip
379 Data.Set.Internal.Tip
380 in let (#
381 farInp,
382 farExp
383 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
384 GHC.Types.LT ->
385 (#
386 inp,
387 failExp
388 #)
389 GHC.Types.EQ ->
390 (#
391 init,
392 failExp GHC.Base.<> Data.Set.Internal.empty
393 #)
394 GHC.Types.GT ->
395 (#
396 init,
397 Data.Set.Internal.empty
398 #)
399 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
400 else
401 let _ = "choicesBranch.else"
402 in if '-' GHC.Classes.== c
403 then
404 let _ = "choicesBranch.then"
405 in let readFail = readFail
406 in if readMore inp
407 then
408 let !(#
409 c,
410 cs
411 #) = readNext inp
412 in if (\x -> \x -> x) GHC.Types.True c
413 then
414 let _ = "resume"
415 in join
416 init
417 Data.Set.Internal.empty
418 ( let _ = "resume.genCode"
419 in Parsers.Brainfuck.Types.Decrement
420 )
421 cs
422 else
423 let _ = "checkToken.else"
424 in let failExp =
425 Data.Set.Internal.Bin
426 1
427 ( Symantic.Parser.Grammar.Combinators.SomeFailure
428 ( case inputToken of
429 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'
430 )
431 )
432 Data.Set.Internal.Tip
433 Data.Set.Internal.Tip
434 in let (#
435 farInp,
436 farExp
437 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
438 GHC.Types.LT ->
439 (#
440 inp,
441 failExp
442 #)
443 GHC.Types.EQ ->
444 (#
445 init,
446 failExp GHC.Base.<> Data.Set.Internal.empty
447 #)
448 GHC.Types.GT ->
449 (#
450 init,
451 Data.Set.Internal.empty
452 #)
453 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
454 else
455 let _ = "checkHorizon.else"
456 in let failExp =
457 Data.Set.Internal.Bin
458 1
459 ( Symantic.Parser.Grammar.Combinators.SomeFailure
460 ( case inputToken of
461 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
462 )
463 )
464 Data.Set.Internal.Tip
465 Data.Set.Internal.Tip
466 in let (#
467 farInp,
468 farExp
469 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
470 GHC.Types.LT ->
471 (#
472 inp,
473 failExp
474 #)
475 GHC.Types.EQ ->
476 (#
477 init,
478 failExp GHC.Base.<> Data.Set.Internal.empty
479 #)
480 GHC.Types.GT ->
481 (#
482 init,
483 Data.Set.Internal.empty
484 #)
485 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
486 else
487 let _ = "choicesBranch.else"
488 in if ',' GHC.Classes.== c
489 then
490 let _ = "choicesBranch.then"
491 in let readFail = readFail
492 in if readMore inp
493 then
494 let !(#
495 c,
496 cs
497 #) = readNext inp
498 in if (\x -> \x -> x) GHC.Types.True c
499 then
500 let _ = "resume"
501 in join
502 init
503 Data.Set.Internal.empty
504 ( let _ = "resume.genCode"
505 in Parsers.Brainfuck.Types.Input
506 )
507 cs
508 else
509 let _ = "checkToken.else"
510 in let failExp =
511 Data.Set.Internal.Bin
512 1
513 ( Symantic.Parser.Grammar.Combinators.SomeFailure
514 ( case inputToken of
515 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'
516 )
517 )
518 Data.Set.Internal.Tip
519 Data.Set.Internal.Tip
520 in let (#
521 farInp,
522 farExp
523 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
524 GHC.Types.LT ->
525 (#
526 inp,
527 failExp
528 #)
529 GHC.Types.EQ ->
530 (#
531 init,
532 failExp GHC.Base.<> Data.Set.Internal.empty
533 #)
534 GHC.Types.GT ->
535 (#
536 init,
537 Data.Set.Internal.empty
538 #)
539 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
540 else
541 let _ = "checkHorizon.else"
542 in let failExp =
543 Data.Set.Internal.Bin
544 1
545 ( Symantic.Parser.Grammar.Combinators.SomeFailure
546 ( case inputToken of
547 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
548 )
549 )
550 Data.Set.Internal.Tip
551 Data.Set.Internal.Tip
552 in let (#
553 farInp,
554 farExp
555 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
556 GHC.Types.LT ->
557 (#
558 inp,
559 failExp
560 #)
561 GHC.Types.EQ ->
562 (#
563 init,
564 failExp GHC.Base.<> Data.Set.Internal.empty
565 #)
566 GHC.Types.GT ->
567 (#
568 init,
569 Data.Set.Internal.empty
570 #)
571 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
572 else
573 let _ = "choicesBranch.else"
574 in if '.' GHC.Classes.== c
575 then
576 let _ = "choicesBranch.then"
577 in let readFail = readFail
578 in if readMore inp
579 then
580 let !(#
581 c,
582 cs
583 #) = readNext inp
584 in if (\x -> \x -> x) GHC.Types.True c
585 then
586 let _ = "resume"
587 in join
588 init
589 Data.Set.Internal.empty
590 ( let _ = "resume.genCode"
591 in Parsers.Brainfuck.Types.Output
592 )
593 cs
594 else
595 let _ = "checkToken.else"
596 in let failExp =
597 Data.Set.Internal.Bin
598 1
599 ( Symantic.Parser.Grammar.Combinators.SomeFailure
600 ( case inputToken of
601 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'
602 )
603 )
604 Data.Set.Internal.Tip
605 Data.Set.Internal.Tip
606 in let (#
607 farInp,
608 farExp
609 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
610 GHC.Types.LT ->
611 (#
612 inp,
613 failExp
614 #)
615 GHC.Types.EQ ->
616 (#
617 init,
618 failExp GHC.Base.<> Data.Set.Internal.empty
619 #)
620 GHC.Types.GT ->
621 (#
622 init,
623 Data.Set.Internal.empty
624 #)
625 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
626 else
627 let _ = "checkHorizon.else"
628 in let failExp =
629 Data.Set.Internal.Bin
630 1
631 ( Symantic.Parser.Grammar.Combinators.SomeFailure
632 ( case inputToken of
633 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
634 )
635 )
636 Data.Set.Internal.Tip
637 Data.Set.Internal.Tip
638 in let (#
639 farInp,
640 farExp
641 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
642 GHC.Types.LT ->
643 (#
644 inp,
645 failExp
646 #)
647 GHC.Types.EQ ->
648 (#
649 init,
650 failExp GHC.Base.<> Data.Set.Internal.empty
651 #)
652 GHC.Types.GT ->
653 (#
654 init,
655 Data.Set.Internal.empty
656 #)
657 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
658 else
659 let _ = "choicesBranch.else"
660 in if '[' GHC.Classes.== c
661 then
662 let _ = "choicesBranch.then"
663 in let readFail = readFail
664 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 1 inp)
665 then
666 let !(#
667 c,
668 cs
669 #) = readNext inp
670 in if (\x -> \x -> x) GHC.Types.True c
671 then
672 name
673 ( let _ = "suspend"
674 in \farInp farExp v (!inp) ->
675 name
676 ( let _ = "suspend"
677 in \farInp farExp v (!inp) ->
678 let readFail = readFail
679 in if readMore inp
680 then
681 let !(#
682 c,
683 cs
684 #) = readNext inp
685 in if (']' GHC.Classes.==) c
686 then
687 let _ = "resume"
688 in join
689 farInp
690 farExp
691 ( let _ = "resume.genCode"
692 in Parsers.Brainfuck.Types.Loop v
693 )
694 cs
695 else
696 let _ = "checkToken.else"
697 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
698 else
699 let _ = "checkHorizon.else"
700 in let failExp =
701 Data.Set.Internal.Bin
702 1
703 ( Symantic.Parser.Grammar.Combinators.SomeFailure
704 ( case inputToken of
705 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
706 )
707 )
708 Data.Set.Internal.Tip
709 Data.Set.Internal.Tip
710 in let (#
711 farInp,
712 farExp
713 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
714 GHC.Types.LT ->
715 (#
716 inp,
717 failExp
718 #)
719 GHC.Types.EQ ->
720 (#
721 farInp,
722 failExp GHC.Base.<> farExp
723 #)
724 GHC.Types.GT ->
725 (#
726 farInp,
727 farExp
728 #)
729 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
730 )
731 inp
732 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
733 )
734 cs
735 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
736 else
737 let _ = "checkToken.else"
738 in let failExp =
739 Data.Set.Internal.Bin
740 1
741 ( Symantic.Parser.Grammar.Combinators.SomeFailure
742 ( case inputToken of
743 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'
744 )
745 )
746 Data.Set.Internal.Tip
747 Data.Set.Internal.Tip
748 in let (#
749 farInp,
750 farExp
751 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
752 GHC.Types.LT ->
753 (#
754 inp,
755 failExp
756 #)
757 GHC.Types.EQ ->
758 (#
759 init,
760 failExp GHC.Base.<> Data.Set.Internal.empty
761 #)
762 GHC.Types.GT ->
763 (#
764 init,
765 Data.Set.Internal.empty
766 #)
767 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
768 else
769 let _ = "checkHorizon.else"
770 in let failExp =
771 Data.Set.Internal.Bin
772 1
773 ( Symantic.Parser.Grammar.Combinators.SomeFailure
774 ( case inputToken of
775 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
776 )
777 )
778 Data.Set.Internal.Tip
779 Data.Set.Internal.Tip
780 in let (#
781 farInp,
782 farExp
783 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
784 GHC.Types.LT ->
785 (#
786 inp,
787 failExp
788 #)
789 GHC.Types.EQ ->
790 (#
791 init,
792 failExp GHC.Base.<> Data.Set.Internal.empty
793 #)
794 GHC.Types.GT ->
795 (#
796 init,
797 Data.Set.Internal.empty
798 #)
799 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
800 else
801 let _ = "choicesBranch.else"
802 in let failExp = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure Symantic.Parser.Grammar.Combinators.FailureEmpty) Data.Set.Internal.Tip Data.Set.Internal.Tip
803 in let (#
804 farInp,
805 farExp
806 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
807 GHC.Types.LT ->
808 (#
809 inp,
810 failExp
811 #)
812 GHC.Types.EQ ->
813 (#
814 init,
815 failExp GHC.Base.<> Data.Set.Internal.empty
816 #)
817 GHC.Types.GT ->
818 (#
819 init,
820 Data.Set.Internal.empty
821 #)
822 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
823 else
824 let _ = "checkToken.else"
825 in let failExp =
826 Data.Set.Internal.Bin
827 1
828 ( Symantic.Parser.Grammar.Combinators.SomeFailure
829 ( case inputToken of
830 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'
831 )
832 )
833 Data.Set.Internal.Tip
834 Data.Set.Internal.Tip
835 in let (#
836 farInp,
837 farExp
838 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
839 GHC.Types.LT ->
840 (#
841 inp,
842 failExp
843 #)
844 GHC.Types.EQ ->
845 (#
846 init,
847 failExp GHC.Base.<> Data.Set.Internal.empty
848 #)
849 GHC.Types.GT ->
850 (#
851 init,
852 Data.Set.Internal.empty
853 #)
854 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
855 else
856 let _ = "checkHorizon.else"
857 in let failExp =
858 Data.Set.Internal.Bin
859 1
860 ( Symantic.Parser.Grammar.Combinators.SomeFailure
861 ( case inputToken of
862 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
863 )
864 )
865 Data.Set.Internal.Tip
866 Data.Set.Internal.Tip
867 in let (#
868 farInp,
869 farExp
870 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
871 GHC.Types.LT ->
872 (#
873 inp,
874 failExp
875 #)
876 GHC.Types.EQ ->
877 (#
878 init,
879 failExp GHC.Base.<> Data.Set.Internal.empty
880 #)
881 GHC.Types.GT ->
882 (#
883 init,
884 Data.Set.Internal.empty
885 #)
886 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
887 name = \(!ok) (!inp) (!koByLabel) ->
888 let _ = "catch ExceptionFailure"
889 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
890 let _ = "catch.ko ExceptionFailure"
891 in if ( \( Data.Text.Internal.Text
892 _
893 i
894 _
895 )
896 ( Data.Text.Internal.Text
897 _
898 j
899 _
900 ) -> i GHC.Classes.== j
901 )
902 inp
903 failInp
904 then
905 let _ = "choicesBranch.then"
906 in let _ = "resume"
907 in ok
908 farInp
909 farExp
910 ( let _ = "resume.genCode"
911 in \x -> x
912 )
913 failInp
914 else
915 let _ = "choicesBranch.else"
916 in Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure koByLabel Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
917 in let readFail = catchHandler
918 in if readMore inp
919 then
920 let !(#
921 c,
922 cs
923 #) = readNext inp
924 in if (\c -> GHC.Classes.not (('<' GHC.Classes.== c) GHC.Classes.|| (('>' GHC.Classes.== c) GHC.Classes.|| (('+' GHC.Classes.== c) GHC.Classes.|| (('-' GHC.Classes.== c) GHC.Classes.|| ((',' GHC.Classes.== c) GHC.Classes.|| (('.' GHC.Classes.== c) GHC.Classes.|| (('[' GHC.Classes.== c) GHC.Classes.|| ((']' GHC.Classes.== c) GHC.Classes.|| GHC.Types.False))))))))) c
925 then
926 name
927 ( let _ = "suspend"
928 in \farInp farExp v (!inp) ->
929 let _ = "resume"
930 in ok
931 farInp
932 farExp
933 ( let _ = "resume.genCode"
934 in \x -> v x
935 )
936 inp
937 )
938 cs
939 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
940 else
941 let _ = "checkToken.else"
942 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp init Data.Set.Internal.empty
943 else
944 let _ = "checkHorizon.else"
945 in let failExp =
946 Data.Set.Internal.Bin
947 1
948 ( Symantic.Parser.Grammar.Combinators.SomeFailure
949 ( case inputToken of
950 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
951 )
952 )
953 Data.Set.Internal.Tip
954 Data.Set.Internal.Tip
955 in let (#
956 farInp,
957 farExp
958 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
959 GHC.Types.LT ->
960 (#
961 inp,
962 failExp
963 #)
964 GHC.Types.EQ ->
965 (#
966 init,
967 failExp GHC.Base.<> Data.Set.Internal.empty
968 #)
969 GHC.Types.GT ->
970 (#
971 init,
972 Data.Set.Internal.empty
973 #)
974 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
975 in name
976 ( let _ = "suspend"
977 in \farInp farExp v (!inp) ->
978 name
979 ( let _ = "suspend"
980 in \farInp farExp v (!inp) ->
981 let _ = "resume"
982 in finalRet
983 farInp
984 farExp
985 ( let _ = "resume.genCode"
986 in GHC.Show.show v
987 )
988 inp
989 )
990 inp
991 Data.Map.Internal.Tip
992 )
993 init
994 Data.Map.Internal.Tip