Parsers with derivatives paper implementation http://matt.­might.­net/­papers/­might2011derivat­ives.­pdf