iteratee-parsec-0.0.6: Package allowing parsec parser initeratee

Portabilityportable
Stabilitynone
Maintaineruzytkownik2@gmail.com

Text.Parsec.Iteratee

Description

 

Synopsis

Documentation

safeParsecIterateeSource

Arguments

:: (Monad m, Reference r m, Nullable c, ListLike c el) 
=> ParsecT (Cursor r m c el) u (Iteratee c m) a

Parser to run

-> u

A user state

-> SourceName

Source name

-> Iteratee c m (Either ParseError a) 

Runs parser. If it suceed the remaining part of stream stands in stream, however if it fails everything stands in stream.

safeParsecIterateeShort :: (Monad m, Nullable s, ListLike s t) => ParsecT Int u (Iteratee s m) a -> u -> SourceName -> Iteratee s m (Either ParseError a)Source

Create an Iteratee from a ParsecT parser. This is most efficient for relatively smaller parsers (< 1e5 chars), and becomes increasingly inefficient as the parser size increases. If the parse fails, no input is consumed. If the parse succeeds, any data remaining after the parse is available to the iteratee.

parsecIterateeSource

Arguments

:: (Monad m, Reference r m, Nullable c, ListLike c el) 
=> ParsecT (Cursor r m c el) u (Iteratee c m) a

Parser to run

-> u

A user state

-> SourceName

Source name

-> Iteratee c m (Either ParseError a) 

Runs parser. If it suceed the remaining part of stream stands in stream, however if it fails the stream is not in defined state.