]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G7.expected.txt
fix: use a global polyfix for defLet and defRef
[haskell/symantic-parser.git] / test / Golden / Splice / G7.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 _ = "catchException lbl=fail"
58 in let catchHandler_24 (!failInp_25) (!farInp_26) (!farExp_27) =
59 let _ = "catchException.ko lbl=fail"
60 in if ( \( Data.Text.Internal.Text
61 _
62 i_28
63 _
64 )
65 ( Data.Text.Internal.Text
66 _
67 j_29
68 _
69 ) -> i_28 GHC.Classes.== j_29
70 )
71 init_1
72 failInp_25
73 then
74 let _ = "choicesBranch.then"
75 in let _ = "catchException lbl=fail"
76 in let catchHandler_30 (!failInp_31) (!farInp_32) (!farExp_33) =
77 let _ = "catchException.ko lbl=fail"
78 in let (#
79 farInp_34,
80 farExp_35
81 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_32 failInp_25 of
82 GHC.Types.LT ->
83 (#
84 failInp_25,
85 []
86 #)
87 GHC.Types.EQ ->
88 (#
89 farInp_32,
90 farExp_33 GHC.Base.<> []
91 #)
92 GHC.Types.GT ->
93 (#
94 farInp_32,
95 farExp_33
96 #)
97 in finalRaise_18 failInp_25 farInp_34 farExp_35
98 in let readFail_36 = catchHandler_30
99 in if readMore_2 (Symantic.Parser.Machine.Input.shiftRightText 1 failInp_25)
100 then
101 let !(#
102 c_37,
103 cs_38
104 #) = readNext_3 failInp_25
105 in if ('a' GHC.Classes.==) c_37
106 then
107 let readFail_39 = readFail_36
108 in let !(#
109 c_40,
110 cs_41
111 #) = readNext_3 cs_38
112 in if ('b' GHC.Classes.==) c_40
113 then
114 let _ = "resume"
115 in finalRet_13
116 farInp_26
117 farExp_27
118 ( let _ = "resume.genCode"
119 in 'a' GHC.Types.: ('b' GHC.Types.: GHC.Types . [])
120 )
121 cs_41
122 else
123 let _ = "checkToken.else"
124 in let (#
125 farInp_42,
126 farExp_43
127 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_26 cs_38 of
128 GHC.Types.LT ->
129 (#
130 cs_38,
131 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'b']
132 #)
133 GHC.Types.EQ ->
134 (#
135 farInp_26,
136 farExp_27 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'b']
137 #)
138 GHC.Types.GT ->
139 (#
140 farInp_26,
141 farExp_27
142 #)
143 in readFail_36 cs_38 farInp_42 farExp_43
144 else
145 let _ = "checkToken.else"
146 in let (#
147 farInp_44,
148 farExp_45
149 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_26 failInp_25 of
150 GHC.Types.LT ->
151 (#
152 failInp_25,
153 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
154 #)
155 GHC.Types.EQ ->
156 (#
157 farInp_26,
158 farExp_27 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
159 #)
160 GHC.Types.GT ->
161 (#
162 farInp_26,
163 farExp_27
164 #)
165 in readFail_36 failInp_25 farInp_44 farExp_45
166 else
167 let _ = "checkHorizon.else"
168 in let (#
169 farInp_46,
170 farExp_47
171 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_26 failInp_25 of
172 GHC.Types.LT ->
173 (#
174 failInp_25,
175 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 2]
176 #)
177 GHC.Types.EQ ->
178 (#
179 farInp_26,
180 farExp_27 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 2]
181 #)
182 GHC.Types.GT ->
183 (#
184 farInp_26,
185 farExp_27
186 #)
187 in readFail_36 failInp_25 farInp_46 farExp_47
188 else
189 let _ = "choicesBranch.else"
190 in let (#
191 farInp_48,
192 farExp_49
193 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_26 failInp_25 of
194 GHC.Types.LT ->
195 (#
196 failInp_25,
197 []
198 #)
199 GHC.Types.EQ ->
200 (#
201 farInp_26,
202 farExp_27 GHC.Base.<> []
203 #)
204 GHC.Types.GT ->
205 (#
206 farInp_26,
207 farExp_27
208 #)
209 in finalRaise_18 failInp_25 farInp_48 farExp_49
210 in let _ = "catchException lbl=fail"
211 in let catchHandler_50 (!failInp_51) (!farInp_52) (!farExp_53) =
212 let _ = "catchException.ko lbl=fail"
213 in let (#
214 farInp_54,
215 farExp_55
216 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_52 init_1 of
217 GHC.Types.LT ->
218 (#
219 init_1,
220 []
221 #)
222 GHC.Types.EQ ->
223 (#
224 farInp_52,
225 farExp_53 GHC.Base.<> []
226 #)
227 GHC.Types.GT ->
228 (#
229 farInp_52,
230 farExp_53
231 #)
232 in catchHandler_24 init_1 farInp_54 farExp_55
233 in let readFail_56 = catchHandler_50
234 in if readMore_2 (Symantic.Parser.Machine.Input.shiftRightText 1 init_1)
235 then
236 let !(#
237 c_57,
238 cs_58
239 #) = readNext_3 init_1
240 in if ('a' GHC.Classes.==) c_57
241 then
242 let readFail_59 = readFail_56
243 in let !(#
244 c_60,
245 cs_61
246 #) = readNext_3 cs_58
247 in if ('a' GHC.Classes.==) c_60
248 then
249 let _ = "resume"
250 in finalRet_13 init_1 GHC.Types
251 . []
252 ( let _ = "resume.genCode"
253 in 'a' GHC.Types.: ('a' GHC.Types.: GHC.Types . [])
254 )
255 cs_61
256 else
257 let _ = "checkToken.else"
258 in let (#
259 farInp_62,
260 farExp_63
261 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 cs_58 of
262 GHC.Types.LT ->
263 (#
264 cs_58,
265 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
266 #)
267 GHC.Types.EQ ->
268 (#
269 init_1,
270 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
271 #)
272 GHC.Types.GT ->
273 (#
274 init_1,
275 GHC.Types . []
276 #)
277 in readFail_56 cs_58 farInp_62 farExp_63
278 else
279 let _ = "checkToken.else"
280 in let (#
281 farInp_64,
282 farExp_65
283 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 init_1 of
284 GHC.Types.LT ->
285 (#
286 init_1,
287 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
288 #)
289 GHC.Types.EQ ->
290 (#
291 init_1,
292 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
293 #)
294 GHC.Types.GT ->
295 (#
296 init_1,
297 GHC.Types . []
298 #)
299 in readFail_56 init_1 farInp_64 farExp_65
300 else
301 let _ = "checkHorizon.else"
302 in let (#
303 farInp_66,
304 farExp_67
305 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 init_1 of
306 GHC.Types.LT ->
307 (#
308 init_1,
309 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 2]
310 #)
311 GHC.Types.EQ ->
312 (#
313 init_1,
314 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 2]
315 #)
316 GHC.Types.GT ->
317 (#
318 init_1,
319 GHC.Types . []
320 #)
321 in readFail_56 init_1 farInp_66 farExp_67