| CPAN Ratings Regexp-Grammars reviews | |
| Home | Search | About | Bitcard Account | Login |
RSS | Module Info | Add a review of Regexp-Grammars
A wonderful module!
thanks a lot !
Zahatski P. Aliaksandr - 2011-11-09T04:01:10
Without the background Perl6/regex knowledge, this module is difficult to understand from the documentation alone.
However I do remember it taking me a while to get to grip with PRD as well, so this isn't necessarily a universally valid criticism.
I was drawn to R::G by its promise of power and efficiency. So far it hasn't won me over, even though, once I started converting my PRD grammar, I found it easy enough.
Currently I'm finding it more resource hungry than PRD, and liable to run out of memory and crash on large inputs. I hope these problems will go away once I learn how to tweak the default behaviours. So, only 3's for now.
Update.
Altering part of my grammar saw large improvements, for reasons I can't quite fathom. One general point is that you should avoid adding unnecessary cloistering brackets to your regexp's as this kills performance. I'm still seeing out of memory problems on larger (1+ Mb) input files, with both cygwin and strawberry perls, where PRD works perfectly well (if somewhat slowly).
MB - 2011-07-01T04:06:44
Excellent module.
Provides everything that is missing in Regexp engine.
I've used Parse::RecDescent and Parse::Eyapp before,
but Regexp::Grammars is the new ultimate grammar king in Perl 5!
What I love in this module:
- syntax is similar to Perl 6
- hash match prevents grammar changes on new keys
- "require:" makes numeric range check easy
- context string available for fast debug
- "debug:" pragmas for advanced debugging
- easy aliasing of matched tokens
- balanced delimiters
- easy noncapture (amnesiac) syntax
- passing params to tokens
and many many more
Also there is "demo" section in package with nice examples that helped me may times to understand how to use features from this module.
Pawel Pabian - 2011-06-22T04:07:21
Parse::RecDescent is dead. Long live Regexp::Grammars!
As Damian himself has said/presented, RG is the successor for the popular PRD.
The docs of RG is not as complete (yet) as PRD's.
The PRD grammar syntax is also nicer/cleaner (due to RG having some restrictions because you are writing your grammar inside a regex).
RG doesn't (yet) have some of the features of PRD, like <leftop> and <rightop>. But it does have most of the features, and add a few of its own.
RG performs significantly faster than PRD.
In general, whenever you consider PRD to be a good candidate of tool to solve your problem, consider using RG.
But you need Perl 5.10+ to use RG, as it depends on regex features not found in older Perl.
David Garamond - 2010-04-14T12:27:09
|
Perl.org sites
: bugs
| dev
| history
| jobs
| learn
| lists
| use
Site Information and Contacts |
|