Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

How to grab Parse::RecDescent error output in a variable?

by w-ber (Hermit)
on Sep 11, 2008 at 15:26 UTC ( #710640=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $ParseError;
    
    ...
    
    my $p = Parse::RecDescent->new($grammar) or die "Invalid grammar";
    my $output = $p->startrule($str) or die $ParseError;
    
  2. or download this
        open(STDERR, '>', '/tmp/error') or die $!;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://710640]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (13)
As of 2014-10-02 16:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (65 votes), past polls