The attoparsec-enumerator package

[ Tags: deprecated, enumerator, library, mit, parsing, text ] [ Propose Tags ]
Deprecated.

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

Versions 0.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, 0.3.4
Dependencies attoparsec (>=0.10 && <0.12), base (>=4.0 && <5.0), bytestring (>=0.9), enumerator (==0.4.*), text [details]
License MIT
Author John Millikin <jmillikin@gmail.com>
Maintainer John Millikin <jmillikin@gmail.com>
Category Text, Parsing, Enumerator
Home page https://john-millikin.com/software/attoparsec-enumerator/
Bug tracker mailto:jmillikin@gmail.com
Source repository head: 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)
Uploaded Fri Jan 17 06:03:09 UTC 2014 by JohnMillikin
Distributions Debian:0.3.4, Fedora:0.3.4, FreeBSD:0.3.4, NixOS:0.3.4
Downloads 34131 total (603 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Successful builds reported [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees