3dGrabber
3dGrabber

Reputation: 5074

Use FParsec on already tokenized UInt16 stream

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 charstreams.

At the moment I convert the UInt16s to chars which seems silly.

Upvotes: 1

Views: 180

Answers (1)

3dGrabber
3dGrabber

Reputation: 5074

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.

Upvotes: 1

Related Questions