[Haskell-cafe] Brainstorming on how to parse IMAP
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Mon Aug 4 11:47:20 EDT 2008
On 2008 Aug 4, at 6:10, Malcolm Wallace wrote:
>> A283 SEARCH {4} {21}
>> TEXTstring not in mailbox
>
> Assuming the first line can be read strictly, and the remainder should
> be lazy, the parser might look something like this:
FWIW, the actual data looks more like
A283 SEARCH {4}
TEXT
{21}
string not in mailbox
(the literal declaration is followed immediately by CRLF, the literal,
CRLF, then the command line context resumes)
also, literals require multiple exchanges with the server unless the
LITERAL+ extension is present and being used ({4+} instead of {4}).
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
More information about the Haskell-Cafe
mailing list