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

What advantages do LL parsers have over LR parsers?

GLR is great if you want a parse tree/forest and don’t mind black boxes. It lets you type in whatever CFG you want at the cost of checking for ambiguities at parse time via exhaustive testing, instead of resolving LR/LALR conflicts statically. Some say that’s a good trade-off. Ira Baxter’s DMS tool or Elkhound, which … Read more

What are the disadvantages of the Spirit parser-generator framework from boost.org?

It is a quite cool idea, and I liked it; it was especially useful to really learn how to use C++ templates. But their documentation recommends the usage of spirit for small to medium-size parsers. A parser for a full language would take ages to compile. I will list three reasons. Scannerless parsing. While it’s … Read more

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