1 test/Golden/Splice/G13.hs:0:0:: Splicing expression
2 P.runParser @Text Grammar.g13
6 !(# init, readMore, readNext #)
7 = let _ = "cursorOf" in
9 next t@(Data.Text.Internal.Text arr off unconsumed)
10 = let !(Data.Text.Unsafe.Iter c d) = (Data.Text.Unsafe.iter t) 0
12 (# c, ((Data.Text.Internal.Text arr) (off + d)) (unconsumed - d) #)
13 more (Data.Text.Internal.Text _ _ unconsumed) = (unconsumed > 0)
14 in (# input, more, next #) in
15 let finalRet = \ _farInp _farExp v _inp -> Right v in
17 finalRaise :: forall b. P.Catcher inp b
18 = \ _failInp !farInp !farExp
20 P.ParsingErrorStandard
21 {P.parsingErrorOffset = P.offset farInp,
22 P.parsingErrorUnexpected = if readMore farInp then
23 Just (let (# c, _ #) = readNext farInp in c)
26 P.parsingErrorExpecting = Data.Set.Internal.fromList farExp} in
29 = \ !ok !inp !koByLabel
32 = \ !ok !inp !koByLabel
33 -> let _ = "catchException lbl=fail" in
36 = \ !failInp !farInp !farExp
38 (((\ (Data.Text.Internal.Text _ i _)
39 (Data.Text.Internal.Text _ j _)
46 (let _ = "resume.genCode" in \ x -> x))
52 ((compare `Data.Function.on` P.offset)
56 LT -> (# failInp, [] #)
57 EQ -> (# farInp, (farExp <> []) #)
58 GT -> (# farInp, farExp #)
60 (((((Data.Map.Strict.Internal.findWithDefault
69 let !(# c, cs #) = readNext inp
95 _ = "call exceptionsByName(name_4)=[] catchStackByLabel(ctx)=["fail"]"
99 _ = "suspend raiseException=fromList [(name_1,fromList []),(name_4,fromList [])]"
101 \ farInp farExp v !inp
104 (((ok farInp) farExp)
105 (let _ = "resume.genCode"
108 (((\ x -> \ x -> x x)
109 (\ x -> \ x -> \ x -> x x))
114 (((((Data.Map.Internal.Bin 1) "fail") readFail)
115 Data.Map.Internal.Tip)
116 Data.Map.Internal.Tip)
118 let _ = "checkToken.else" in
122 ((compare `Data.Function.on` P.offset) init)
127 [P.ErrorItemToken '<',
128 P.ErrorItemToken '>',
129 P.ErrorItemToken '+',
130 P.ErrorItemToken '-',
131 P.ErrorItemToken '[',
132 P.ErrorItemToken ']',
133 P.ErrorItemToken ',',
134 P.ErrorItemToken '.',
135 P.ErrorItemToken '$'] #)
140 [P.ErrorItemToken '<',
141 P.ErrorItemToken '>',
142 P.ErrorItemToken '+',
143 P.ErrorItemToken '-',
144 P.ErrorItemToken '[',
145 P.ErrorItemToken ']',
146 P.ErrorItemToken ',',
147 P.ErrorItemToken '.',
148 P.ErrorItemToken '$']) #)
150 in ((readFail inp) farInp) farExp
152 let _ = "checkHorizon.else" in
155 = case ((compare `Data.Function.on` P.offset) init) inp of
156 LT -> (# inp, [P.ErrorItemHorizon 1] #)
157 EQ -> (# init, ([] <> [P.ErrorItemHorizon 1]) #)
159 in ((readFail inp) farInp) farExp in
161 _ = "call exceptionsByName(name_4)=["fail"] catchStackByLabel(ctx)=[]"
165 _ = "suspend raiseException=fromList [(name_1,fromList []),(name_4,fromList [("fail",())])]"
167 \ farInp farExp v !inp
170 (((ok farInp) farExp)
171 (let _ = "resume.genCode"
172 in ((\ x -> \ x -> x x) (\ x -> ())) v))
175 Data.Map.Internal.Tip in
177 _ = "call exceptionsByName(name_1)=[] catchStackByLabel(ctx)=[]"
180 (let _ = "suspend raiseException=fromList [(name_1,fromList [])]"
182 \ farInp farExp v !inp
185 = \ !ok !inp !koByLabel
188 = \ !ok !inp !koByLabel
189 -> let _ = "catchException lbl=fail" in
192 = \ farInp farExp v !inp
194 _ = "call exceptionsByName(name_1)=[] catchStackByLabel(ctx)=["fail"]"
198 _ = "suspend raiseException=fromList [(name_1,fromList []),(name_2,fromList []),(name_3,fromList [])]"
200 \ farInp farExp v !inp
202 _ = "call exceptionsByName(name_3)=[] catchStackByLabel(ctx)=["fail"]"
206 _ = "suspend raiseException=fromList [(name_1,fromList []),(name_2,fromList []),(name_3,fromList [])]"
239 (((((Data.Map.Internal.Bin
246 (((\ (Data.Text.Internal.Text _
249 (Data.Text.Internal.Text _
291 (((((Data.Map.Strict.Internal.findWithDefault
298 Data.Map.Internal.Tip)
299 Data.Map.Internal.Tip)))
301 (((((Data.Map.Internal.Bin 1) "fail")
302 (\ !failInp !farInp !farExp
304 (((\ (Data.Text.Internal.Text _
307 (Data.Text.Internal.Text _
315 (((ok farInp) farExp)
342 (((((Data.Map.Strict.Internal.findWithDefault
349 Data.Map.Internal.Tip)
350 Data.Map.Internal.Tip) in
353 = \ !failInp !farInp !farExp
355 (((\ (Data.Text.Internal.Text _ i _)
356 (Data.Text.Internal.Text _ j _)
362 (((ok farInp) farExp)
363 (let _ = "resume.genCode"
376 LT -> (# failInp, [] #)
380 GT -> (# farInp, farExp #)
382 (((((Data.Map.Strict.Internal.findWithDefault
391 let !(# c, cs #) = readNext inp
393 if ((\ x -> \ x -> x) True) c then
395 let readFail = readFail
398 ((P.shiftRightText 666)
400 let !(# c, cs #) = readNext inp
402 if ((\ x -> \ x -> x) True)
406 (((join farInp) farExp)
414 -> (Grammar.Brainfuck.RightPointer
420 _ = "checkToken.else" in
440 ((readFail inp) farInp)
443 let _ = "checkHorizon.else" in
464 -> (# farInp, farExp #)
465 in ((readFail inp) farInp) farExp
468 let readFail = readFail
471 ((P.shiftRightText 666)
474 !(# c, cs #) = readNext inp
476 if ((\ x -> \ x -> x) True)
490 -> (Grammar.Brainfuck.LeftPointer
496 _ = "checkToken.else" in
523 _ = "checkHorizon.else" in
547 ((readFail inp) farInp)
551 let readFail = readFail
554 ((P.shiftRightText 666)
560 if ((\ x -> \ x -> x)
575 -> (Grammar.Brainfuck.Increment
581 _ = "checkToken.else" in
609 _ = "checkHorizon.else" in
633 ((readFail inp) farInp)
637 let readFail = readFail
665 -> (Grammar.Brainfuck.Decrement
671 _ = "checkToken.else" in
700 _ = "checkHorizon.else" in
730 let readFail = readFail
760 -> (Grammar.Brainfuck.Output
766 _ = "checkToken.else" in
795 _ = "checkHorizon.else" in
858 -> (Grammar.Brainfuck.Input
864 _ = "checkToken.else" in
893 _ = "checkHorizon.else" in
944 _ = "call exceptionsByName(name_1)=[] catchStackByLabel(ctx)=["fail"]"
948 _ = "suspend raiseException=fromList [(name_1,fromList []),(name_2,fromList []),(name_3,fromList []),(join_46,fromList [])]"
955 _ = "call exceptionsByName(name_2)=[] catchStackByLabel(ctx)=["fail"]"
959 _ = "suspend raiseException=fromList [(name_1,fromList []),(name_2,fromList []),(name_3,fromList []),(join_46,fromList [])]"
1008 -> (Grammar.Brainfuck.Loop
1018 _ = "checkToken.else" in
1049 _ = "checkHorizon.else" in
1079 (((((Data.Map.Internal.Bin
1083 Data.Map.Internal.Tip)
1084 Data.Map.Internal.Tip)))
1086 (((((Data.Map.Internal.Bin
1090 Data.Map.Internal.Tip)
1091 Data.Map.Internal.Tip)
1094 _ = "checkToken.else" in
1123 _ = "checkHorizon.else" in
1180 let _ = "checkToken.else" in
1182 (# farInp, farExp #)
1185 `Data.Function.on` P.offset)
1190 EQ -> (# farInp, (farExp <> []) #)
1191 GT -> (# farInp, farExp #)
1192 in ((readFail inp) farInp) farExp
1194 let _ = "checkHorizon.else" in
1196 (# farInp, farExp #)
1198 ((compare `Data.Function.on` P.offset)
1202 LT -> (# inp, [P.ErrorItemHorizon 1] #)
1206 <> [P.ErrorItemHorizon 1]) #)
1207 GT -> (# farInp, farExp #)
1208 in ((readFail inp) farInp) farExp in
1210 _ = "call exceptionsByName(name_3)=["fail"] catchStackByLabel(ctx)=[]"
1214 _ = "suspend raiseException=fromList [(name_1,fromList []),(name_2,fromList []),(name_3,fromList [("fail",())])]"
1216 \ farInp farExp v !inp
1219 (((ok farInp) farExp)
1220 (let _ = "resume.genCode"
1221 in ((\ x -> \ x -> x x) (\ x -> x [])) v))
1224 Data.Map.Internal.Tip in
1226 _ = "call exceptionsByName(name_2)=[] catchStackByLabel(ctx)=[]"
1230 _ = "suspend raiseException=fromList [(name_1,fromList []),(name_2,fromList [])]"
1232 \ farInp farExp v !inp
1235 (((finalRet farInp) farExp)
1236 (let _ = "resume.genCode"
1238 ((\ x -> \ x -> x x)
1239 (((\ x -> \ x -> x x) (\ x -> \ x -> x)) v))
1243 Data.Map.Internal.Tip))
1245 Data.Map.Internal.Tip