Lesson plan

Parsec (parser)

Parsec is a library for writing parsers written in the programming language Haskell. It is based on higher-order parser combinators, so a complicated parser can be made out of many smaller ones. It has been reimplemented in many other languages, including Erlang, Elixir, OCaml, Racket, F#, and the imperative programming languages C#, and Java. Because a parser combinator-based program is generally slower than a parser generator-based program, Parsec is normally used for small domain-specific languages, while Happy is used for compilers such as the Glasgow Haskell Compiler (GHC). Other Haskell parser combinator libraries that have been derived from Parsec include Megaparsec and Attoparsec. Parsec is free software released under the BSD-3-Clause license.

Back to article

Article summary

Parsec is a library for writing parsers written in the programming language Haskell. It is based on higher-order parser combinators, so a complicated parser can be made out of many smaller ones. It has been reimplemented in many other languages, including Erlang, Elixir, OCaml, Racket, F#, and the imperative programming languages C#, and Java. Because a parser combinator-based program is generally slower than a parser generator-based program, Parsec is normally used for small domain-specific languages, while Happy is used for compilers such as the Glasgow Haskell Compiler (GHC). Other Haskell parser combinator libraries that have been derived from Parsec include Megaparsec and Attoparsec. Parsec is free software released under the BSD-3-Clause license.

Key claims

No claims recorded.

Discussion questions

  1. Summarise the article in your own words. Which single claim would you verify first, and why?
  2. Which claim in this article is most likely to be revised as the sources update? How would you check its current status?
  3. If two sources disagreed about one of these facts, what would you need in order to trust one over the other?

Bibliography

No sources recorded.

Key claims and bibliography are generated from the same tracked claims and sources as the article page.