9 ( t@( Data.Text.Internal.Text
15 let !( Data.Text.Unsafe.Iter
18 ) = Data.Text.Unsafe.iter t 0
21 Data.Text.Internal.Text arr (off GHC.Num.+ d) (unconsumed GHC.Num.- d)
24 ( Data.Text.Internal.Text
28 ) = unconsumed GHC.Classes.> 0
29 in (# input, more, next #)
30 finalRet = \_farInp _farExp v _inp -> Symantic.Parser.Machine.Generate.returnST GHC.Base.$ Data.Either.Right v
33 Symantic.Parser.Machine.Generate.OnException
36 b = \(!exn) _failInp (!farInp) (!farExp) ->
37 Symantic.Parser.Machine.Generate.returnST GHC.Base.$
39 Symantic.Parser.Machine.Generate.ParsingError
40 { Symantic.Parser.Machine.Generate.parsingErrorOffset = Symantic.Parser.Machine.Input.offset farInp,
41 Symantic.Parser.Machine.Generate.parsingErrorException = exn,
42 Symantic.Parser.Machine.Generate.parsingErrorUnexpected =
52 else GHC.Maybe.Nothing,
53 Symantic.Parser.Machine.Generate.parsingErrorExpecting =
57 Data.Set.Internal.foldr
61 ) -> case Symantic.Parser.Grammar.Combinators.unSomeFailure f of
62 GHC.Maybe.Just (Symantic.Parser.Grammar.Combinators.FailureHorizon h :: Symantic.Parser.Grammar.Combinators.Failure (Symantic.Parser.Grammar.Combinators.CombSatisfiable (Symantic.Parser.Machine.Input.InputToken inp)))
63 | GHC.Maybe.Just old <- minH ->
64 ( GHC.Maybe.Just (GHC.Classes.min old h),
67 | GHC.Base.otherwise ->
80 in Data.Set.Internal.fromList GHC.Base.$
82 GHC.Maybe.Just h -> Symantic.Parser.Grammar.Combinators.SomeFailure (Symantic.Parser.Grammar.Combinators.FailureHorizon @(Symantic.Parser.Machine.Input.InputToken inp) h) GHC.Types.: res
83 GHC.Maybe.Nothing -> res
87 ( let inputToken = Data.Proxy.Proxy :: Data.Proxy.Proxy (Symantic.Parser.Machine.Input.InputToken inp)
89 in let readFail = finalRaise
90 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=2"
91 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 1 inp)
94 in let _ = "pushValue"
95 in let join = \farInp farExp v (!inp) ->
96 let _ = "lift2Value checkedHorizon=0"
101 ( let _ = "resume.genCode"
105 in let _ = "catch ExceptionFailure checkedHorizon=2"
107 let _ = "onException"
108 in \(!_exn) (!failInp) (!farInp) (!farExp) ->
109 let _ = "comment: raiseAgainIfConsumed"
110 in let _ = "saveInput checkedHorizon=0"
111 in let _ = "lift2Value checkedHorizon=0"
112 in if ( \( Data.Text.Internal.Text
117 ( Data.Text.Internal.Text
121 ) -> i GHC.Classes.== j
126 let _ = "choicesBranch checkedHorizon=0"
127 in let _ = "catch ExceptionFailure checkedHorizon=0"
129 let _ = "onException"
130 in \(!_exn) (!failInp) (!farInp) (!farExp) ->
131 let _ = "comment: raiseAgainIfConsumed"
132 in let _ = "saveInput checkedHorizon=0"
133 in let _ = "lift2Value checkedHorizon=0"
134 in if ( \( Data.Text.Internal.Text
139 ( Data.Text.Internal.Text
143 ) -> i GHC.Classes.== j
148 let _ = "choicesBranch checkedHorizon=0"
149 in let _ = "catch ExceptionFailure checkedHorizon=0"
151 let _ = "onException"
152 in \(!_exn) (!failInp) (!farInp) (!farExp) ->
153 let _ = "loadInput checkedHorizon=0"
154 in let _ = "checkHorizon.noCheck"
155 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
156 in let _ = "pushValue"
157 in let _ = "comment: satisfy ((GHC.Classes.==) 'f')"
159 in let readFail = onException
160 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=4"
161 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 3 inp)
168 in if (GHC.Classes.==) 'f' c
170 let _ = "lift2Value checkedHorizon=4"
171 in let _ = "comment: satisfy ((GHC.Classes.==) 'g')"
172 in let _ = "checkHorizon.oldCheck: checkedHorizon=4"
173 in let _ = "checkToken"
178 in if (GHC.Classes.==) 'g' c
180 let _ = "lift2Value checkedHorizon=3"
181 in let _ = "comment: satisfy ((GHC.Classes.==) 'h')"
182 in let _ = "checkHorizon.oldCheck: checkedHorizon=3"
183 in let _ = "checkToken"
188 in if (GHC.Classes.==) 'h' c
190 let _ = "lift2Value checkedHorizon=2"
191 in let _ = "comment: satisfy ((GHC.Classes.==) 'i')"
192 in let _ = "checkHorizon.oldCheck: checkedHorizon=2"
193 in let _ = "checkToken"
198 in if (GHC.Classes.==) 'i' c
200 let _ = "lift2Value checkedHorizon=1"
206 ( let _ = "resume.genCode"
207 in (GHC.Types.:) 'f' ((GHC.Types.:) 'g' ((GHC.Types.:) 'h' ((GHC.Types.:) 'i' GHC.Types . [])))
211 let _ = "checkToken.fail"
213 Data.Set.Internal.Bin
215 ( Symantic.Parser.Grammar.Combinators.SomeFailure
217 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'i'
220 Data.Set.Internal.Tip
221 Data.Set.Internal.Tip
225 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
234 failExp GHC.Base.<> farExp
241 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
243 let _ = "checkToken.fail"
245 Data.Set.Internal.Bin
247 ( Symantic.Parser.Grammar.Combinators.SomeFailure
249 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'h'
252 Data.Set.Internal.Tip
253 Data.Set.Internal.Tip
257 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
266 failExp GHC.Base.<> farExp
273 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
275 let _ = "checkToken.fail"
277 Data.Set.Internal.Bin
279 ( Symantic.Parser.Grammar.Combinators.SomeFailure
281 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'g'
284 Data.Set.Internal.Tip
285 Data.Set.Internal.Tip
289 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
298 failExp GHC.Base.<> farExp
305 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
307 let _ = "checkToken.fail"
309 Data.Set.Internal.Bin
311 ( Symantic.Parser.Grammar.Combinators.SomeFailure
313 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'f'
316 Data.Set.Internal.Tip
317 Data.Set.Internal.Tip
321 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
330 failExp GHC.Base.<> farExp
337 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
339 let _ = "checkHorizon.newCheck.fail"
341 Data.Set.Internal.Bin
343 ( Symantic.Parser.Grammar.Combinators.SomeFailure
345 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 4
348 Data.Set.Internal.Tip
349 Data.Set.Internal.Tip
353 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
362 failExp GHC.Base.<> farExp
369 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
371 let _ = "choicesBranch.else"
372 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
373 in let _ = "catch ExceptionFailure checkedHorizon=0"
375 let _ = "onException"
376 in \(!_exn) (!failInp) (!farInp) (!farExp) ->
377 let _ = "loadInput checkedHorizon=0"
378 in let _ = "checkHorizon.noCheck"
379 in onException Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
380 in let _ = "pushValue"
381 in let _ = "comment: satisfy ((GHC.Classes.==) 'd')"
383 in let readFail = onException
384 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=2"
385 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 1 inp)
392 in if (GHC.Classes.==) 'd' c
394 let _ = "lift2Value checkedHorizon=2"
395 in let _ = "comment: satisfy ((GHC.Classes.==) 'e')"
396 in let _ = "checkHorizon.oldCheck: checkedHorizon=2"
397 in let _ = "checkToken"
402 in if (GHC.Classes.==) 'e' c
404 let _ = "lift2Value checkedHorizon=1"
411 ( let _ = "resume.genCode"
412 in (GHC.Types.:) 'd' ((GHC.Types.:) 'e' GHC.Types . [])
416 let _ = "checkToken.fail"
418 Data.Set.Internal.Bin
420 ( Symantic.Parser.Grammar.Combinators.SomeFailure
422 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'e'
425 Data.Set.Internal.Tip
426 Data.Set.Internal.Tip
430 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
439 failExp GHC.Base.<> farExp
446 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
448 let _ = "checkToken.fail"
450 Data.Set.Internal.Bin
452 ( Symantic.Parser.Grammar.Combinators.SomeFailure
454 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'd'
457 Data.Set.Internal.Tip
458 Data.Set.Internal.Tip
462 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
471 failExp GHC.Base.<> farExp
478 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
480 let _ = "checkHorizon.newCheck.fail"
482 Data.Set.Internal.Bin
484 ( Symantic.Parser.Grammar.Combinators.SomeFailure
486 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
489 Data.Set.Internal.Tip
490 Data.Set.Internal.Tip
494 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
503 failExp GHC.Base.<> farExp
510 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
512 let _ = "choicesBranch.else"
513 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
514 in let _ = "catch ExceptionFailure checkedHorizon=2"
516 let _ = "onException"
517 in \(!_exn) (!failInp) (!farInp) (!farExp) ->
518 let _ = "loadInput checkedHorizon=2"
519 in let _ = "checkHorizon.oldCheck: checkedHorizon=2"
520 in onException Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
521 in let _ = "pushValue"
522 in let _ = "comment: satisfy ((GHC.Classes.==) 'a')"
523 in let _ = "checkHorizon.oldCheck: checkedHorizon=2"
524 in let _ = "checkToken"
529 in if (GHC.Classes.==) 'a' c
531 let _ = "lift2Value checkedHorizon=1"
532 in let _ = "comment: satisfy ((GHC.Classes.==) 'b')"
533 in let _ = "checkHorizon.oldCheck: checkedHorizon=1"
534 in let _ = "checkToken"
539 in if (GHC.Classes.==) 'b' c
541 let _ = "lift2Value checkedHorizon=0"
542 in let _ = "comment: satisfy ((GHC.Classes.==) 'c')"
544 in let readFail = onException
545 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=1"
553 in if (GHC.Classes.==) 'c' c
555 let _ = "lift2Value checkedHorizon=1"
561 Data.Set.Internal.empty
562 ( let _ = "resume.genCode"
563 in (GHC.Types.:) 'a' ((GHC.Types.:) 'b' ((GHC.Types.:) 'c' GHC.Types . []))
567 let _ = "checkToken.fail"
569 Data.Set.Internal.Bin
571 ( Symantic.Parser.Grammar.Combinators.SomeFailure
573 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'c'
576 Data.Set.Internal.Tip
577 Data.Set.Internal.Tip
581 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
590 failExp GHC.Base.<> Data.Set.Internal.empty
595 Data.Set.Internal.empty
597 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
599 let _ = "checkHorizon.newCheck.fail"
601 Data.Set.Internal.Bin
603 ( Symantic.Parser.Grammar.Combinators.SomeFailure
605 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
608 Data.Set.Internal.Tip
609 Data.Set.Internal.Tip
613 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
622 failExp GHC.Base.<> Data.Set.Internal.empty
627 Data.Set.Internal.empty
629 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
631 let _ = "checkToken.fail"
633 Data.Set.Internal.Bin
635 ( Symantic.Parser.Grammar.Combinators.SomeFailure
637 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'b'
640 Data.Set.Internal.Tip
641 Data.Set.Internal.Tip
645 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init cs of
654 failExp GHC.Base.<> Data.Set.Internal.empty
659 Data.Set.Internal.empty
661 in onException Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
663 let _ = "checkToken.fail"
665 Data.Set.Internal.Bin
667 ( Symantic.Parser.Grammar.Combinators.SomeFailure
669 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'a'
672 Data.Set.Internal.Tip
673 Data.Set.Internal.Tip
677 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
686 failExp GHC.Base.<> Data.Set.Internal.empty
691 Data.Set.Internal.empty
693 in onException Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
695 let _ = "checkHorizon.newCheck.fail"
697 Data.Set.Internal.Bin
699 ( Symantic.Parser.Grammar.Combinators.SomeFailure
701 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
704 Data.Set.Internal.Tip
705 Data.Set.Internal.Tip
709 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
718 failExp GHC.Base.<> Data.Set.Internal.empty
723 Data.Set.Internal.empty
725 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp