This project explores different methods and libraries for parsing CFGs in Haskell.
This example includes lexing with megaparsec and parsing with Earley.
Sources at ./src/JSON.
Running the example:
cabal run json -- --file examples/random.json
cabal run json -- --file examples/random.json --output random.json
Running the property-based tests:
cabal run tasty
Running the doctests:
# Sometimes you need to add `tests: True` to `cabal.project.local`
cabal run doctest