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 \%item;} )); $p2->Format('a-'); $p2->Format('-a');