/GMP

Grasshopper's Monadic Parser

Primary LanguageHaskellOtherNOASSERTION

Grasshopper’s Monadic Parser

A Parser for Things is a function from Strings to Lists of Pairs of Things and Strings!

The quote can be found on: seuss! and also you can observe the image here:

./SeussFinal2.jpeg

Monadic Parsing in Haskell

The majority of tutorials, blog posts, and general information around the web related to Haskell’s Parser Monads always goes back to the paper: Monadic Parsing in Haskell (by Graham Hutton and Erik Meijer). Like mentioned on the abstract, it’s a tutorial on how to define recursive descent parsers in Haskell, making use of the structuring capabilities of the language (coff coff Monads). This paper has literally my age (it was published in 1998), and one could confirm that it has indeed aged quite gracefully. Although the code associated with the paper still probably runs with some help, it is a bit outdated in regards to modern Haskell. If curious about what can be done about this topic using modern Haskell I can advise on some tutorials:

Warning (Warning)

This library is a small project of mine with the intention of learning and using to implement my interpreters/compilers/etc… It will probably be always a bit unstable and suffer weird changes. If you want an actual industry standard compiler of this kind you should look for: megaparsec, parsec or the microscopic version: yoctoparsec!