Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by ikegami (Pope)
on Mar 14, 2008 at 22:18 UTC ( #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
Node Status?
node history
Node Type: note [id://674305]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2015-07-29 22:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls