j-mie6 / gigaparsec

Refreshed parsec-style library for compatibility with Scala parsley
https://j-mie6.github.io/gigaparsec/
BSD 3-Clause "New" or "Revised" License
16 stars 4 forks source link
beginner-friendly parser-combinators

Gigaparsec GitHub Workflow Status Badge-Haddock Hackage Version GitHub license

gigaparsec is a refreshed implementation of a parser combinator library in the parsec style. It has the following aims:

  1. Be approachable for beginners -- both those new to parser combinators and new to Haskell itself. Good documentation and resources are a key priority.
  2. Be complete, with a well-rounded API including support for highly-configurable lexing combinators, and generic expression parsing functionality.
  3. Be modern, with first-class support for the patterns outlined in Design Patterns for Parser Combinators (Functional Pearl). It also strives for API compatibility with Scala parsley, to allow for easy porting of both parsers, knowledge, and learning materials.
  4. Be efficient -- while it may not be quite as fast as megaparsec, we hope that it will still remain reasonably efficient, as least more than parsec, whilst still providing additional benefits.

To achieve these aims, some departures have been made from many of the classic parsec-style implementations:

Current HEAD documentation can be found here: for stable documentation please consult Hackage directly.

Library Evolution Semantic Versioning: pvp

gigaparsec adheres strictly to Haskell PVP, with the following early-semveresque caveat:

Development

gigaparsec is built with cabal. Use cabal build to build, and cabal test for testing.