]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G13.expected.txt
test: update
[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 Grammar.Brainfuck.RightPointer
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 Grammar.Brainfuck.LeftPointer
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 Grammar.Brainfuck.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 Grammar.Brainfuck.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 Grammar.Brainfuck.Output
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 Grammar.Brainfuck.Input
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 Grammar.Brainfuck.Loop v
693 )
694 cs
695 else
696 let _ = "checkToken.else"
697 in let failExp =
698 Data.Set.Internal.Bin
699 1
700 ( Symantic.Parser.Grammar.Combinators.SomeFailure
701 ( case inputToken of
702 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken ']'
703 )
704 )
705 Data.Set.Internal.Tip
706 Data.Set.Internal.Tip
707 in let (#
708 farInp,
709 farExp
710 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
711 GHC.Types.LT ->
712 (#
713 inp,
714 failExp
715 #)
716 GHC.Types.EQ ->
717 (#
718 farInp,
719 failExp GHC.Base.<> farExp
720 #)
721 GHC.Types.GT ->
722 (#
723 farInp,
724 farExp
725 #)
726 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
727 else
728 let _ = "checkHorizon.else"
729 in let failExp =
730 Data.Set.Internal.Bin
731 1
732 ( Symantic.Parser.Grammar.Combinators.SomeFailure
733 ( case inputToken of
734 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
735 )
736 )
737 Data.Set.Internal.Tip
738 Data.Set.Internal.Tip
739 in let (#
740 farInp,
741 farExp
742 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
743 GHC.Types.LT ->
744 (#
745 inp,
746 failExp
747 #)
748 GHC.Types.EQ ->
749 (#
750 farInp,
751 failExp GHC.Base.<> farExp
752 #)
753 GHC.Types.GT ->
754 (#
755 farInp,
756 farExp
757 #)
758 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
759 )
760 inp
761 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
762 )
763 cs
764 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
765 else
766 let _ = "checkToken.else"
767 in let failExp =
768 Data.Set.Internal.Bin
769 1
770 ( Symantic.Parser.Grammar.Combinators.SomeFailure
771 ( case inputToken of
772 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'
773 )
774 )
775 Data.Set.Internal.Tip
776 Data.Set.Internal.Tip
777 in let (#
778 farInp,
779 farExp
780 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
781 GHC.Types.LT ->
782 (#
783 inp,
784 failExp
785 #)
786 GHC.Types.EQ ->
787 (#
788 init,
789 failExp GHC.Base.<> Data.Set.Internal.empty
790 #)
791 GHC.Types.GT ->
792 (#
793 init,
794 Data.Set.Internal.empty
795 #)
796 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
797 else
798 let _ = "checkHorizon.else"
799 in let failExp =
800 Data.Set.Internal.Bin
801 1
802 ( Symantic.Parser.Grammar.Combinators.SomeFailure
803 ( case inputToken of
804 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
805 )
806 )
807 Data.Set.Internal.Tip
808 Data.Set.Internal.Tip
809 in let (#
810 farInp,
811 farExp
812 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
813 GHC.Types.LT ->
814 (#
815 inp,
816 failExp
817 #)
818 GHC.Types.EQ ->
819 (#
820 init,
821 failExp GHC.Base.<> Data.Set.Internal.empty
822 #)
823 GHC.Types.GT ->
824 (#
825 init,
826 Data.Set.Internal.empty
827 #)
828 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
829 else
830 let _ = "choicesBranch.else"
831 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
832 in let (#
833 farInp,
834 farExp
835 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
836 GHC.Types.LT ->
837 (#
838 inp,
839 failExp
840 #)
841 GHC.Types.EQ ->
842 (#
843 init,
844 failExp GHC.Base.<> Data.Set.Internal.empty
845 #)
846 GHC.Types.GT ->
847 (#
848 init,
849 Data.Set.Internal.empty
850 #)
851 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
852 else
853 let _ = "checkToken.else"
854 in let failExp =
855 Data.Set.Internal.Bin
856 1
857 ( Symantic.Parser.Grammar.Combinators.SomeFailure
858 ( case inputToken of
859 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureAny @tok'
860 )
861 )
862 Data.Set.Internal.Tip
863 Data.Set.Internal.Tip
864 in let (#
865 farInp,
866 farExp
867 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
868 GHC.Types.LT ->
869 (#
870 inp,
871 failExp
872 #)
873 GHC.Types.EQ ->
874 (#
875 init,
876 failExp GHC.Base.<> Data.Set.Internal.empty
877 #)
878 GHC.Types.GT ->
879 (#
880 init,
881 Data.Set.Internal.empty
882 #)
883 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
884 else
885 let _ = "checkHorizon.else"
886 in let failExp =
887 Data.Set.Internal.Bin
888 1
889 ( Symantic.Parser.Grammar.Combinators.SomeFailure
890 ( case inputToken of
891 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
892 )
893 )
894 Data.Set.Internal.Tip
895 Data.Set.Internal.Tip
896 in let (#
897 farInp,
898 farExp
899 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
900 GHC.Types.LT ->
901 (#
902 inp,
903 failExp
904 #)
905 GHC.Types.EQ ->
906 (#
907 init,
908 failExp GHC.Base.<> Data.Set.Internal.empty
909 #)
910 GHC.Types.GT ->
911 (#
912 init,
913 Data.Set.Internal.empty
914 #)
915 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
916 name = \(!ok) (!inp) (!koByLabel) ->
917 let _ = "catch ExceptionFailure"
918 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
919 let _ = "catch.ko ExceptionFailure"
920 in if ( \( Data.Text.Internal.Text
921 _
922 i
923 _
924 )
925 ( Data.Text.Internal.Text
926 _
927 j
928 _
929 ) -> i GHC.Classes.== j
930 )
931 inp
932 failInp
933 then
934 let _ = "choicesBranch.then"
935 in let _ = "resume"
936 in ok
937 farInp
938 farExp
939 ( let _ = "resume.genCode"
940 in \x -> x
941 )
942 failInp
943 else
944 let _ = "choicesBranch.else"
945 in Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure koByLabel Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
946 in let readFail = catchHandler
947 in if readMore inp
948 then
949 let !(#
950 c,
951 cs
952 #) = readNext inp
953 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.Classes.== c) GHC.Classes.|| GHC.Types.False)))))))))) c
954 then
955 name
956 ( let _ = "suspend"
957 in \farInp farExp v (!inp) ->
958 let _ = "resume"
959 in ok
960 farInp
961 farExp
962 ( let _ = "resume.genCode"
963 in \x -> v x
964 )
965 inp
966 )
967 cs
968 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
969 else
970 let _ = "checkToken.else"
971 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp init Data.Set.Internal.empty
972 else
973 let _ = "checkHorizon.else"
974 in let failExp =
975 Data.Set.Internal.Bin
976 1
977 ( Symantic.Parser.Grammar.Combinators.SomeFailure
978 ( case inputToken of
979 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
980 )
981 )
982 Data.Set.Internal.Tip
983 Data.Set.Internal.Tip
984 in let (#
985 farInp,
986 farExp
987 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
988 GHC.Types.LT ->
989 (#
990 inp,
991 failExp
992 #)
993 GHC.Types.EQ ->
994 (#
995 init,
996 failExp GHC.Base.<> Data.Set.Internal.empty
997 #)
998 GHC.Types.GT ->
999 (#
1000 init,
1001 Data.Set.Internal.empty
1002 #)
1003 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
1004 in name
1005 ( let _ = "suspend"
1006 in \farInp farExp v (!inp) ->
1007 name
1008 ( let _ = "suspend"
1009 in \farInp farExp v (!inp) ->
1010 let _ = "resume"
1011 in finalRet
1012 farInp
1013 farExp
1014 ( let _ = "resume.genCode"
1015 in GHC.Show.show v
1016 )
1017 inp
1018 )
1019 inp
1020 Data.Map.Internal.Tip
1021 )
1022 init
1023 Data.Map.Internal.Tip