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"
355 ( let _ = "resume.genCode"
356 in GHC.Show.show ((GHC.Types.:) v (sr GHC.Types . []))
360 let _ = "choicesBranch.else"
361 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
362 loop = \_callerOnReturn callerInput callerOnExceptionStackByLabel ->
366 in \farInp farExp v (!inp) ->
367 let _ = "lift2Value checkedHorizon=0"
368 in let _ = "pushValue"
369 in let _ = "lift2Value checkedHorizon=0"
371 sr <- GHC.STRef.readSTRef reg
372 let _ = "lift2Value checkedHorizon=0"
374 let dupv = \x -> sr ((GHC.Types.:) v x)
375 GHC.STRef.writeSTRef reg dupv
377 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)
380 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (onException callerInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
382 in loop finalRet inp Data.Map.Internal.Tip
385 Data.Map.Internal.Tip
387 let _ = "checkHorizon.newCheck.fail"
389 Data.Set.Internal.Bin
391 ( Symantic.Parser.Grammar.Combinators.SomeFailure
393 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 4
396 Data.Set.Internal.Tip
397 Data.Set.Internal.Tip
401 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
410 failExp GHC.Base.<> Data.Set.Internal.empty
415 Data.Set.Internal.empty
417 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp