Monadic parser combinators
open sourceBSD-2-Clausefree
parsec is the Haskell library of monadic parser combinators, written from scratch as an industrial-strength parser library: simple, safe, with extensive combinators, good error messages and good speed. It is defined as a monad transformer that can be stacked on any monad, and it is parametric in the input stream type. Text.Parsec is the main entry point, with defaults for parsing characters; the legacy parsec-2 API in Text.ParserCombinators.Parsec may be removed in future. It is BSD-2-Clause licensed.
Problems it solves
- write a parser for my own small language in Haskell
- parse a text format in Haskell without a parser generator
- get readable error messages when parsing input fails in Haskell
Features
- monadic parser combinators
- monad transformer that stacks on any monad
- parametric in the input stream type
- good error messages
- legacy parsec-2 API kept for compatibility
Alternatives
The same job
These do what parsec does.
- Sunshine Self-hosted game stream host for Moonlight
- peg Packrat parser generator for Go from Parsing Expression Grammars
- Megaparsec Industrial-strength monadic parser combinators for Haskell
- parser-combinators Common Haskell parser combinators with no dependencies beyond base
