Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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

by tfrayner (Curate)
on Sep 15, 2008 at 13:09 UTC ( [id://711452]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        open( *Parse::RecDescent::ERROR, '>', \(my $parse_error) )
        or croak("Error: unable to redirect SDTERR.");
    ...
    
        my $parser = Parse::RecDescent->new($grammar) or die("Bad grammar!
    +");
    
  2. or download this
    use strict;
    
    ...
    }
    
    print parse('start: /foo/ | <error>', 'fo'), "\n";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-25 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found