The attoparsec-enumerator package

[Tags: library, mit]

This library allows an Attoparsec parser to receive input incrementally from an enumerator. This could be used for parsing large files, or implementing binary network protocols.

 (-# LANGUAGE OverloadedStrings #-)

 import Control.Applicative
 import Data.Attoparsec
 import Data.Attoparsec.Enumerator
 import Data.Enumerator
 import Data.Enumerator.Binary (enumHandle)
 import Data.Enumerator.List
 import System.IO

 parser = string "foo" <|> string "bar"

 main = do
     xy <- run_ (enumHandle 1 stdin $$ do
         x <- iterParser parser
         y <- iterParser parser
         return (x, y))
     print xy

Properties

Versions0.1, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.2, 0.2.0.1, 0.2.0.2, 0.2.0.3, 0.2.0.4, 0.2.0.5, 0.3, 0.3.1, 0.3.2, 0.3.3
Dependenciesattoparsec (>=0.10 && <0.12), base (>=4.0 && <5.0), bytestring (>=0.9), enumerator (==0.4.*), text
LicenseMIT
AuthorJohn Millikin <jmillikin@gmail.com>
MaintainerJohn Millikin <jmillikin@gmail.com>
Stabilityexperimental
CategoryText, Parsing, Enumerator
Home pagehttps://john-millikin.com/software/attoparsec-enumerator/
Bug trackermailto:jmillikin@gmail.com
Source repositoryhead: git clone https://john-millikin.com/code/attoparsec-enumerator/
this: git clone https://john-millikin.com/code/attoparsec-enumerator/(tag attoparsec-enumerator_0.3.2)
Upload dateFri Jan 17 06:03:09 UTC 2014
Uploaded byJohnMillikin
DistributionsDebian:0.3.1, Fedora:0.3.1, FreeBSD:0.3.1, NixOS:0.3.3
Downloads17749 total (1766 in last 30 days)

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees