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=4"
91 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 3 inp)
93 let name = \(!callerOnReturn) (!callerInput) (!callerOnExceptionStackByLabel) ->
94 let _ = "catch ExceptionFailure checkedHorizon=0"
97 in \(!_exn) (!failInp) (!farInp) (!farExp) ->
98 let _ = "loadInput checkedHorizon=0"
99 in let _ = "checkHorizon.noCheck"
100 in Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callerOnExceptionStackByLabel Symantic.Parser.Grammar.Combinators.ExceptionFailure callerInput farInp farExp
101 in let _ = "pushValue"
102 in let _ = "comment: satisfy ((GHC.Classes.==) 'a')"
103 in let inp = callerInput
104 in let readFail = onException
105 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=4"
106 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 3 inp)
113 in if (GHC.Classes.==) 'a' c
115 let _ = "lift2Value checkedHorizon=4"
116 in let _ = "comment: satisfy ((GHC.Classes.==) 'b')"
117 in let _ = "checkHorizon.oldCheck: checkedHorizon=4"
118 in let _ = "checkToken"
123 in if (GHC.Classes.==) 'b' c
125 let _ = "lift2Value checkedHorizon=3"
126 in let _ = "comment: satisfy ((GHC.Classes.==) 'c')"
127 in let _ = "checkHorizon.oldCheck: checkedHorizon=3"
128 in let _ = "checkToken"
133 in if (GHC.Classes.==) 'c' c
135 let _ = "lift2Value checkedHorizon=2"
136 in let _ = "comment: satisfy ((GHC.Classes.==) 'd')"
137 in let _ = "checkHorizon.oldCheck: checkedHorizon=2"
138 in let _ = "checkToken"
143 in if (GHC.Classes.==) 'd' c
145 let _ = "lift2Value checkedHorizon=1"
150 Data.Set.Internal.empty
151 ( let _ = "resume.genCode"
152 in (GHC.Types.:) 'a' ((GHC.Types.:) 'b' ((GHC.Types.:) 'c' ((GHC.Types.:) 'd' GHC.Types . [])))
156 let _ = "checkToken.fail"
158 Data.Set.Internal.Bin
160 ( Symantic.Parser.Grammar.Combinators.SomeFailure
162 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'd'
165 Data.Set.Internal.Tip
166 Data.Set.Internal.Tip
170 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init cs of
179 failExp GHC.Base.<> Data.Set.Internal.empty
184 Data.Set.Internal.empty
186 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
188 let _ = "checkToken.fail"
190 Data.Set.Internal.Bin
192 ( Symantic.Parser.Grammar.Combinators.SomeFailure
194 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'c'
197 Data.Set.Internal.Tip
198 Data.Set.Internal.Tip
202 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init cs of
211 failExp GHC.Base.<> Data.Set.Internal.empty
216 Data.Set.Internal.empty
218 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
220 let _ = "checkToken.fail"
222 Data.Set.Internal.Bin
224 ( Symantic.Parser.Grammar.Combinators.SomeFailure
226 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'b'
229 Data.Set.Internal.Tip
230 Data.Set.Internal.Tip
234 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init cs of
243 failExp GHC.Base.<> Data.Set.Internal.empty
248 Data.Set.Internal.empty
250 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
252 let _ = "checkToken.fail"
254 Data.Set.Internal.Bin
256 ( Symantic.Parser.Grammar.Combinators.SomeFailure
258 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'a'
261 Data.Set.Internal.Tip
262 Data.Set.Internal.Tip
266 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
275 failExp GHC.Base.<> Data.Set.Internal.empty
280 Data.Set.Internal.empty
282 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
284 let _ = "checkHorizon.newCheck.fail"
286 Data.Set.Internal.Bin
288 ( Symantic.Parser.Grammar.Combinators.SomeFailure
290 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 4
293 Data.Set.Internal.Tip
294 Data.Set.Internal.Tip
298 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
307 failExp GHC.Base.<> Data.Set.Internal.empty
312 Data.Set.Internal.empty
314 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
315 in let _ = "pushValue"
318 in \farInp farExp v (!inp) ->
319 let _ = "lift2Value checkedHorizon=0"
320 in let _ = "pushValue"
323 reg <- GHC.STRef.newSTRef dupv
325 in let onException loopInput =
326 let _ = "onException"
327 in \(!_exn) (!failInp) (!farInp) (!farExp) ->
328 let _ = "comment: raiseAgainIfConsumed"
329 in let _ = "saveInput checkedHorizon=0"
330 in let _ = "lift2Value checkedHorizon=0"
331 in if ( \( Data.Text.Internal.Text
336 ( Data.Text.Internal.Text
340 ) -> i GHC.Classes.== j
345 let _ = "choicesBranch checkedHorizon=0"
347 sr <- GHC.STRef.readSTRef reg
349 in let _ = "lift2Value checkedHorizon=0"
350 in let _ = "lift2Value checkedHorizon=0"
351 in let join = \farInp farExp v (!inp) ->
352 let _ = "lift2Value checkedHorizon=0"
357 ( let _ = "resume.genCode"
358 in GHC.Show.show ((GHC.Types.:) v (sr GHC.Types . []))
361 in let _ = "catch ExceptionFailure checkedHorizon=0"
363 let _ = "onException"
364 in \(!_exn) (!failInp) (!farInp) (!farExp) ->
365 let _ = "comment: raiseAgainIfConsumed"
366 in let _ = "saveInput checkedHorizon=0"
367 in let _ = "lift2Value checkedHorizon=0"
368 in if ( \( Data.Text.Internal.Text
373 ( Data.Text.Internal.Text
377 ) -> i GHC.Classes.== j
382 let _ = "choicesBranch checkedHorizon=0"
383 in let _ = "comment: eof.fail"
384 in let failExp = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure Symantic.Parser.Grammar.Combinators.FailureEnd) Data.Set.Internal.Tip Data.Set.Internal.Tip
388 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
397 failExp GHC.Base.<> farExp
404 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
406 let _ = "choicesBranch.else"
407 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
408 in let _ = "comment: negLook"
409 in let _ = "catch ExceptionFailure checkedHorizon=0"
411 let _ = "onException"
412 in \(!_exn) (!failInp) (!farInp) (!farExp) ->
413 let _ = "comment: negLook.reset"
414 in let _ = "loadInput checkedHorizon=0"
415 in let _ = "checkHorizon.noCheck"
416 in let _ = "pushValue"
422 ( let _ = "resume.genCode"
426 in let _ = "comment: negLook.ahead"
427 in let _ = "saveInput checkedHorizon=0"
428 in let _ = "comment: satisfy ((\\x_0 -> \\x_1 -> x_0) GHC.Types.True)"
430 in let readFail = onException
431 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=1"
439 in let _ = "popValue"
441 in let _ = "loadInput checkedHorizon=0"
442 in let _ = "checkHorizon.noCheck"
443 in onException Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
445 let _ = "checkHorizon.newCheck.fail"
447 Data.Set.Internal.Bin
449 ( Symantic.Parser.Grammar.Combinators.SomeFailure
451 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
454 Data.Set.Internal.Tip
455 Data.Set.Internal.Tip
459 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
468 failExp GHC.Base.<> farExp
475 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
477 let _ = "choicesBranch.else"
478 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
479 loop = \_callerOnReturn callerInput callerOnExceptionStackByLabel ->
483 in \farInp farExp v (!inp) ->
484 let _ = "lift2Value checkedHorizon=0"
485 in let _ = "pushValue"
486 in let _ = "lift2Value checkedHorizon=0"
488 sr <- GHC.STRef.readSTRef reg
489 let _ = "lift2Value checkedHorizon=0"
491 let dupv = \x -> sr ((GHC.Types.:) v x)
492 GHC.STRef.writeSTRef reg dupv
494 in loop (GHC.Err.error "invalid onReturn") inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (onException callerInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
497 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (onException callerInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
499 in loop finalRet inp Data.Map.Internal.Tip
502 Data.Map.Internal.Tip
504 let _ = "checkHorizon.newCheck.fail"
506 Data.Set.Internal.Bin
508 ( Symantic.Parser.Grammar.Combinators.SomeFailure
510 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 4
513 Data.Set.Internal.Tip
514 Data.Set.Internal.Tip
518 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
527 failExp GHC.Base.<> Data.Set.Internal.empty
532 Data.Set.Internal.empty
534 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp