3 ms·
I've used a few Parsec-based parser combinators and now I'd never go back to a parser generator. It might be a little slower at runtime, but the ability to see
by sitharus 13y ago
I've used a few Parsec-based parser combinators and now I'd never go back to a parser generator.
It might be a little slower at runtime, but the ability to see everything in your chosen language is worth it in my opinion.
- eru 13y agoIt doesn't have to be slower at runtime. Parsec will by default have to be slower, because it allows eg infinite backtracking / lookahead. If you use a parser combinator library that has less power, you can make it faster. E.g. if your library only has to exprose on Applicative interface. I am working on a Parsec-like library for parsing regular languages (as in theoretical computer sience, not as in Perl). As opposed to grep I want to do something with the results instead of just accepting / rejecting, and I also want to expose more operators under which regular languages are closed, like difference or intersection (i.e. parallel match) or matching all elements of a set once but in any order, or chopping off a regular prefix or suffix.