]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G6.expected.txt
fix: use a global polyfix for defLet and defRef
[haskell/symantic-parser.git] / test / Golden / Splice / G6.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 readFail_30 = finalRaise_18
76 in if readMore_2 (Symantic.Parser.Machine.Input.shiftRightText 1 failInp_25)
77 then
78 let !(#
79 c_31,
80 cs_32
81 #) = readNext_3 failInp_25
82 in if ('a' GHC.Classes.==) c_31
83 then
84 let readFail_33 = finalRaise_18
85 in let !(#
86 c_34,
87 cs_35
88 #) = readNext_3 cs_32
89 in if ('b' GHC.Classes.==) c_34
90 then
91 let _ = "resume"
92 in finalRet_13
93 farInp_26
94 farExp_27
95 ( let _ = "resume.genCode"
96 in 'a' GHC.Types.: ('b' GHC.Types.: GHC.Types . [])
97 )
98 cs_35
99 else
100 let _ = "checkToken.else"
101 in let (#
102 farInp_36,
103 farExp_37
104 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_26 cs_32 of
105 GHC.Types.LT ->
106 (#
107 cs_32,
108 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'b']
109 #)
110 GHC.Types.EQ ->
111 (#
112 farInp_26,
113 farExp_27 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'b']
114 #)
115 GHC.Types.GT ->
116 (#
117 farInp_26,
118 farExp_27
119 #)
120 in finalRaise_18 cs_32 farInp_36 farExp_37
121 else
122 let _ = "checkToken.else"
123 in let (#
124 farInp_38,
125 farExp_39
126 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_26 failInp_25 of
127 GHC.Types.LT ->
128 (#
129 failInp_25,
130 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
131 #)
132 GHC.Types.EQ ->
133 (#
134 farInp_26,
135 farExp_27 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
136 #)
137 GHC.Types.GT ->
138 (#
139 farInp_26,
140 farExp_27
141 #)
142 in finalRaise_18 failInp_25 farInp_38 farExp_39
143 else
144 let _ = "checkHorizon.else"
145 in let (#
146 farInp_40,
147 farExp_41
148 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_26 failInp_25 of
149 GHC.Types.LT ->
150 (#
151 failInp_25,
152 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 2]
153 #)
154 GHC.Types.EQ ->
155 (#
156 farInp_26,
157 farExp_27 GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 2]
158 #)
159 GHC.Types.GT ->
160 (#
161 farInp_26,
162 farExp_27
163 #)
164 in finalRaise_18 failInp_25 farInp_40 farExp_41
165 else
166 let _ = "choicesBranch.else"
167 in let (#
168 farInp_42,
169 farExp_43
170 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_26 failInp_25 of
171 GHC.Types.LT ->
172 (#
173 failInp_25,
174 []
175 #)
176 GHC.Types.EQ ->
177 (#
178 farInp_26,
179 farExp_27 GHC.Base.<> []
180 #)
181 GHC.Types.GT ->
182 (#
183 farInp_26,
184 farExp_27
185 #)
186 in finalRaise_18 failInp_25 farInp_42 farExp_43
187 in let readFail_44 = catchHandler_24
188 in if readMore_2 (Symantic.Parser.Machine.Input.shiftRightText 1 init_1)
189 then
190 let !(#
191 c_45,
192 cs_46
193 #) = readNext_3 init_1
194 in if ('a' GHC.Classes.==) c_45
195 then
196 let readFail_47 = readFail_44
197 in let !(#
198 c_48,
199 cs_49
200 #) = readNext_3 cs_46
201 in if ('a' GHC.Classes.==) c_48
202 then
203 let _ = "resume"
204 in finalRet_13 init_1 GHC.Types
205 . []
206 ( let _ = "resume.genCode"
207 in 'a' GHC.Types.: ('a' GHC.Types.: GHC.Types . [])
208 )
209 cs_49
210 else
211 let _ = "checkToken.else"
212 in let (#
213 farInp_50,
214 farExp_51
215 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 cs_46 of
216 GHC.Types.LT ->
217 (#
218 cs_46,
219 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
220 #)
221 GHC.Types.EQ ->
222 (#
223 init_1,
224 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
225 #)
226 GHC.Types.GT ->
227 (#
228 init_1,
229 GHC.Types . []
230 #)
231 in readFail_44 cs_46 farInp_50 farExp_51
232 else
233 let _ = "checkToken.else"
234 in let (#
235 farInp_52,
236 farExp_53
237 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 init_1 of
238 GHC.Types.LT ->
239 (#
240 init_1,
241 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
242 #)
243 GHC.Types.EQ ->
244 (#
245 init_1,
246 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
247 #)
248 GHC.Types.GT ->
249 (#
250 init_1,
251 GHC.Types . []
252 #)
253 in readFail_44 init_1 farInp_52 farExp_53
254 else
255 let _ = "checkHorizon.else"
256 in let (#
257 farInp_54,
258 farExp_55
259 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 init_1 of
260 GHC.Types.LT ->
261 (#
262 init_1,
263 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 2]
264 #)
265 GHC.Types.EQ ->
266 (#
267 init_1,
268 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 2]
269 #)
270 GHC.Types.GT ->
271 (#
272 init_1,
273 GHC.Types . []
274 #)
275 in readFail_44 init_1 farInp_54 farExp_55