Copyright | Bryan O'Sullivan 2007-2014 |
---|---|
License | BSD3 |
Maintainer | bos@serpentine.com |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell98 |
A tiny, highly specialized combinator parser for ByteString
strings.
While the main attoparsec module generally performs well, this module is particularly fast for simple non-recursive loops that should not normally result in failed parses.
Warning: on more complex inputs involving recursion or failure, parsers based on this module may be as much as ten times slower than regular attoparsec! You should only use this module when you have benchmarks that prove that its use speeds your code up.
Documentation
A simple parser.
This monad is strict in its state, and the monadic bind operator
(>>=
) evaluates each result to weak head normal form before
passing it along.
string :: ByteString -> Parser () Source
Match a string exactly.
take :: Int -> Parser ByteString Source
Consume n
bytes of input.