]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G10.expected.txt
change ShowLetName into HideableName
[haskell/symantic-parser.git] / test / Golden / Splice / G10.expected.txt
1 \(input :: inp) ->
2 let !(#
3 init,
4 readMore,
5 readNext
6 #) =
7 let _ = "cursorOf"
8 in let next
9 ( t@( Data.Text.Internal.Text
10 arr
11 off
12 unconsumed
13 )
14 ) =
15 let !( Data.Text.Unsafe.Iter
16 c
17 d
18 ) = Data.Text.Unsafe.iter t 0
19 in (#
20 c,
21 Data.Text.Internal.Text arr (off GHC.Num.+ d) (unconsumed GHC.Num.- d)
22 #)
23 more
24 ( Data.Text.Internal.Text
25 _
26 _
27 unconsumed
28 ) = unconsumed GHC.Classes.> 0
29 in (# input, more, next #)
30 finalRet = \_farInp _farExp v _inp -> Symantic.Parser.Machine.Generate.returnST GHC.Base.$ Data.Either.Right v
31 finalRaise ::
32 forall st b.
33 Symantic.Parser.Machine.Generate.Catcher
34 st
35 inp
36 b = \(!exn) _failInp (!farInp) (!farExp) ->
37 Symantic.Parser.Machine.Generate.returnST GHC.Base.$
38 Data.Either.Left
39 Symantic.Parser.Machine.Generate.ParsingError
40 { Symantic.Parser.Machine.Generate.parsingErrorOffset = Symantic.Parser.Machine.Input.offset farInp,
41 Symantic.Parser.Machine.Generate.parsingErrorException = exn,
42 Symantic.Parser.Machine.Generate.parsingErrorUnexpected =
43 if readMore farInp
44 then
45 GHC.Maybe.Just
46 ( let (#
47 c,
48 _
49 #) = readNext farInp
50 in c
51 )
52 else GHC.Maybe.Nothing,
53 Symantic.Parser.Machine.Generate.parsingErrorExpecting = farExp
54 }
55 in GHC.ST.runST
56 ( let inputToken = Data.Proxy.Proxy :: Data.Proxy.Proxy (Symantic.Parser.Machine.Input.InputToken inp)
57 in let
58 in let join = \farInp farExp v (!inp) ->
59 let _ = "resume"
60 in finalRet
61 farInp
62 farExp
63 ( let _ = "resume.genCode"
64 in GHC.Show.show v
65 )
66 inp
67 in let _ = "catch ExceptionFailure"
68 in let catchHandler (!_exn) (!failInp) (!farInp) (!farExp) =
69 let _ = "catch.ko ExceptionFailure"
70 in if ( \( Data.Text.Internal.Text
71 _
72 i
73 _
74 )
75 ( Data.Text.Internal.Text
76 _
77 j
78 _
79 ) -> i GHC.Classes.== j
80 )
81 init
82 failInp
83 then
84 let _ = "choicesBranch.then"
85 in let readFail = finalRaise
86 in if readMore failInp
87 then
88 let !(#
89 c,
90 cs
91 #) = readNext failInp
92 in if (GHC.Classes.==) 'b' c
93 then
94 let _ = "resume"
95 in join
96 farInp
97 farExp
98 ( let _ = "resume.genCode"
99 in 'b'
100 )
101 cs
102 else
103 let _ = "checkToken.else"
104 in let failExp =
105 Data.Set.Internal.Bin
106 1
107 ( Symantic.Parser.Grammar.Combinators.SomeFailure
108 ( case inputToken of
109 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'b'
110 )
111 )
112 Data.Set.Internal.Tip
113 Data.Set.Internal.Tip
114 in let (#
115 farInp,
116 farExp
117 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
118 GHC.Types.LT ->
119 (#
120 failInp,
121 failExp
122 #)
123 GHC.Types.EQ ->
124 (#
125 farInp,
126 failExp GHC.Base.<> farExp
127 #)
128 GHC.Types.GT ->
129 (#
130 farInp,
131 farExp
132 #)
133 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
134 else
135 let _ = "checkHorizon.else"
136 in let failExp =
137 Data.Set.Internal.Bin
138 1
139 ( Symantic.Parser.Grammar.Combinators.SomeFailure
140 ( case inputToken of
141 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
142 )
143 )
144 Data.Set.Internal.Tip
145 Data.Set.Internal.Tip
146 in let (#
147 farInp,
148 farExp
149 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp failInp of
150 GHC.Types.LT ->
151 (#
152 failInp,
153 failExp
154 #)
155 GHC.Types.EQ ->
156 (#
157 farInp,
158 failExp GHC.Base.<> farExp
159 #)
160 GHC.Types.GT ->
161 (#
162 farInp,
163 farExp
164 #)
165 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
166 else
167 let _ = "choicesBranch.else"
168 in finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure failInp farInp farExp
169 in let readFail = catchHandler
170 in if readMore init
171 then
172 let !(# c, cs #) = readNext init
173 in if (GHC.Classes.==) 'a' c
174 then
175 let _ = "resume"
176 in join
177 init
178 Data.Set.Internal.empty
179 ( let _ = "resume.genCode"
180 in 'a'
181 )
182 cs
183 else
184 let _ = "checkToken.else"
185 in let failExp =
186 Data.Set.Internal.Bin
187 1
188 ( Symantic.Parser.Grammar.Combinators.SomeFailure
189 ( case inputToken of
190 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'a'
191 )
192 )
193 Data.Set.Internal.Tip
194 Data.Set.Internal.Tip
195 in let (#
196 farInp,
197 farExp
198 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init init of
199 GHC.Types.LT ->
200 (#
201 init,
202 failExp
203 #)
204 GHC.Types.EQ ->
205 (#
206 init,
207 failExp GHC.Base.<> Data.Set.Internal.empty
208 #)
209 GHC.Types.GT ->
210 (#
211 init,
212 Data.Set.Internal.empty
213 #)
214 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure init farInp farExp
215 else
216 let _ = "checkHorizon.else"
217 in let failExp =
218 Data.Set.Internal.Bin
219 1
220 ( Symantic.Parser.Grammar.Combinators.SomeFailure
221 ( case inputToken of
222 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 1
223 )
224 )
225 Data.Set.Internal.Tip
226 Data.Set.Internal.Tip
227 in let (#
228 farInp,
229 farExp
230 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init init of
231 GHC.Types.LT ->
232 (#
233 init,
234 failExp
235 #)
236 GHC.Types.EQ ->
237 (#
238 init,
239 failExp GHC.Base.<> Data.Set.Internal.empty
240 #)
241 GHC.Types.GT ->
242 (#
243 init,
244 Data.Set.Internal.empty
245 #)
246 in readFail Symantic.Parser.Grammar.Combinators.ExceptionFailure init farInp farExp
247 )