1 \(input_0 :: inp_6989586621679402203) ->
9 let next_6 buf_7 pos_8 =
10 let !( Data.Text.Unsafe.Iter
13 ) = Symantic.Parser.Machine.Input.Text.Buffer.iter buf_7 pos_8
18 more_11 buf_12 pos_13 = pos_13 GHC.Classes.< Symantic.Parser.Machine.Input.Text.Buffer.length buf_12
19 append_14 = Symantic.Parser.Machine.Input.Text.Buffer.pappend
21 Symantic.Parser.Machine.Input.Text.Buffer.buffer input_0,
27 finalRet_15 = \_farInp_16 _farExp_17 v_18 _inp_19 -> Symantic.Parser.Machine.Generate.returnST GHC.Base.$ Symantic.Parser.Machine.Generate.ResultDone v_18
30 Symantic.Parser.Machine.Generate.OnException
31 inp_6989586621679402203
32 b_21 = \(!exn_22) _failInp_23 (!farInp_24) (!farExp_25) buf_26 ->
33 Symantic.Parser.Machine.Generate.returnST GHC.Base.$
34 Symantic.Parser.Machine.Generate.ResultError
35 Symantic.Parser.Machine.Generate.ParsingError
36 { Symantic.Parser.Machine.Generate.parsingErrorOffset = Symantic.Parser.Machine.Input.position farInp_24,
37 Symantic.Parser.Machine.Generate.parsingErrorException = exn_22,
38 Symantic.Parser.Machine.Generate.parsingErrorUnexpected =
39 if readMore_3 buf_26 farInp_24
45 #) = readNext_4 buf_26 farInp_24
48 else GHC.Maybe.Nothing,
49 Symantic.Parser.Machine.Generate.parsingErrorExpecting =
53 Data.Set.Internal.foldr
57 ) -> case Symantic.Parser.Grammar.Combinators.unSomeFailure f_30 of
58 GHC.Maybe.Just (Symantic.Parser.Grammar.Combinators.FailureHorizon h_33 :: Symantic.Parser.Grammar.Combinators.Failure (Symantic.Parser.Grammar.Combinators.CombSatisfiable (Symantic.Parser.Machine.Input.InputToken inp_6989586621679402203)))
59 | GHC.Maybe.Just old_34 <- minH_31 ->
60 ( GHC.Maybe.Just (GHC.Classes.min old_34 h_33),
63 | GHC.Base.otherwise ->
64 ( GHC.Maybe.Just h_33,
69 f_30 GHC.Types.: acc_32
76 in Data.Set.Internal.fromList GHC.Base.$
78 GHC.Maybe.Just h_35 -> Symantic.Parser.Grammar.Combinators.SomeFailure (Symantic.Parser.Grammar.Combinators.FailureHorizon @(Symantic.Parser.Machine.Input.InputToken inp_6989586621679402203) h_35) GHC.Types.: res_29
79 GHC.Maybe.Nothing -> res_29
82 in let inputToken = Data.Proxy.Proxy :: Data.Proxy.Proxy (Symantic.Parser.Machine.Input.InputToken inp_6989586621679402203)
83 in let _ = "checkHorizon.noCheck"
85 in let _ = "pushValue"
86 in let _ = "pushValue"
88 let dupv_36 = \x_37 -> x_37
89 reg_38 <- GHC.STRef.newSTRef dupv_36
91 in let onException_39 loopInput_40 =
93 in \(!_exn_41) (!failInp_42) (!farInp_43) (!farExp_44) buf_45 ->
94 let _ = "comment: raiseAgainIfConsumed"
95 in let _ = "saveInput checkedHorizon=0"
96 in let _ = "lift2Value checkedHorizon=0"
97 in if (GHC.Classes.==) @GHC.Types.Int loopInput_40 failInp_42
99 let _ = "choicesBranch checkedHorizon=0"
101 sr_46 <- GHC.STRef.readSTRef reg_38
103 in let _ = "lift2Value checkedHorizon=0"
104 in let _ = "lift2Value checkedHorizon=0"
105 in let join_47 = \farInp_48 farExp_49 v_50 (!inp_51) ->
106 let _ = "lift2Value checkedHorizon=0"
111 ( let _ = "resume.genCode"
112 in GHC.Show.show (sr_46 GHC.Types . [])
115 in let _ = "catch ExceptionFailure checkedHorizon=0"
116 in let onException_52 =
117 let _ = "onException"
118 in \(!_exn_53) (!failInp_54) (!farInp_55) (!farExp_56) buf_57 ->
119 let _ = "comment: raiseAgainIfConsumed"
120 in let _ = "saveInput checkedHorizon=0"
121 in let _ = "lift2Value checkedHorizon=0"
122 in if (GHC.Classes.==) @GHC.Types.Int failInp_42 failInp_54
124 let _ = "choicesBranch checkedHorizon=0"
125 in let _ = "comment: eof.fail"
126 in let failExp_58 = Data.Set.Internal.Bin 1 (Symantic.Parser.Grammar.Combinators.SomeFailure Symantic.Parser.Grammar.Combinators.FailureEnd) Data.Set.Internal.Tip Data.Set.Internal.Tip
130 #) = case GHC.Classes.compare @GHC.Types.Int farInp_55 failInp_54 of
139 failExp_58 GHC.Base.<> farExp_56
146 in finalRaise_20 Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp_54 farInp_59 farExp_60 buf_57
148 let _ = "choicesBranch.else"
149 in finalRaise_20 Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp_54 farInp_55 farExp_56 buf_57
150 in let _ = "comment: negLook"
151 in let _ = "catch ExceptionFailure checkedHorizon=0"
152 in let onException_61 =
153 let _ = "onException"
154 in \(!_exn_62) (!failInp_63) (!farInp_64) (!farExp_65) buf_66 ->
155 let _ = "comment: negLook.reset"
156 in let _ = "loadInput checkedHorizon=0"
157 in let _ = "checkHorizon.noCheck"
158 in let _ = "pushValue"
164 ( let _ = "resume.genCode"
168 in let _ = "comment: negLook.ahead"
169 in let _ = "saveInput checkedHorizon=0"
170 in let _ = "comment: satisfy ((\\x_0 -> \\x_1 -> x_0) GHC.Types.True)"
171 in let partialCont_67 buf_68 =
172 let readFail_69 = onException_61
173 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=1"
174 in if readMore_3 buf_68 failInp_42
180 #) = readNext_4 buf_68 failInp_42
181 in let _ = "popValue"
183 in let _ = "loadInput checkedHorizon=0"
184 in let _ = "checkHorizon.noCheck"
185 in onException_52 Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp_42 farInp_43 farExp_44 buf_68
187 let _ = "checkHorizon.newCheck.fail"
188 in Symantic.Parser.Machine.Generate.returnST GHC.Base.$
189 ( Symantic.Parser.Machine.Generate.ResultPartial GHC.Base.$
191 if Symantic.Parser.Machine.Input.nullInput newInput_72
194 Data.Set.Internal.Bin
196 ( Symantic.Parser.Grammar.Combinators.SomeFailure
198 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679082037) -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok'_6989586621679082037 1
201 Data.Set.Internal.Tip
202 Data.Set.Internal.Tip
206 #) = case GHC.Classes.compare @GHC.Types.Int farInp_43 failInp_42 of
215 failExp_73 GHC.Base.<> farExp_44
222 in readFail_69 Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp_42 farInp_74 farExp_75 buf_68
223 else partialCont_67 (append_5 buf_68 newInput_72)
226 in partialCont_67 buf_45
228 let _ = "choicesBranch.else"
229 in finalRaise_20 Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp_42 farInp_43 farExp_44 buf_45
230 loop_76 = \_callerOnReturn_77 callerInput_78 callerOnExceptionStackByLabel_79 ->
232 in let _ = "comment: satisfy (\\t_0 -> ('a' GHC.Classes.== t_0) GHC.Classes.|| (('b' GHC.Classes.== t_0) GHC.Classes.|| (('c' GHC.Classes.== t_0) GHC.Classes.|| (('d' GHC.Classes.== t_0) GHC.Classes.|| GHC.Types.False))))"
233 in let partialCont_80 buf_81 =
234 let readFail_82 = onException_39 callerInput_78
235 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=1"
236 in if readMore_3 buf_81 callerInput_78
242 #) = readNext_4 buf_81 callerInput_78
243 in if (\t_85 -> ('a' GHC.Classes.== t_85) GHC.Classes.|| (('b' GHC.Classes.== t_85) GHC.Classes.|| (('c' GHC.Classes.== t_85) GHC.Classes.|| (('d' GHC.Classes.== t_85) GHC.Classes.|| GHC.Types.False)))) c_83
245 let _ = "lift2Value checkedHorizon=1"
246 in let _ = "pushValue"
247 in let _ = "lift2Value checkedHorizon=1"
249 sr_86 <- GHC.STRef.readSTRef reg_38
250 let _ = "lift2Value checkedHorizon=1"
252 let dupv_87 = \x_88 -> sr_86 ((GHC.Types.:) c_83 x_88)
253 GHC.STRef.writeSTRef reg_38 dupv_87
255 in loop_76 (GHC.Err.error "invalid onReturn") cs_84 (Data.Map.Internal.Bin 1 Symantic.Parser.Grammar.Combinators.ExceptionFailure readFail_82 Data.Map.Internal.Tip Data.Map.Internal.Tip)
257 let _ = "checkToken.fail"
259 Data.Set.Internal.Bin
261 ( Symantic.Parser.Grammar.Combinators.SomeFailure
263 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679082037) -> Symantic.Parser.Grammar.Combinators.FailureToken 'b'
266 ( Data.Set.Internal.Bin
268 ( Symantic.Parser.Grammar.Combinators.SomeFailure
270 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679082037) -> Symantic.Parser.Grammar.Combinators.FailureToken 'a'
273 Data.Set.Internal.Tip
274 Data.Set.Internal.Tip
276 ( Data.Set.Internal.Bin
278 ( Symantic.Parser.Grammar.Combinators.SomeFailure
280 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679082037) -> Symantic.Parser.Grammar.Combinators.FailureToken 'c'
283 Data.Set.Internal.Tip
284 ( Data.Set.Internal.Bin
286 ( Symantic.Parser.Grammar.Combinators.SomeFailure
288 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679082037) -> Symantic.Parser.Grammar.Combinators.FailureToken 'd'
291 Data.Set.Internal.Tip
292 Data.Set.Internal.Tip
298 #) = case GHC.Classes.compare @GHC.Types.Int initPos_2 callerInput_78 of
307 failExp_89 GHC.Base.<> Data.Set.Internal.empty
312 Data.Set.Internal.empty
314 in readFail_82 Symantic.Parser.Grammar.Combinators.ExceptionFailure callerInput_78 farInp_90 farExp_91 buf_81
316 let _ = "checkHorizon.newCheck.fail"
317 in Symantic.Parser.Machine.Generate.returnST GHC.Base.$
318 ( Symantic.Parser.Machine.Generate.ResultPartial GHC.Base.$
320 if Symantic.Parser.Machine.Input.nullInput newInput_92
323 Data.Set.Internal.Bin
325 ( Symantic.Parser.Grammar.Combinators.SomeFailure
327 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok'_6989586621679082037) -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok'_6989586621679082037 1
330 Data.Set.Internal.Tip
331 Data.Set.Internal.Tip
335 #) = case GHC.Classes.compare @GHC.Types.Int initPos_2 callerInput_78 of
344 failExp_93 GHC.Base.<> Data.Set.Internal.empty
349 Data.Set.Internal.empty
351 in readFail_82 Symantic.Parser.Grammar.Combinators.ExceptionFailure callerInput_78 farInp_94 farExp_95 buf_81
352 else partialCont_80 (append_5 buf_81 newInput_92)
355 in partialCont_80 initBuffer_1
357 in loop_76 finalRet_15 initPos_2 Data.Map.Internal.Tip