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 _ = "loadInput checkedHorizon=0"
132 in let _ = "checkHorizon.noCheck"
133 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
134 in let _ = "pushValue"
135 in let _ = "comment: satisfy ((GHC.Classes.==) 'a')"
137 in let readFail = onException
138 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=2"
139 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 1 inp)
146 in if (GHC.Classes.==) 'a' c
148 let _ = "lift2Value checkedHorizon=2"
149 in let _ = "comment: satisfy ((GHC.Classes.==) 'b')"
150 in let _ = "checkHorizon.oldCheck: checkedHorizon=2"
151 in let _ = "checkToken"
156 in if (GHC.Classes.==) 'b' c
158 let _ = "lift2Value checkedHorizon=1"
164 ( let _ = "resume.genCode"
165 in (GHC.Types.:) 'a' ((GHC.Types.:) 'b' GHC.Types . [])
169 let _ = "checkToken.fail"
171 Data.Set.Internal.Bin
173 ( Symantic.Parser.Grammar.Combinators.SomeFailure
175 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'b'
178 Data.Set.Internal.Tip
179 Data.Set.Internal.Tip
183 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp cs of
192 failExp GHC.Base.<> farExp
199 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
201 let _ = "checkToken.fail"
203 Data.Set.Internal.Bin
205 ( Symantic.Parser.Grammar.Combinators.SomeFailure
207 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'a'
210 Data.Set.Internal.Tip
211 Data.Set.Internal.Tip
215 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
224 failExp GHC.Base.<> farExp
231 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
233 let _ = "checkHorizon.newCheck.fail"
235 Data.Set.Internal.Bin
237 ( Symantic.Parser.Grammar.Combinators.SomeFailure
239 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
242 Data.Set.Internal.Tip
243 Data.Set.Internal.Tip
247 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
256 failExp GHC.Base.<> farExp
263 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
265 let _ = "choicesBranch.else"
266 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
267 in let _ = "catch ExceptionFailure checkedHorizon=2"
269 let _ = "onException"
270 in \(!_exn) (!failInp) (!farInp) (!farExp) ->
271 let _ = "loadInput checkedHorizon=2"
272 in let _ = "checkHorizon.oldCheck: checkedHorizon=2"
273 in onException Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
274 in let _ = "pushValue"
275 in let _ = "comment: satisfy ((GHC.Classes.==) 'a')"
276 in let _ = "checkHorizon.oldCheck: checkedHorizon=2"
277 in let _ = "checkToken"
282 in if (GHC.Classes.==) 'a' c
284 let _ = "lift2Value checkedHorizon=1"
285 in let _ = "comment: satisfy ((GHC.Classes.==) 'a')"
286 in let _ = "checkHorizon.oldCheck: checkedHorizon=1"
287 in let _ = "checkToken"
292 in if (GHC.Classes.==) 'a' c
294 let _ = "lift2Value checkedHorizon=0"
300 Data.Set.Internal.empty
301 ( let _ = "resume.genCode"
302 in (GHC.Types.:) 'a' ((GHC.Types.:) 'a' GHC.Types . [])
306 let _ = "checkToken.fail"
308 Data.Set.Internal.Bin
310 ( Symantic.Parser.Grammar.Combinators.SomeFailure
312 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'a'
315 Data.Set.Internal.Tip
316 Data.Set.Internal.Tip
320 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init cs of
329 failExp GHC.Base.<> Data.Set.Internal.empty
334 Data.Set.Internal.empty
336 in onException Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
338 let _ = "checkToken.fail"
340 Data.Set.Internal.Bin
342 ( Symantic.Parser.Grammar.Combinators.SomeFailure
344 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'a'
347 Data.Set.Internal.Tip
348 Data.Set.Internal.Tip
352 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
361 failExp GHC.Base.<> Data.Set.Internal.empty
366 Data.Set.Internal.empty
368 in onException Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
370 let _ = "checkHorizon.newCheck.fail"
372 Data.Set.Internal.Bin
374 ( Symantic.Parser.Grammar.Combinators.SomeFailure
376 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 2
379 Data.Set.Internal.Tip
380 Data.Set.Internal.Tip
384 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
393 failExp GHC.Base.<> Data.Set.Internal.empty
398 Data.Set.Internal.empty
400 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp