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.Catcher
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 = farExp
56 ( let inputToken = Data.Proxy.Proxy :: Data.Proxy.Proxy (Symantic.Parser.Machine.Input.InputToken inp)
57 in let name = \(!callReturn) (!callInput) (!callCatchStackByLabel) ->
58 let _ = "catch ExceptionFailure"
59 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
60 let _ = "catch.ko ExceptionFailure"
61 in Data.Map.Strict.Internal.findWithDefault finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure callCatchStackByLabel Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
62 in let readFail = catchHandler
63 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 3 callInput)
68 #) = readNext callInput
69 in if (GHC.Classes.==) 'a' c
71 let readFail = readFail
76 in if (GHC.Classes.==) 'b' c
78 let readFail = readFail
83 in if (GHC.Classes.==) 'c' c
85 let readFail = readFail
90 in if (GHC.Classes.==) 'd' c
95 Data.Set.Internal.empty
96 ( let _ = "resume.genCode"
97 in (GHC.Types.:) 'a' ((GHC.Types.:) 'b' ((GHC.Types.:) 'c' ((GHC.Types.:) 'd' GHC.Types . [])))
101 let _ = "checkToken.else"
103 Data.Set.Internal.Bin
105 ( Symantic.Parser.Grammar.Combinators.SomeFailure
107 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'd'
110 Data.Set.Internal.Tip
111 Data.Set.Internal.Tip
115 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init cs of
124 failExp GHC.Base.<> Data.Set.Internal.empty
129 Data.Set.Internal.empty
131 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
133 let _ = "checkToken.else"
135 Data.Set.Internal.Bin
137 ( Symantic.Parser.Grammar.Combinators.SomeFailure
139 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'c'
142 Data.Set.Internal.Tip
143 Data.Set.Internal.Tip
147 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init cs of
156 failExp GHC.Base.<> Data.Set.Internal.empty
161 Data.Set.Internal.empty
163 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
165 let _ = "checkToken.else"
167 Data.Set.Internal.Bin
169 ( Symantic.Parser.Grammar.Combinators.SomeFailure
171 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'b'
174 Data.Set.Internal.Tip
175 Data.Set.Internal.Tip
179 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init cs of
188 failExp GHC.Base.<> Data.Set.Internal.empty
193 Data.Set.Internal.empty
195 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp
197 let _ = "checkToken.else"
199 Data.Set.Internal.Bin
201 ( Symantic.Parser.Grammar.Combinators.SomeFailure
203 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'a'
206 Data.Set.Internal.Tip
207 Data.Set.Internal.Tip
211 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
220 failExp GHC.Base.<> Data.Set.Internal.empty
225 Data.Set.Internal.empty
227 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
229 let _ = "checkHorizon.else"
231 Data.Set.Internal.Bin
233 ( Symantic.Parser.Grammar.Combinators.SomeFailure
235 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 4
238 Data.Set.Internal.Tip
239 Data.Set.Internal.Tip
243 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init callInput of
252 failExp GHC.Base.<> Data.Set.Internal.empty
257 Data.Set.Internal.empty
259 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure callInput farInp farExp
262 in \farInp farExp v (!inp) -> do
264 reg <- GHC.STRef.newSTRef dupv
266 in let catchHandler loopInput (!_exn) (!failInp) (!farInp) (!farExp) =
267 if ( \( Data.Text.Internal.Text
272 ( Data.Text.Internal.Text
276 ) -> i GHC.Classes.== j
281 let _ = "choicesBranch.then"
283 sr <- GHC.STRef.readSTRef reg
284 let join = \farInp farExp v (!inp) ->
289 ( let _ = "resume.genCode"
290 in GHC.Show.show ((GHC.Types.:) v (sr GHC.Types . []))
293 in let _ = "catch ExceptionFailure"
294 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
295 let _ = "catch.ko ExceptionFailure"
296 in if ( \( Data.Text.Internal.Text
301 ( Data.Text.Internal.Text
305 ) -> i GHC.Classes.== j
310 let _ = "choicesBranch.then"
311 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
315 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
324 failExp GHC.Base.<> farExp
331 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
333 let _ = "choicesBranch.else"
334 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
335 in let _ = "catch ExceptionFailure"
336 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
337 let _ = "catch.ko ExceptionFailure"
342 ( let _ = "resume.genCode"
346 in let readFail = catchHandler
347 in if readMore failInp
352 #) = readNext failInp
353 in catchHandler Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
355 let _ = "checkHorizon.else"
357 Data.Set.Internal.Bin
359 ( Symantic.Parser.Grammar.Combinators.SomeFailure
361 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
364 Data.Set.Internal.Tip
365 Data.Set.Internal.Tip
369 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
378 failExp GHC.Base.<> farExp
385 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
387 let _ = "choicesBranch.else"
388 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
389 loop = \_callReturn callInput callCatchStackByLabel ->
392 in \farInp farExp v (!inp) -> do
393 sr <- GHC.STRef.readSTRef reg
395 let dupv = \x -> sr ((GHC.Types.:) v x)
396 GHC.STRef.writeSTRef reg dupv
398 in loop (GHC.Err.error "invalid return") inp (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
401 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure (catchHandler callInput) Data.Map.Internal.Tip Data.Map.Internal.Tip)
403 in loop finalRet inp Data.Map.Internal.Tip
406 Data.Map.Internal.Tip