toy URI parser using megaparsec, an industrial strength monadic parser combinator library
- Haskell 64.7%
- Nix 34.2%
- Just 1.1%
| app | ||
| .envrc | ||
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| justfile | ||
| LICENSE | ||
| puri.cabal | ||
| README.md | ||
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.