Pry is a new pragmatic parser combinators library.
(also available on Dub)
It's still in the early stages but I think it might be a good time to
gauge some interest.
Two key areas of focus are (compared to say Pegged):
- performance, on par with hand-written code or die
- versatility, generating some goofy parse tree is not a goal, the goal
is extraction of data the way the user specifies
For now it contains a modest example of a calculator app and a benchmark
inspired by it. The interesting tidbit is that this version already
includes an optimization that typically prevents recursive descent
parser from falling into exponential behavior.
- actually add grammar layer on top of combinators, it is fancy but useful
- more built-in parsers to play with, including some stuff inspired by
- some goodies for usability, e.g. shortcuts to avoid constructing
Stream out of string etc.