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)
88 in let _ = "checkHorizon.noCheck"
89 in let name = \(!callerOnReturn) (!callerInput) (!callerOnExceptionStackByLabel) ->
91 in let _ = "pushValue"
94 reg <- GHC.STRef.newSTRef dupv
96 in let onException loopInput =
98 in \(!_exn) (!failInp) (!farInp) (!farExp) ->
99 let _ = "comment: raiseAgainIfConsumed"
100 in let _ = "saveInput checkedHorizon=0"
101 in let _ = "lift2Value checkedHorizon=0"
102 in if ( \( Data.Text.Internal.Text
107 ( Data.Text.Internal.Text
111 ) -> i GHC.Classes.== j
116 let _ = "choicesBranch checkedHorizon=0"
118 sr <- GHC.STRef.readSTRef reg
120 in let _ = "lift2Value checkedHorizon=0"
121 in let _ = "lift2Value checkedHorizon=0"
126 ( let _ = "resume.genCode"
131 let _ = "choicesBranch.else"
132 in Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callerOnExceptionStackByLabel Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
133 loop = \_callerOnReturn callerInput callerOnExceptionStackByLabel ->
135 in let _ = "comment: satisfy (\\c_0 -> GHC.Classes.not (('<' GHC.Classes.== c_0) GHC.Classes.|| (('>' GHC.Classes.== c_0) GHC.Classes.|| (('+' GHC.Classes.== c_0) GHC.Classes.|| (('-' GHC.Classes.== c_0) GHC.Classes.|| ((',' GHC.Classes.== c_0) GHC.Classes.|| (('.' GHC.Classes.== c_0) GHC.Classes.|| (('[' GHC.Classes.== c_0) GHC.Classes.|| ((']' GHC.Classes.== c_0) GHC.Classes.|| GHC.Types.False)))))))))"
136 in let inp = callerInput
137 in let readFail = onException callerInput
138 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=1"
146 in if (\c -> GHC.Classes.not (('<' GHC.Classes.== c) GHC.Classes.|| (('>' GHC.Classes.== c) GHC.Classes.|| (('+' GHC.Classes.== c) GHC.Classes.|| (('-' GHC.Classes.== c) GHC.Classes.|| ((',' GHC.Classes.== c) GHC.Classes.|| (('.' GHC.Classes.== c) GHC.Classes.|| (('[' GHC.Classes.== c) GHC.Classes.|| ((']' GHC.Classes.== c) GHC.Classes.|| GHC.Types.False))))))))) c
148 let _ = "lift2Value checkedHorizon=1"
150 sr <- GHC.STRef.readSTRef reg
151 let _ = "lift2Value checkedHorizon=1"
154 GHC.STRef.writeSTRef reg dupv
156 in loop (GHC.Err.error "invalid onReturn") cs (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
158 let _ = "checkToken.fail"
159 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp init Data.Set.Internal.empty
161 let _ = "checkHorizon.newCheck.fail"
163 Data.Set.Internal.Bin
165 ( Symantic.Parser.Grammar.Combinators.SomeFailure
167 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
170 Data.Set.Internal.Tip
171 Data.Set.Internal.Tip
175 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
184 failExp GHC.Base.<> Data.Set.Internal.empty
189 Data.Set.Internal.empty
191 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
193 in loop callerOnReturn callerInput (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callerOnExceptionStackByLabel) Data.Map.Internal.Tip Data.Map.Internal.Tip)
194 name = \(!callerOnReturn) (!callerInput) (!callerOnExceptionStackByLabel) ->
198 reg <- GHC.STRef.newSTRef dupv
200 in let onException loopInput =
201 let _ = "onException"
202 in \(!_exn) (!failInp) (!farInp) (!farExp) ->
203 let _ = "comment: raiseAgainIfConsumed"
204 in let _ = "saveInput checkedHorizon=0"
205 in let _ = "lift2Value checkedHorizon=0"
206 in if ( \( Data.Text.Internal.Text
211 ( Data.Text.Internal.Text
215 ) -> i GHC.Classes.== j
220 let _ = "choicesBranch checkedHorizon=0"
222 sr <- GHC.STRef.readSTRef reg
224 in let _ = "lift2Value checkedHorizon=0"
229 ( let _ = "resume.genCode"
234 let _ = "choicesBranch.else"
235 in Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callerOnExceptionStackByLabel Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
236 loop = \_callerOnReturn callerInput callerOnExceptionStackByLabel ->
238 in let join = \farInp farExp v (!inp) ->
239 let _ = "lift2Value checkedHorizon=0"
242 in \farInp farExp v (!inp) ->
243 let _ = "lift2Value checkedHorizon=0"
244 in let _ = "pushValue"
245 in let _ = "lift2Value checkedHorizon=0"
247 sr <- GHC.STRef.readSTRef reg
248 let _ = "lift2Value checkedHorizon=0"
250 let dupv = \x -> sr ((GHC.Types.:) v x)
251 GHC.STRef.writeSTRef reg dupv
253 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)
256 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (onException callerInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
257 in let _ = "comment: look"
258 in let _ = "saveInput checkedHorizon=0"
259 in let _ = "comment: satisfy ((\\x_0 -> \\x_1 -> x_0) GHC.Types.True)"
260 in let inp = callerInput
261 in let readFail = onException callerInput
262 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=1"
270 in let _ = "loadInput checkedHorizon=0"
271 in let inp = callerInput
272 in let readFail = readFail
273 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=1"
276 if (\x -> (GHC.Classes.==) '<' x) c
278 let _ = "choicesBranch checkedHorizon=1"
279 in let _ = "pushValue"
280 in let _ = "comment: satisfy ((\\x_0 -> \\x_1 -> x_0) GHC.Types.True)"
281 in let _ = "checkHorizon.oldCheck: checkedHorizon=1"
282 in let _ = "checkToken"
287 in let _ = "lift2Value checkedHorizon=0"
291 Data.Set.Internal.empty
292 ( let _ = "resume.genCode"
293 in Parsers.Brainfuck.Types.Backward
297 let _ = "choicesBranch.else"
298 in if (\x -> (GHC.Classes.==) '>' x) c
300 let _ = "choicesBranch checkedHorizon=1"
301 in let _ = "pushValue"
302 in let _ = "comment: satisfy ((\\x_0 -> \\x_1 -> x_0) GHC.Types.True)"
303 in let _ = "checkHorizon.oldCheck: checkedHorizon=1"
304 in let _ = "checkToken"
309 in let _ = "lift2Value checkedHorizon=0"
313 Data.Set.Internal.empty
314 ( let _ = "resume.genCode"
315 in Parsers.Brainfuck.Types.Forward
319 let _ = "choicesBranch.else"
320 in if (\x -> (GHC.Classes.==) '+' x) c
322 let _ = "choicesBranch checkedHorizon=1"
323 in let _ = "pushValue"
324 in let _ = "comment: satisfy ((\\x_0 -> \\x_1 -> x_0) GHC.Types.True)"
325 in let _ = "checkHorizon.oldCheck: checkedHorizon=1"
326 in let _ = "checkToken"
331 in let _ = "lift2Value checkedHorizon=0"
335 Data.Set.Internal.empty
336 ( let _ = "resume.genCode"
337 in Parsers.Brainfuck.Types.Increment
341 let _ = "choicesBranch.else"
342 in if (\x -> (GHC.Classes.==) '-' x) c
344 let _ = "choicesBranch checkedHorizon=1"
345 in let _ = "pushValue"
346 in let _ = "comment: satisfy ((\\x_0 -> \\x_1 -> x_0) GHC.Types.True)"
347 in let _ = "checkHorizon.oldCheck: checkedHorizon=1"
348 in let _ = "checkToken"
353 in let _ = "lift2Value checkedHorizon=0"
357 Data.Set.Internal.empty
358 ( let _ = "resume.genCode"
359 in Parsers.Brainfuck.Types.Decrement
363 let _ = "choicesBranch.else"
364 in if (\x -> (GHC.Classes.==) ',' x) c
366 let _ = "choicesBranch checkedHorizon=1"
367 in let _ = "pushValue"
368 in let _ = "comment: satisfy ((\\x_0 -> \\x_1 -> x_0) GHC.Types.True)"
369 in let _ = "checkHorizon.oldCheck: checkedHorizon=1"
370 in let _ = "checkToken"
375 in let _ = "lift2Value checkedHorizon=0"
379 Data.Set.Internal.empty
380 ( let _ = "resume.genCode"
381 in Parsers.Brainfuck.Types.Input
385 let _ = "choicesBranch.else"
386 in if (\x -> (GHC.Classes.==) '.' x) c
388 let _ = "choicesBranch checkedHorizon=1"
389 in let _ = "pushValue"
390 in let _ = "comment: satisfy ((\\x_0 -> \\x_1 -> x_0) GHC.Types.True)"
391 in let _ = "checkHorizon.oldCheck: checkedHorizon=1"
392 in let _ = "checkToken"
397 in let _ = "lift2Value checkedHorizon=0"
401 Data.Set.Internal.empty
402 ( let _ = "resume.genCode"
403 in Parsers.Brainfuck.Types.Output
407 let _ = "choicesBranch.else"
408 in if (\x -> (GHC.Classes.==) '[' x) c
410 let _ = "choicesBranch checkedHorizon=1"
411 in let _ = "pushValue"
412 in let _ = "comment: satisfy ((\\x_0 -> \\x_1 -> x_0) GHC.Types.True)"
413 in let _ = "checkHorizon.oldCheck: checkedHorizon=1"
414 in let _ = "checkToken"
419 in let _ = "lift2Value checkedHorizon=0"
422 in \farInp farExp v (!inp) ->
423 let _ = "lift2Value checkedHorizon=0"
426 in \farInp farExp v (!inp) ->
427 let _ = "lift2Value checkedHorizon=0"
428 in let _ = "comment: satisfy ((GHC.Classes.==) ']')"
430 in let readFail = readFail
431 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=1"
439 in if (GHC.Classes.==) ']' c
441 let _ = "lift2Value checkedHorizon=1"
446 ( let _ = "resume.genCode"
447 in Parsers.Brainfuck.Types.Loop v
451 let _ = "checkToken.fail"
452 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
454 let _ = "checkHorizon.newCheck.fail"
456 Data.Set.Internal.Bin
458 ( Symantic.Parser.Grammar.Combinators.SomeFailure
460 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
463 Data.Set.Internal.Tip
464 Data.Set.Internal.Tip
468 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
477 failExp GHC.Base.<> farExp
484 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
487 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
490 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail Data.Map.Internal.Tip Data.Map.Internal.Tip)
492 let _ = "choicesBranch.else"
493 in let failExp = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure Symantic.Parser.Grammar.Combinators.FailureEmpty) Data.Set.Internal.Tip Data.Set.Internal.Tip
497 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
506 failExp GHC.Base.<> Data.Set.Internal.empty
511 Data.Set.Internal.empty
513 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
515 let _ = "checkHorizon.newCheck.fail"
517 Data.Set.Internal.Bin
519 ( Symantic.Parser.Grammar.Combinators.SomeFailure
521 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
524 Data.Set.Internal.Tip
525 Data.Set.Internal.Tip
529 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
538 failExp GHC.Base.<> Data.Set.Internal.empty
543 Data.Set.Internal.empty
545 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
547 let _ = "checkHorizon.newCheck.fail"
549 Data.Set.Internal.Bin
551 ( Symantic.Parser.Grammar.Combinators.SomeFailure
553 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
556 Data.Set.Internal.Tip
557 Data.Set.Internal.Tip
561 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
570 failExp GHC.Base.<> Data.Set.Internal.empty
575 Data.Set.Internal.empty
577 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
579 in loop callerOnReturn callerInput (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callerOnExceptionStackByLabel) Data.Map.Internal.Tip Data.Map.Internal.Tip)
580 in let _ = "pushValue"
583 in \farInp farExp v (!inp) ->
584 let _ = "lift2Value checkedHorizon=0"
587 in \farInp farExp v (!inp) ->
588 let _ = "lift2Value checkedHorizon=0"
593 ( let _ = "resume.genCode"
599 Data.Map.Internal.Tip
602 Data.Map.Internal.Tip