2 ms·
Yes, these are great! Text.Megaparsec.Expr blew my mind. It lets you write something that can evaluate expressions like "(3 + 4/(-2)) * 7" -- a nested expressio
by Jeff_Brown 9y ago
Yes, these are great! Text.Megaparsec.Expr blew my mind. It lets you write something that can evaluate expressions like "(3 + 4/(-2)) * 7" -- a nested expression parser, with prefix, postfix and infix operators of varying associativity and precedence -- in 12 lines of code. I made a repo about it [here](https://github.com/JeffreyBenjaminBrown/megaparsec/tree/master/Expr-studies https://github.com/JeffreyBenjaminBrown/megaparsec/tree/mast...).