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"
90 in let _ = "pushValue"
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"
122 in let join = \farInp farExp v (!inp) ->
123 let _ = "lift2Value checkedHorizon=0"
128 ( let _ = "resume.genCode"
129 in GHC.Show.show (sr GHC.Types . [])
132 in let _ = "catch ExceptionFailure checkedHorizon=0"
134 let _ = "onException"
135 in \(!_exn) (!failInp) (!farInp) (!farExp) ->
136 let _ = "comment: raiseAgainIfConsumed"
137 in let _ = "saveInput checkedHorizon=0"
138 in let _ = "lift2Value checkedHorizon=0"
139 in if ( \( Data.Text.Internal.Text
144 ( Data.Text.Internal.Text
148 ) -> i GHC.Classes.== j
153 let _ = "choicesBranch checkedHorizon=0"
154 in let _ = "comment: eof.fail"
155 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
159 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
168 failExp GHC.Base.<> farExp
175 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
177 let _ = "choicesBranch.else"
178 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
179 in let _ = "comment: negLook"
180 in let _ = "catch ExceptionFailure checkedHorizon=0"
182 let _ = "onException"
183 in \(!_exn) (!failInp) (!farInp) (!farExp) ->
184 let _ = "comment: negLook.reset"
185 in let _ = "loadInput checkedHorizon=0"
186 in let _ = "checkHorizon.noCheck"
187 in let _ = "pushValue"
193 ( let _ = "resume.genCode"
197 in let _ = "comment: negLook.ahead"
198 in let _ = "saveInput checkedHorizon=0"
199 in let _ = "comment: satisfy ((\\x_0 -> \\x_1 -> x_0) GHC.Types.True)"
201 in let readFail = onException
202 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=1"
210 in let _ = "popValue"
212 in let _ = "loadInput checkedHorizon=0"
213 in let _ = "checkHorizon.noCheck"
214 in onException Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
216 let _ = "checkHorizon.newCheck.fail"
218 Data.Set.Internal.Bin
220 ( Symantic.Parser.Grammar.Combinators.SomeFailure
222 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
225 Data.Set.Internal.Tip
226 Data.Set.Internal.Tip
230 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp inp of
239 failExp GHC.Base.<> farExp
246 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
248 let _ = "choicesBranch.else"
249 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
250 loop = \_callerOnReturn callerInput callerOnExceptionStackByLabel ->
252 in let _ = "comment: satisfy ((GHC.Classes.==) 'r')"
253 in let inp = callerInput
254 in let readFail = onException callerInput
255 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=1"
263 in if (GHC.Classes.==) 'r' c
265 let _ = "lift2Value checkedHorizon=1"
266 in let _ = "pushValue"
267 in let _ = "lift2Value checkedHorizon=1"
269 sr <- GHC.STRef.readSTRef reg
270 let _ = "lift2Value checkedHorizon=1"
272 let dupv = \x -> sr ((GHC.Types.:) 'r' x)
273 GHC.STRef.writeSTRef reg dupv
275 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)
277 let _ = "checkToken.fail"
279 Data.Set.Internal.Bin
281 ( Symantic.Parser.Grammar.Combinators.SomeFailure
283 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'r'
286 Data.Set.Internal.Tip
287 Data.Set.Internal.Tip
291 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
300 failExp GHC.Base.<> Data.Set.Internal.empty
305 Data.Set.Internal.empty
307 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
309 let _ = "checkHorizon.newCheck.fail"
311 Data.Set.Internal.Bin
313 ( Symantic.Parser.Grammar.Combinators.SomeFailure
315 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
318 Data.Set.Internal.Tip
319 Data.Set.Internal.Tip
323 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init inp of
332 failExp GHC.Base.<> Data.Set.Internal.empty
337 Data.Set.Internal.empty
339 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure inp farInp farExp
341 in loop finalRet init Data.Map.Internal.Tip