input-parsers: Extension of the parsers library with more capability and efficiency

[ bsd3, library, parsing ] [ Propose Tags ]

Extended version of the parsers library, with the additional classes providing more capable and efficient methods.


[Skip to Readme]
Versions [RSS] [faq] 0.1, 0.1.0.1, 0.2, 0.2.1, 0.2.2, 0.2.3
Change log CHANGELOG.md
Dependencies attoparsec (>=0.12.1.4 && <0.14), base (>=4.9 && <5), binary (>=0.7.2 && <1), bytestring (>=0.10 && <0.12), monoid-subclasses (>=1.0 && <1.2), parsec (==3.1.*), parsers (==0.12.*), text (==1.2.*), transformers (>=0.2 && <0.6) [details]
License BSD-3-Clause
Copyright (c) 2020 Mario Blažević
Author Mario Blažević
Maintainer blamario@protonmail.com
Category Parsing
Bug tracker https://github.com/blamario/input-parsers/issues
Uploaded by MarioBlazevic at 2021-07-17T19:24:04Z
Distributions Arch:0.2.2, LTSHaskell:0.2.3, NixOS:0.2.3, Stackage:0.2.3
Downloads 954 total (35 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2021-07-17 [all 1 reports]

Modules

[Index] [Quick Jump]

Manual Flags

NameDescriptionDefault
Automatic Flags
NameDescriptionDefault
binary

You can disable the use of the binary package using `-f-binary`.

Enabled
parsec

You can disable the use of the parsec package using `-f-parsec`.

Enabled
attoparsec

You can disable the use of the attoparsec package using `-f-attoparsec`.

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Candidates


Readme for input-parsers-0.2.3

[back to package description]

input-parsers

An extension of the parsers library

The parsers library provides a number of subclasses of the Alternative type class, as well as lots of combinators useful for writing actual parsers.

What those classes like Parsing and CharParsing lack is the ability to express certain efficient parser primitives like Attoparsec's takeWhile. To rectify for this failing and enable more efficient parsers to be expressed, the present package input-parsers adds type classes InputParsing and InputCharParsing. The common characteristic of almost all their methods is that their parse result has the same type as the parser input, and is a prefix of the input.

The present package also exports the class DeterministicParsing, which provides a number of parser methods that are guaranteed to succeed with a single (typically longest possible) result. This is most useful for writing the lexical layer of a parser, but it can help avoid ambiguities and inefficiencies in general.

Finally, the package provides the class Position to abstract over the position the parser reached in the input stream.