attoparsec-enumerator: Pass input from an enumerator to an Attoparsec parser.
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
Downloads
- attoparsec-enumerator-0.2.0.5.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 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.8 && <0.11), base (>=4.0 && <5.0), bytestring (>=0.9 && <0.11), enumerator (>=0.4 && <0.5) [details] |
| License | MIT |
| Author | John Millikin <jmillikin@gmail.com> |
| Maintainer | John Millikin <jmillikin@gmail.com> |
| Uploaded | by JohnMillikin at 2011-11-29T04:38:22Z |
| Revised | Revision 1 made by phadej at 2015-11-12T05:27:44Z |
| Category | Text, Parsing, Enumerator |
| Home page | https://john-millikin.com/software/attoparsec-enumerator/ |
| Bug tracker | mailto:jmillikin@gmail.com |
| Source repo | head: bzr branch https://john-millikin.com/branches/attoparsec-enumerator/0.2/ this: bzr branch https://john-millikin.com/branches/attoparsec-enumerator/0.2/ -r attoparsec-enumerator_0.2.0.5 |
| Distributions | |
| Reverse Dependencies | 23 direct, 3888 indirect [details] |
| Downloads | 44638 total (62 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs uploaded by user Build status unknown [no reports yet] |