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

[ bsd3, library, parsing ] [ Propose Tags ] [ Report a vulnerability ]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.1.0, 0.1.2.0
Dependencies base (>=4 && <5), parsec (>=3) [details]
License BSD-3-Clause
Copyright Bitbase, LLC
Author Samuel Hoffstaetter
Maintainer samuel@hoffstaetter.com
Category Parsing
Source repo head: git clone https://github.com/bitbasenyc/parsec-permutation.git
Uploaded by SamuelHoffstaetter at 2013-03-08T00:21:59Z
Distributions NixOS:0.1.2.0
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 3701 total (12 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]

Readme for parsec-permutation-0.1.2.0

[back to package description]
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.