Applicative permutation parser for Parsec intended as a replacement for Text.Parsec.Perm.

Latest on Hackage:

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

BSD3 licensed by Samuel Hoffstaetter
Text.Parsec.Permutation is a permutation parser for parsec intended as
a generalized replacement for Text.Parsec.Perm in parsec.

Example usage:

> import Text.Parsec.Permutation
> fooParser :: ParsecT s u m a -> ParsecT s u m [a]
> fooParser = runPermParser $
> (,,) <$> oncePerm (char 'A')
> <*> manyPerm (char 'B')
> <*> optionMaybePerm (char 'C' >> char 'D')

This parser will return ('A', "BBB", Just 'D') when parsing for example
the strings "BCDABB", "CDBBAB", etc.

Depends on 2 packages:
Used by 1 package:
comments powered byDisqus