input-parsers

Extension of the parsers library with more capability and efficiency

Stackage Nightly 2020-10-20:0.1.0.1
Latest on Hackage:0.1.0.1

See all snapshots input-parsers appears in

BSD-3-Clause licensed by Mario Blažević

Module documentation for 0.1.0.1

This version can be pinned in stack with:input-parsers-0.1.0.1@sha256:d465ff63abce1b5c880cff362c4b383567d09a02f717b06232e646889a544c7d,1852

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.

Changes

Revision history for input-parsers

0.1.0.1 – 2020-07-19

  • Incremented the upper bound of base dependency.

0.1.0.0 – 2020-07-18

  • First version. Released on an unsuspecting world.