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=1"
94 in let _ = "pushValue"
95 in let _ = "pushValue"
98 reg <- GHC.STRef.newSTRef dupv
100 in let onException loopInput =
101 let _ = "onException"
102 in \(!_exn) (!failInp) (!farInp) (!farExp) ->
103 let _ = "comment: raiseAgainIfConsumed"
104 in let _ = "saveInput checkedHorizon=0"
105 in let _ = "lift2Value checkedHorizon=0"
106 in if ( \( Data.Text.Internal.Text
111 ( Data.Text.Internal.Text
115 ) -> i GHC.Classes.== j
120 let _ = "choicesBranch checkedHorizon=0"
122 sr <- GHC.STRef.readSTRef reg
124 in let _ = "lift2Value checkedHorizon=0"
125 in let _ = "lift2Value checkedHorizon=0"
126 in let _ = "comment: satisfy ((GHC.Classes.==) 'b')"
128 in let readFail = finalRaise
129 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=1"
137 in if (GHC.Classes.==) 'b' c
139 let _ = "lift2Value checkedHorizon=1"
144 ( let _ = "resume.genCode"
145 in GHC.Show.show (sr GHC.Types . [])
149 let _ = "checkToken.fail"
151 Data.Set.Internal.Bin
153 ( Symantic.Parser.Grammar.Combinators.SomeFailure
155 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'b'
158 Data.Set.Internal.Tip
159 Data.Set.Internal.Tip
163 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
172 failExp GHC.Base.<> farExp
179 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
181 let _ = "checkHorizon.newCheck.fail"
183 Data.Set.Internal.Bin
185 ( Symantic.Parser.Grammar.Combinators.SomeFailure
187 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
190 Data.Set.Internal.Tip
191 Data.Set.Internal.Tip
195 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
204 failExp GHC.Base.<> farExp
211 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
213 let _ = "choicesBranch.else"
214 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
215 loop = \_callerOnReturn callerInput callerOnExceptionStackByLabel ->
217 in let _ = "comment: satisfy ((GHC.Classes.==) 'a')"
218 in let inp = callerInput
219 in let readFail = onException callerInput
220 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=1"
228 in if (GHC.Classes.==) 'a' c
230 let _ = "lift2Value checkedHorizon=1"
231 in let _ = "pushValue"
232 in let _ = "lift2Value checkedHorizon=1"
234 sr <- GHC.STRef.readSTRef reg
235 let _ = "lift2Value checkedHorizon=1"
237 let dupv = \x -> sr ((GHC.Types.:) 'a' x)
238 GHC.STRef.writeSTRef reg dupv
240 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)
242 let _ = "checkToken.fail"
244 Data.Set.Internal.Bin
246 ( Symantic.Parser.Grammar.Combinators.SomeFailure
248 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'a'
251 Data.Set.Internal.Tip
252 Data.Set.Internal.Tip
256 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
265 failExp GHC.Base.<> Data.Set.Internal.empty
270 Data.Set.Internal.empty
272 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
274 let _ = "checkHorizon.newCheck.fail"
276 Data.Set.Internal.Bin
278 ( Symantic.Parser.Grammar.Combinators.SomeFailure
280 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
283 Data.Set.Internal.Tip
284 Data.Set.Internal.Tip
288 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
297 failExp GHC.Base.<> Data.Set.Internal.empty
302 Data.Set.Internal.empty
304 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
306 in loop finalRet inp Data.Map.Internal.Tip
308 let _ = "checkHorizon.newCheck.fail"
310 Data.Set.Internal.Bin
312 ( Symantic.Parser.Grammar.Combinators.SomeFailure
314 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
317 Data.Set.Internal.Tip
318 Data.Set.Internal.Tip
322 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
331 failExp GHC.Base.<> Data.Set.Internal.empty
336 Data.Set.Internal.empty
338 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp