Regexp::Grammars has made my life a lot easier. I basically registered just to say thanks. My most recent use of this is in TPath, which RG made almost trivial to implement. Well, maybe not trivial, but at least an order of magnitude easier.
I gave 5 stars since I really liked the idea under this module. Additionally, "Damian Conway" name is enough for me to check this module but, honestly speaking, it takes time to learn. I think learning Perl 5.10 regex extensions priorly makes use of this module clearer for you. It also shows you how this module facilitates the complicated syntax of 5.10 regexes.
Documentation may include more complete grammar examples to immediately check them during learning.
It also prepares you for Perl6 who wants to learn Perl6 style grammar definition which is another advantage for me, because, at last, hopefully, somehow, ..., :) Perl6 will replace Perl5.
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.
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).
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.