]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G16.expected.txt
fix: use a global polyfix for defLet and defRef
[haskell/symantic-parser.git] / test / Golden / Splice / G16.expected.txt
1 \(input_0 :: inp_6989586621679059048) ->
2 let !(#
3 init_1,
4 readMore_2,
5 readNext_3
6 #) =
7 let _ = "cursorOf"
8 in let next_4
9 ( t_5@( Data.Text.Internal.Text
10 arr_6
11 off_7
12 unconsumed_8
13 )
14 ) =
15 let !( Data.Text.Unsafe.Iter
16 c_9
17 d_10
18 ) = Data.Text.Unsafe.iter t_5 0
19 in (#
20 c_9,
21 Data.Text.Internal.Text arr_6 (off_7 GHC.Num.+ d_10) (unconsumed_8 GHC.Num.- d_10)
22 #)
23 more_11
24 ( Data.Text.Internal.Text
25 _
26 _
27 unconsumed_12
28 ) = unconsumed_12 GHC.Classes.> 0
29 in (#
30 input_0,
31 more_11,
32 next_4
33 #)
34 in let finalRet_13 = \_farInp_14 _farExp_15 v_16 _inp_17 -> Data.Either.Right v_16
35 in let finalRaise_18 ::
36 forall b_19.
37 Symantic.Parser.Machine.Generate.Catcher
38 inp_6989586621679059048
39 b_19 = \_failInp_20 (!farInp_21) (!farExp_22) ->
40 Data.Either.Left
41 Symantic.Parser.Machine.Generate.ParsingErrorStandard
42 { Symantic.Parser.Machine.Generate.parsingErrorOffset = Symantic.Parser.Machine.Input.offset farInp_21,
43 Symantic.Parser.Machine.Generate.parsingErrorUnexpected =
44 if readMore_2 farInp_21
45 then
46 GHC.Maybe.Just
47 ( let (#
48 c_23,
49 _
50 #) = readNext_3 farInp_21
51 in c_23
52 )
53 else GHC.Maybe.Nothing,
54 Symantic.Parser.Machine.Generate.parsingErrorExpecting = Data.Set.Internal.fromList farExp_22
55 }
56 in let
57 in let join_24 = \farInp_25 farExp_26 v_27 (!inp_28) ->
58 let readFail_29 = finalRaise_18
59 in if readMore_2 inp_28
60 then
61 let !(#
62 c_30,
63 cs_31
64 #) = readNext_3 inp_28
65 in if ('d' GHC.Classes.==) c_30
66 then
67 let _ = "resume"
68 in finalRet_13
69 farInp_25
70 farExp_26
71 ( let _ = "resume.genCode"
72 in v_27
73 )
74 cs_31
75 else
76 let _ = "checkToken.else"
77 in let (#
78 farInp_32,
79 farExp_33
80 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_25 inp_28 of
81 GHC.Types.LT ->
82 (#
83 inp_28,
84 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'd']
85 #)
86 GHC.Types.EQ ->
87 (#
88 farInp_25,
89 farExp_26 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'd']
90 #)
91 GHC.Types.GT ->
92 (#
93 farInp_25,
94 farExp_26
95 #)
96 in finalRaise_18 inp_28 farInp_32 farExp_33
97 else
98 let _ = "checkHorizon.else"
99 in let (#
100 farInp_34,
101 farExp_35
102 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_25 inp_28 of
103 GHC.Types.LT ->
104 (#
105 inp_28,
106 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 1]
107 #)
108 GHC.Types.EQ ->
109 (#
110 farInp_25,
111 farExp_26 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 1]
112 #)
113 GHC.Types.GT ->
114 (#
115 farInp_25,
116 farExp_26
117 #)
118 in finalRaise_18 inp_28 farInp_34 farExp_35
119 in let _ = "catchException lbl=fail"
120 in let catchHandler_36 (!failInp_37) (!farInp_38) (!farExp_39) =
121 let _ = "catchException.ko lbl=fail"
122 in if ( \( Data.Text.Internal.Text
123 _
124 i_40
125 _
126 )
127 ( Data.Text.Internal.Text
128 _
129 j_41
130 _
131 ) -> i_40 GHC.Classes.== j_41
132 )
133 init_1
134 failInp_37
135 then
136 let _ = "choicesBranch.then"
137 in let readFail_42 = finalRaise_18
138 in if readMore_2 (Symantic.Parser.Machine.Input.shiftRightText 1 failInp_37)
139 then
140 let !(#
141 c_43,
142 cs_44
143 #) = readNext_3 failInp_37
144 in if ('c' GHC.Classes.==) c_43
145 then
146 let _ = "resume"
147 in join_24
148 farInp_38
149 farExp_39
150 ( let _ = "resume.genCode"
151 in 'c'
152 )
153 cs_44
154 else
155 let _ = "checkToken.else"
156 in let (#
157 farInp_45,
158 farExp_46
159 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_38 failInp_37 of
160 GHC.Types.LT ->
161 (#
162 failInp_37,
163 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'c']
164 #)
165 GHC.Types.EQ ->
166 (#
167 farInp_38,
168 farExp_39 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'c']
169 #)
170 GHC.Types.GT ->
171 (#
172 farInp_38,
173 farExp_39
174 #)
175 in finalRaise_18 failInp_37 farInp_45 farExp_46
176 else
177 let _ = "checkHorizon.else"
178 in let (#
179 farInp_47,
180 farExp_48
181 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_38 failInp_37 of
182 GHC.Types.LT ->
183 (#
184 failInp_37,
185 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 2]
186 #)
187 GHC.Types.EQ ->
188 (#
189 farInp_38,
190 farExp_39 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 2]
191 #)
192 GHC.Types.GT ->
193 (#
194 farInp_38,
195 farExp_39
196 #)
197 in finalRaise_18 failInp_37 farInp_47 farExp_48
198 else
199 let _ = "choicesBranch.else"
200 in let (#
201 farInp_49,
202 farExp_50
203 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_38 failInp_37 of
204 GHC.Types.LT ->
205 (#
206 failInp_37,
207 []
208 #)
209 GHC.Types.EQ ->
210 (#
211 farInp_38,
212 farExp_39 GHC.Base.<> []
213 #)
214 GHC.Types.GT ->
215 (#
216 farInp_38,
217 farExp_39
218 #)
219 in finalRaise_18 failInp_37 farInp_49 farExp_50
220 in let join_51 = \farInp_52 farExp_53 v_54 (!inp_55) ->
221 let _ = "resume"
222 in join_24
223 farInp_52
224 farExp_53
225 ( let _ = "resume.genCode"
226 in v_54
227 )
228 inp_55
229 in let _ = "catchException lbl=fail"
230 in let catchHandler_56 (!failInp_57) (!farInp_58) (!farExp_59) =
231 let _ = "catchException.ko lbl=fail"
232 in if ( \( Data.Text.Internal.Text
233 _
234 i_60
235 _
236 )
237 ( Data.Text.Internal.Text
238 _
239 j_61
240 _
241 ) -> i_60 GHC.Classes.== j_61
242 )
243 init_1
244 failInp_57
245 then
246 let _ = "choicesBranch.then"
247 in let readFail_62 = catchHandler_36
248 in if readMore_2 (Symantic.Parser.Machine.Input.shiftRightText 1 failInp_57)
249 then
250 let !(#
251 c_63,
252 cs_64
253 #) = readNext_3 failInp_57
254 in if ('b' GHC.Classes.==) c_63
255 then
256 let _ = "resume"
257 in join_51
258 farInp_58
259 farExp_59
260 ( let _ = "resume.genCode"
261 in 'b'
262 )
263 cs_64
264 else
265 let _ = "checkToken.else"
266 in let (#
267 farInp_65,
268 farExp_66
269 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_58 failInp_57 of
270 GHC.Types.LT ->
271 (#
272 failInp_57,
273 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'b']
274 #)
275 GHC.Types.EQ ->
276 (#
277 farInp_58,
278 farExp_59 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'b']
279 #)
280 GHC.Types.GT ->
281 (#
282 farInp_58,
283 farExp_59
284 #)
285 in readFail_62 failInp_57 farInp_65 farExp_66
286 else
287 let _ = "checkHorizon.else"
288 in let (#
289 farInp_67,
290 farExp_68
291 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_58 failInp_57 of
292 GHC.Types.LT ->
293 (#
294 failInp_57,
295 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 2]
296 #)
297 GHC.Types.EQ ->
298 (#
299 farInp_58,
300 farExp_59 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 2]
301 #)
302 GHC.Types.GT ->
303 (#
304 farInp_58,
305 farExp_59
306 #)
307 in readFail_62 failInp_57 farInp_67 farExp_68
308 else
309 let _ = "choicesBranch.else"
310 in let (#
311 farInp_69,
312 farExp_70
313 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_58 failInp_57 of
314 GHC.Types.LT ->
315 (#
316 failInp_57,
317 []
318 #)
319 GHC.Types.EQ ->
320 (#
321 farInp_58,
322 farExp_59 GHC.Base.<> []
323 #)
324 GHC.Types.GT ->
325 (#
326 farInp_58,
327 farExp_59
328 #)
329 in catchHandler_36 failInp_57 farInp_69 farExp_70
330 in let readFail_71 = catchHandler_56
331 in if readMore_2 (Symantic.Parser.Machine.Input.shiftRightText 1 init_1)
332 then
333 let !(#
334 c_72,
335 cs_73
336 #) = readNext_3 init_1
337 in if ('a' GHC.Classes.==) c_72
338 then
339 let _ = "resume"
340 in join_51 init_1 GHC.Types
341 . []
342 ( let _ = "resume.genCode"
343 in 'a'
344 )
345 cs_73
346 else
347 let _ = "checkToken.else"
348 in let (#
349 farInp_74,
350 farExp_75
351 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 init_1 of
352 GHC.Types.LT ->
353 (#
354 init_1,
355 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
356 #)
357 GHC.Types.EQ ->
358 (#
359 init_1,
360 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
361 #)
362 GHC.Types.GT ->
363 (#
364 init_1,
365 GHC.Types . []
366 #)
367 in readFail_71 init_1 farInp_74 farExp_75
368 else
369 let _ = "checkHorizon.else"
370 in let (#
371 farInp_76,
372 farExp_77
373 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 init_1 of
374 GHC.Types.LT ->
375 (#
376 init_1,
377 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 2]
378 #)
379 GHC.Types.EQ ->
380 (#
381 init_1,
382 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 2]
383 #)
384 GHC.Types.GT ->
385 (#
386 init_1,
387 GHC.Types . []
388 #)
389 in readFail_71 init_1 farInp_76 farExp_77