]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G2.expected.txt
fix: use a global polyfix for defLet and defRef
[haskell/symantic-parser.git] / test / Golden / Splice / G2.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 let (#
61 farInp_28,
62 farExp_29
63 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp_26 init_1 of
64 GHC.Types.LT ->
65 (#
66 init_1,
67 []
68 #)
69 GHC.Types.EQ ->
70 (#
71 farInp_26,
72 farExp_27 GHC.Base.<> []
73 #)
74 GHC.Types.GT ->
75 (#
76 farInp_26,
77 farExp_27
78 #)
79 in finalRaise_18 init_1 farInp_28 farExp_29
80 in let readFail_30 = catchHandler_24
81 in if readMore_2 (Symantic.Parser.Machine.Input.shiftRightText 2 init_1)
82 then
83 let !(#
84 c_31,
85 cs_32
86 #) = readNext_3 init_1
87 in if ('a' GHC.Classes.==) c_31
88 then
89 let readFail_33 = readFail_30
90 in let !(#
91 c_34,
92 cs_35
93 #) = readNext_3 cs_32
94 in if ('b' GHC.Classes.==) c_34
95 then
96 let readFail_36 = readFail_30
97 in let !(#
98 c_37,
99 cs_38
100 #) = readNext_3 cs_35
101 in if ('c' GHC.Classes.==) c_37
102 then
103 let _ = "resume"
104 in finalRet_13 init_1 GHC.Types
105 . []
106 ( let _ = "resume.genCode"
107 in 'a' GHC.Types.: ('b' GHC.Types.: ('c' GHC.Types.: GHC.Types . []))
108 )
109 cs_38
110 else
111 let _ = "checkToken.else"
112 in let (#
113 farInp_39,
114 farExp_40
115 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 cs_35 of
116 GHC.Types.LT ->
117 (#
118 cs_35,
119 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'c']
120 #)
121 GHC.Types.EQ ->
122 (#
123 init_1,
124 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'c']
125 #)
126 GHC.Types.GT ->
127 (#
128 init_1,
129 GHC.Types . []
130 #)
131 in readFail_30 cs_35 farInp_39 farExp_40
132 else
133 let _ = "checkToken.else"
134 in let (#
135 farInp_41,
136 farExp_42
137 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 cs_32 of
138 GHC.Types.LT ->
139 (#
140 cs_32,
141 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'b']
142 #)
143 GHC.Types.EQ ->
144 (#
145 init_1,
146 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'b']
147 #)
148 GHC.Types.GT ->
149 (#
150 init_1,
151 GHC.Types . []
152 #)
153 in readFail_30 cs_32 farInp_41 farExp_42
154 else
155 let _ = "checkToken.else"
156 in let (#
157 farInp_43,
158 farExp_44
159 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 init_1 of
160 GHC.Types.LT ->
161 (#
162 init_1,
163 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
164 #)
165 GHC.Types.EQ ->
166 (#
167 init_1,
168 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
169 #)
170 GHC.Types.GT ->
171 (#
172 init_1,
173 GHC.Types . []
174 #)
175 in readFail_30 init_1 farInp_43 farExp_44
176 else
177 let _ = "checkHorizon.else"
178 in let (#
179 farInp_45,
180 farExp_46
181 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init_1 init_1 of
182 GHC.Types.LT ->
183 (#
184 init_1,
185 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 3]
186 #)
187 GHC.Types.EQ ->
188 (#
189 init_1,
190 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 3]
191 #)
192 GHC.Types.GT ->
193 (#
194 init_1,
195 GHC.Types . []
196 #)
197 in readFail_30 init_1 farInp_45 farExp_46