toy URI parser using megaparsec, an industrial strength monadic parser combinator library
  • Haskell 64.7%
  • Nix 34.2%
  • Just 1.1%
Find a file
2026-01-15 16:10:05 -05:00
app feat: finish parser 2026-01-15 16:07:04 -05:00
.envrc initial commit 2026-01-14 18:27:04 -05:00
.gitignore initial commit 2026-01-14 18:27:04 -05:00
flake.lock initial commit 2026-01-14 18:27:04 -05:00
flake.nix feat: some progress 2026-01-15 03:28:37 -05:00
justfile feat: some progress 2026-01-15 03:28:37 -05:00
LICENSE initial commit 2026-01-14 18:27:04 -05:00
puri.cabal feat: some progress 2026-01-15 03:28:37 -05:00
README.md update readme 2026-01-15 16:10:05 -05:00

pURI

a toy URI parser written using megaparsec, using this tutorial.

The goal is to parse URIs of the form scheme:[//[user:password@]host[:port]][/]path[?query][#fragment].

theory

A monadic parser combinator is a theoretical framework for writing parsers, which operate on input streams of tokens and parse them for certain semantic meaning. In their simplest incarnation, parser combinators are a composable replacement for regular expressions that are far easier to reason about. At the extreme end, they can be used to implement full parsers for non-Regular grammars like programming languages and lambda calculi.