Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Parse::RecDescent grammar definition

by citromatik (Curate)
on Mar 21, 2011 at 12:56 UTC ( [id://894500]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://894500]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2025-07-18 01:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.