parrotcode: Sample Perl6 grammar for regular expressions | |
Contents | Language Implementations | Perl6 |
Perl6RE - Sample Perl6 grammar for regular expressions
use Perl6RE;
use Data::Dumper;
use Parse::RecDescent;
$p = Parse::RecDescent->new($Perl6RE::grammar);
print Dumper($p->rx('rx/ ^ <$digit>+ $$ /'));
Simply loads the Perl6 RE grammar suitable for Parse::RecDescent. Contains no actual parsing code beyond returning a nested array of arrays consisting of a pseudo-rational grammar for Perl6 REs
None by default.
Jeff Goff, <jgoff@perl.org>
|