A simple monadic parser.