Pry v0.3.1 is out!
Dmitry Olshansky via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Sat Jan 14 17:26:07 PST 2017
Pry is a new pragmatic parser combinators library.
https://github.com/DmitryOlshansky/pry
(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.
Future directions:
- 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
std.regex
- some goodies for usability, e.g. shortcuts to avoid constructing
Stream out of string etc.
---
Dmitry Olshansky
More information about the Digitalmars-d-announce
mailing list