Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Reversible parsing (with Parse::RecDescent?)

by ikegami (Patriarch)
on Mar 14, 2008 at 22:18 UTC ( [id://674305]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # build_parser.pl
    
    ...
    
    Parse::RecDescent->Precompile($grammar, 'Parser')
       or die("Bad Grammar\n");
    
  2. or download this
    # Deparse.pm
    
    ...
    sub IDENT { return $_[0] };
    
    1;
    
  3. or download this
    # test.pl
    
    ...
    hap -prompt
    hap -b sknxharvest01 -prompt
    hap -prompt -b sknxharvest01
    
  4. or download this
    >perl build_parser.pl
    
    ...
    Unparsed: hap -prompt -b sknxharvest01
    Parsed:   ["hap",[["-prompt",1],["-b","sknxharvest01"]]]
    Deparsed: hap -prompt 1 -b sknxharvest01
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-04-24 11:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found