Can parser combinators be made efficient?

I’ve come up with a Haskell solution that is 30× faster than the Haskell solution you posted (with my concocted test expression). Major changes: Change Parsec/String to Attoparsec/ByteString In the fact function, change read & many1 digit to decimal Made the chainl1 recursion strict (remove $! for the lazier version). I tried to keep everything … Read more

attoparsec or parsec in haskell

Parsec Parsec is good for “user-facing” parsers: things where you have a bounded amount of input but error messages matter. It’s not terribly fast, but if you have small inputs this shouldn’t matter. For example, I would choose Parsec for virtually any programming language tools since–in absolute terms–even the largest source files are not that … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)