10 let !( Data.Text.Unsafe.Iter
13 ) = Symantic.Parser.Machine.Input.Text.Buffer.iter buf pos
14 in (# c, pos GHC.Num.+ d #)
15 more buf pos = pos GHC.Classes.< Symantic.Parser.Machine.Input.Text.Buffer.length buf
16 append = Symantic.Parser.Machine.Input.Text.Buffer.pappend
18 Symantic.Parser.Machine.Input.Text.Buffer.buffer input,
24 finalRet = \_farInp _farExp v _inp _buf _end -> Symantic.Parser.Machine.Generate.returnST GHC.Base.$ Symantic.Parser.Machine.Generate.ResultDone v
25 finalRaise :: Symantic.Parser.Machine.Generate.ForallOnException inp =
26 Symantic.Parser.Machine.Generate.ForallOnException GHC.Base.$
27 ( \(!exn) _failInp (!farInp) (!farExp) buf end ->
28 Symantic.Parser.Machine.Generate.returnST GHC.Base.$
29 Symantic.Parser.Machine.Generate.ResultError
30 Symantic.Parser.Machine.Generate.ParsingError
31 { Symantic.Parser.Machine.Generate.parsingErrorOffset = Symantic.Parser.Machine.Input.position farInp,
32 Symantic.Parser.Machine.Generate.parsingErrorException = exn,
33 Symantic.Parser.Machine.Generate.parsingErrorUnexpected =
34 if readMore buf farInp
40 #) = readNext buf farInp
43 else GHC.Maybe.Nothing,
44 Symantic.Parser.Machine.Generate.parsingErrorExpecting =
48 Data.Set.Internal.foldr
52 ) -> case Symantic.Parser.Grammar.Combinators.unSomeFailure f of
53 GHC.Maybe.Just (Symantic.Parser.Grammar.Combinators.FailureHorizon h :: Symantic.Parser.Grammar.Combinators.Failure (Symantic.Parser.Grammar.Combinators.CombSatisfiable (Symantic.Parser.Machine.Input.InputToken inp)))
54 | GHC.Maybe.Just old <- minH ->
55 ( GHC.Maybe.Just (GHC.Classes.min old h),
58 | GHC.Base.otherwise ->
71 in Data.Set.Internal.fromList GHC.Base.$
73 GHC.Maybe.Just h -> Symantic.Parser.Grammar.Combinators.SomeFailure (Symantic.Parser.Grammar.Combinators.FailureHorizon @(Symantic.Parser.Machine.Input.InputToken inp) h) GHC.Types.: res
74 GHC.Maybe.Nothing -> res
78 in let inputToken = Data.Proxy.Proxy :: Data.Proxy.Proxy (Symantic.Parser.Machine.Input.InputToken inp)
79 in let partialCont buf =
80 let readFail = Symantic.Parser.Machine.Generate.unForallOnException finalRaise
81 in let _ = "checkHorizon.newCheck: checkedHorizon=0 minHoriz=3"
82 in if readMore buf ((GHC.Num.+) @GHC.Types.Int 2 initPos)
85 in let _ = "pushValue"
86 in let _ = "catch ExceptionFailure checkedHorizon=3"
89 in \(!_exn) (!failInp) (!farInp) (!farExp) buf end ->
90 let _ = "loadInput checkedHorizon=3"
91 in let _ = "checkHorizon.oldCheck: checkedHorizon=3"
92 in Symantic.Parser.Machine.Generate.unForallOnException finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure initPos farInp farExp buf end
93 in let _ = "pushValue"
94 in let _ = "comment: satisfy ((GHC.Classes.==) 'a')"
95 in let _ = "checkHorizon.oldCheck: checkedHorizon=3"
96 in let _ = "checkToken"
100 #) = readNext buf initPos
101 in if (GHC.Classes.==) 'a' c
103 let _ = "lift2Value checkedHorizon=2"
104 in let _ = "comment: satisfy ((GHC.Classes.==) 'b')"
105 in let _ = "checkHorizon.oldCheck: checkedHorizon=2"
106 in let _ = "checkToken"
111 in if (GHC.Classes.==) 'b' c
113 let _ = "lift2Value checkedHorizon=1"
114 in let _ = "comment: satisfy ((GHC.Classes.==) 'c')"
115 in let _ = "checkHorizon.oldCheck: checkedHorizon=1"
116 in let _ = "checkToken"
121 in if (GHC.Classes.==) 'c' c
123 let _ = "lift2Value checkedHorizon=0"
125 in let _ = "lift2Value checkedHorizon=0"
129 Data.Set.Internal.empty
130 ( let _ = "resume.genCode"
131 in GHC.Show.show ((GHC.Types.:) 'a' ((GHC.Types.:) 'b' ((GHC.Types.:) 'c' GHC.Types . [])))
137 let _ = "checkToken.fail"
139 Data.Set.Internal.Bin
141 ( Symantic.Parser.Grammar.Combinators.SomeFailure
143 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'c'
146 Data.Set.Internal.Tip
147 Data.Set.Internal.Tip
151 #) = case GHC.Classes.compare @GHC.Types.Int initPos cs of
160 failExp GHC.Base.<> Data.Set.Internal.empty
165 Data.Set.Internal.empty
167 in onException Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp buf GHC.Types.False
169 let _ = "checkToken.fail"
171 Data.Set.Internal.Bin
173 ( Symantic.Parser.Grammar.Combinators.SomeFailure
175 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'b'
178 Data.Set.Internal.Tip
179 Data.Set.Internal.Tip
183 #) = case GHC.Classes.compare @GHC.Types.Int initPos cs of
192 failExp GHC.Base.<> Data.Set.Internal.empty
197 Data.Set.Internal.empty
199 in onException Symantic.Parser.Grammar.Combinators.ExceptionFailure cs farInp farExp buf GHC.Types.False
201 let _ = "checkToken.fail"
203 Data.Set.Internal.Bin
205 ( Symantic.Parser.Grammar.Combinators.SomeFailure
207 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureToken 'a'
210 Data.Set.Internal.Tip
211 Data.Set.Internal.Tip
215 #) = case GHC.Classes.compare @GHC.Types.Int initPos initPos of
224 failExp GHC.Base.<> Data.Set.Internal.empty
229 Data.Set.Internal.empty
231 in onException Symantic.Parser.Grammar.Combinators.ExceptionFailure initPos farInp farExp buf GHC.Types.False
233 let _ = "checkHorizon.newCheck.fail"
236 Data.Set.Internal.Bin
238 ( Symantic.Parser.Grammar.Combinators.SomeFailure
240 (Data.Proxy.Proxy :: Data.Proxy.Proxy tok') -> Symantic.Parser.Grammar.Combinators.FailureHorizon @tok' 3
243 Data.Set.Internal.Tip
244 Data.Set.Internal.Tip
248 #) = case GHC.Classes.compare @GHC.Types.Int initPos initPos of
257 failExp GHC.Base.<> Data.Set.Internal.empty
262 Data.Set.Internal.empty
264 in Symantic.Parser.Machine.Generate.unForallOnException finalRaise Symantic.Parser.Grammar.Combinators.ExceptionFailure initPos farInp farExp buf GHC.Types.True
265 in if GHC.Types.False
268 Symantic.Parser.Machine.Generate.returnST GHC.Base.$
269 ( Symantic.Parser.Machine.Generate.ResultPartial GHC.Base.$
271 if Symantic.Parser.Machine.Input.nullInput newInput
273 else partialCont (append buf newInput)
276 in partialCont initBuffer