http://www.perlmonks.org?node_id=894500


in reply to Re: Parse::RecDescent grammar definition
in thread Parse::RecDescent grammar definition

I don't have any problem running the example I posted in Perl 5.10:

#!/usr/bin/perl use strict; use warnings; use Parse::RecDescent; my $p2 = Parse::RecDescent->new(q( hyphen : "-" option : "a" | "b" | "c" Format : Entry(s) Pre : hyphen option Post : option hyphen Entry : Pre | Post { use Data::Dumper; print Dumper \%ite +m;} )); $p2->Format('a-'); $p2->Format('-a');

output:

$VAR1 = { 'Post' => '-', '__RULE__' => 'Entry' };

citromatik