]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G15.expected.txt
fix: use a global polyfix for defLet and defRef
[haskell/symantic-parser.git] / test / Golden / Splice / G15.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 ('c' 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 'c']
85 #)
86 GHC.Types.EQ ->
87 (#
88 farInp_25,
89 farExp_26 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'c']
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 ('b' 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 'b'
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 'b']
164 #)
165 GHC.Types.EQ ->
166 (#
167 farInp_38,
168 farExp_39 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'b']
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 readFail_51 = catchHandler_36
221 in if readMore_2 (Symantic.Parser.Machine.Input.shiftRightText 1 init_1)
222 then
223 let !(#
224 c_52,
225 cs_53
226 #) = readNext_3 init_1
227 in if ('a' GHC.Classes.==) c_52
228 then
229 let _ = "resume"
230 in join_24 init_1 GHC.Types
231 . []
232 ( let _ = "resume.genCode"
233 in 'a'
234 )
235 cs_53
236 else
237 let _ = "checkToken.else"
238 in let (#
239 farInp_54,
240 farExp_55
241 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 init_1 of
242 GHC.Types.LT ->
243 (#
244 init_1,
245 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
246 #)
247 GHC.Types.EQ ->
248 (#
249 init_1,
250 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
251 #)
252 GHC.Types.GT ->
253 (#
254 init_1,
255 GHC.Types . []
256 #)
257 in readFail_51 init_1 farInp_54 farExp_55
258 else
259 let _ = "checkHorizon.else"
260 in let (#
261 farInp_56,
262 farExp_57
263 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 init_1 of
264 GHC.Types.LT ->
265 (#
266 init_1,
267 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 2]
268 #)
269 GHC.Types.EQ ->
270 (#
271 init_1,
272 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 2]
273 #)
274 GHC.Types.GT ->
275 (#
276 init_1,
277 GHC.Types . []
278 #)
279 in readFail_51 init_1 farInp_56 farExp_57