[Haskell-cafe] Impact of "try" on Parsec performance

Stephen Tetley stephen.tetley at gmail.com
Sat Mar 3 08:58:15 CET 2012


I'd suggest `try` can make parsers had to debug and fragile when refactoring.

`try` is very useful for char parsers, where you don't really want to
be sharing a prefix amongst different parsers. For regular parsers you
have equivalents of the EBNF operators plus the `sepBy` etc. parsers
so the "obsessive" left recursion removal you see in text books isn't
so burdensome - you have combinators to help you do it rather than
having to rely on introducing more productions.



More information about the Haskell-Cafe mailing list