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"
97 in let _ = "comment: satisfy ((GHC.Classes.==) 'd')"
99 in let readFail = finalRaise
100 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=1"
108 in if (GHC.Classes.==) 'd' c
110 let _ = "lift2Value checkedHorizon=1"
115 ( let _ = "resume.genCode"
120 let _ = "checkToken.fail"
122 Data.Set.Internal.Bin
124 ( Symantic.Parser.Grammar.Combinators.SomeFailure
126 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'd'
129 Data.Set.Internal.Tip
130 Data.Set.Internal.Tip
134 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
143 failExp GHC.Base.<> farExp
150 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
152 let _ = "checkHorizon.newCheck.fail"
154 Data.Set.Internal.Bin
156 ( Symantic.Parser.Grammar.Combinators.SomeFailure
158 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
161 Data.Set.Internal.Tip
162 Data.Set.Internal.Tip
166 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
175 failExp GHC.Base.<> farExp
182 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
183 in let _ = "catch ExceptionFailure checkedHorizon=2"
185 let _ = "onException"
186 in \(!_exn) (!failInp) (!farInp) (!farExp) ->
187 let _ = "comment: raiseAgainIfConsumed"
188 in let _ = "saveInput checkedHorizon=0"
189 in let _ = "lift2Value checkedHorizon=0"
190 in if ( \( Data.Text.Internal.Text
195 ( Data.Text.Internal.Text
199 ) -> i GHC.Classes.== j
204 let _ = "choicesBranch checkedHorizon=0"
205 in let _ = "catch ExceptionFailure checkedHorizon=0"
207 let _ = "onException"
208 in \(!_exn) (!failInp) (!farInp) (!farExp) ->
209 let _ = "comment: raiseAgainIfConsumed"
210 in let _ = "saveInput checkedHorizon=0"
211 in let _ = "lift2Value checkedHorizon=0"
212 in if ( \( Data.Text.Internal.Text
217 ( Data.Text.Internal.Text
221 ) -> i GHC.Classes.== j
226 let _ = "choicesBranch checkedHorizon=0"
227 in let _ = "pushValue"
228 in let _ = "comment: satisfy ((GHC.Classes.==) 'c')"
230 in let readFail = finalRaise
231 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=2"
232 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 1 inp)
239 in if (GHC.Classes.==) 'c' c
241 let _ = "lift2Value checkedHorizon=2"
246 ( let _ = "resume.genCode"
251 let _ = "checkToken.fail"
253 Data.Set.Internal.Bin
255 ( Symantic.Parser.Grammar.Combinators.SomeFailure
257 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'c'
260 Data.Set.Internal.Tip
261 Data.Set.Internal.Tip
265 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
274 failExp GHC.Base.<> farExp
281 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
283 let _ = "checkHorizon.newCheck.fail"
285 Data.Set.Internal.Bin
287 ( Symantic.Parser.Grammar.Combinators.SomeFailure
289 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
292 Data.Set.Internal.Tip
293 Data.Set.Internal.Tip
297 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
306 failExp GHC.Base.<> farExp
313 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
315 let _ = "choicesBranch.else"
316 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
317 in let _ = "pushValue"
318 in let _ = "comment: satisfy ((GHC.Classes.==) 'b')"
320 in let readFail = onException
321 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=2"
322 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 1 inp)
329 in if (GHC.Classes.==) 'b' c
331 let _ = "lift2Value checkedHorizon=2"
337 ( let _ = "resume.genCode"
342 let _ = "checkToken.fail"
344 Data.Set.Internal.Bin
346 ( Symantic.Parser.Grammar.Combinators.SomeFailure
348 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'b'
351 Data.Set.Internal.Tip
352 Data.Set.Internal.Tip
356 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
365 failExp GHC.Base.<> farExp
372 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
374 let _ = "checkHorizon.newCheck.fail"
376 Data.Set.Internal.Bin
378 ( Symantic.Parser.Grammar.Combinators.SomeFailure
380 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
383 Data.Set.Internal.Tip
384 Data.Set.Internal.Tip
388 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
397 failExp GHC.Base.<> farExp
404 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
406 let _ = "choicesBranch.else"
407 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
408 in let _ = "pushValue"
409 in let _ = "comment: satisfy ((GHC.Classes.==) 'a')"
410 in let _ = "checkHorizon.oldCheck: checkedHorizon=2"
411 in let _ = "checkToken"
416 in if (GHC.Classes.==) 'a' c
418 let _ = "lift2Value checkedHorizon=1"
423 Data.Set.Internal.empty
424 ( let _ = "resume.genCode"
429 let _ = "checkToken.fail"
431 Data.Set.Internal.Bin
433 ( Symantic.Parser.Grammar.Combinators.SomeFailure
435 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'a'
438 Data.Set.Internal.Tip
439 Data.Set.Internal.Tip
443 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
452 failExp GHC.Base.<> Data.Set.Internal.empty
457 Data.Set.Internal.empty
459 in onException Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
461 let _ = "checkHorizon.newCheck.fail"
463 Data.Set.Internal.Bin
465 ( Symantic.Parser.Grammar.Combinators.SomeFailure
467 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
470 Data.Set.Internal.Tip
471 Data.Set.Internal.Tip
475 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
484 failExp GHC.Base.<> Data.Set.Internal.empty
489 Data.Set.Internal.empty
491 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp