Parsing Expressions by Recursive Descent in Haskell

from blog thasso.xyz, | ↗ original
Parsing numerical expressions by recursive descent is a joy in Haskell! It is incredibly concise and elegant, yet very simple. What we want to parse are binary expressions like 7 + 42 * 9, 2 * 3 / 4 * 5, or 8 * (10 - 6). As always, when parsing such expressions, we have to be aware of the associativity of the operators involved and of their...