I need to parse an already tokenized stream of type UInt16 seq
.
How can I do this with FParsec?
All the top level functions I can find in the reference work on charstream
s.
At the moment I convert the UInt16
s to char
s which seems silly.
Unfortunately it is not possible to use FParsec on anything else than a CharStream
.
I solved the problem by writing a simple parser combinator myself, using this article.
Surprisingly this was only one day's worth of work.
I learned a lot about parser combinators in the process.