C++ port of the monadic functional parser described in "Programming in Haskell" by Graham Hutton