]> Git — Sourcephile - haskell/symantic-parser.git/blob - test/Golden/Splice/G2.expected.txt
test: dump splices using TH.runQ instead of calling ghc
[haskell/symantic-parser.git] / test / Golden / Splice / G2.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 in let finalRet = \_farInp _farExp v _inp -> Data.Either.Right v
31 in let finalRaise ::
32 forall b.
33 Symantic.Parser.Machine.Generate.Catcher
34 inp
35 b = \_failInp (!farInp) (!farExp) ->
36 Data.Either.Left
37 Symantic.Parser.Machine.Generate.ParsingErrorStandard
38 { Symantic.Parser.Machine.Generate.parsingErrorOffset = Symantic.Parser.Machine.Input.offset farInp,
39 Symantic.Parser.Machine.Generate.parsingErrorUnexpected =
40 if readMore farInp
41 then
42 GHC.Maybe.Just
43 ( let (#
44 c,
45 _
46 #) = readNext farInp
47 in c
48 )
49 else GHC.Maybe.Nothing,
50 Symantic.Parser.Machine.Generate.parsingErrorExpecting = Data.Set.Internal.fromList farExp
51 }
52 in let
53 in let _ = "catchException lbl=fail"
54 in let catchHandler (!failInp) (!farInp) (!farExp) =
55 let _ = "catchException.ko lbl=fail"
56 in let (#
57 farInp,
58 farExp
59 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) farInp init of
60 GHC.Types.LT ->
61 (#
62 init,
63 []
64 #)
65 GHC.Types.EQ ->
66 (#
67 farInp,
68 farExp GHC.Base.<> []
69 #)
70 GHC.Types.GT ->
71 (#
72 farInp,
73 farExp
74 #)
75 in finalRaise init farInp farExp
76 in let readFail = catchHandler
77 in if readMore (Symantic.Parser.Machine.Input.shiftRightText 2 init)
78 then
79 let !(# c, cs #) = readNext init
80 in if ('a' GHC.Classes.==) c
81 then
82 let readFail = readFail
83 in let !(# c, cs #) = readNext cs
84 in if ('b' GHC.Classes.==) c
85 then
86 let readFail = readFail
87 in let !(#
88 c,
89 cs
90 #) = readNext cs
91 in if ('c' GHC.Classes.==) c
92 then
93 let _ = "resume"
94 in finalRet init GHC.Types
95 . []
96 ( let _ = "resume.genCode"
97 in GHC.Show.show ('a' GHC.Types.: ('b' GHC.Types.: ('c' GHC.Types.: GHC.Types . [])))
98 )
99 cs
100 else
101 let _ = "checkToken.else"
102 in let (#
103 farInp,
104 farExp
105 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init cs of
106 GHC.Types.LT ->
107 (#
108 cs,
109 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'c']
110 #)
111 GHC.Types.EQ ->
112 (#
113 init,
114 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'c']
115 #)
116 GHC.Types.GT ->
117 (#
118 init,
119 GHC.Types . []
120 #)
121 in readFail cs farInp farExp
122 else
123 let _ = "checkToken.else"
124 in let (#
125 farInp,
126 farExp
127 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init cs of
128 GHC.Types.LT ->
129 (#
130 cs,
131 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'b']
132 #)
133 GHC.Types.EQ ->
134 (#
135 init,
136 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'b']
137 #)
138 GHC.Types.GT ->
139 (#
140 init,
141 GHC.Types . []
142 #)
143 in readFail cs farInp farExp
144 else
145 let _ = "checkToken.else"
146 in let (#
147 farInp,
148 farExp
149 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init init of
150 GHC.Types.LT ->
151 (#
152 init,
153 [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
154 #)
155 GHC.Types.EQ ->
156 (#
157 init,
158 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemToken 'a']
159 #)
160 GHC.Types.GT ->
161 (#
162 init,
163 GHC.Types . []
164 #)
165 in readFail init farInp farExp
166 else
167 let _ = "checkHorizon.else"
168 in let (#
169 farInp,
170 farExp
171 #) = case (GHC.Classes.compare `Data.Function.on` Symantic.Parser.Machine.Input.offset) init init of
172 GHC.Types.LT ->
173 (#
174 init,
175 [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 3]
176 #)
177 GHC.Types.EQ ->
178 (#
179 init,
180 GHC.Types . [] GHC.Base.<> [Symantic.Parser.Grammar.Combinators.ErrorItemHorizon 3]
181 #)
182 GHC.Types.GT ->
183 (#
184 init,
185 GHC.Types . []
186 #)
187 in readFail init farInp farExp