Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 meditating upon the Monastery: (3)
As of 2024-03-29 01:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found