[Haskell-cafe] Parsec and network data
Johan Tibell
johan.tibell at gmail.com
Sat Aug 30 12:49:10 EDT 2008
On Sat, Aug 30, 2008 at 3:51 AM, Thomas Schilling
<nominolo at googlemail.com> wrote:
> I remember Johan Tibell (CC'd) working on an extended variant of
> Parsec that can deal with this chunked processing. The idea is to
> teach Parsec about a partial input and have it return a function to
> process the rest (a continuation) if it encounters the end of a chunk
> (but not the end of a file). Maybe Johan can tell you more about
> this, or point you to his implementation.
I have written a parser for my web server that uses continuations to
resume parsing. It's not really Parsec like anymore though. It only
parses LL(1) grammars as that's all I need to parse HTTP. I haven't
released a first version of my server yet, indeed most of the code is
on this laptop and not in the Git repo [1], but if you would like to
steal some ideas feel free.
1. http://www.johantibell.com/cgi-bin/gitweb.cgi?p=hyena.git;a=blob;f=Hyena/Parser.hs;h=8086b11bfeb3bca15bfd16ec9c6a4b34aadf528e;hb=HEAD
Cheers,
Johan
More information about the Haskell-Cafe
mailing list