Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Reversible parsing (with Parse::RecDescent?)

by goibhniu (Hermit)
on Mar 14, 2008 at 19:55 UTC ( #674283=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    
    
    ...
                       |            |
                       /------------\
    
  2. or download this
    #/usr/bin/perl -Wl
    
    ...
            print Dumper($reresult);
        }else{ print "  badstring\n"}
    }
    
  3. or download this
    startrule: commandline{$item{commandline}}
    commandline: command options {[$item {command},$item{options}]}
    ...
    option: optionflag optionvalue { [$item{optionflag}, $item{optionvalue
    +}?$item{optionvalue}:1] }
    optionflag: /(-\w+)/ { $1 }
    optionvalue: /(\w*)/ { $1 }
    
  4. or download this
    hap -b
    hap -b sknxharvest01
    ...
    hap -prompt
    hap -b sknxharvest01 -prompt
    hap -prompt -b sknxharvest01
    
  5. or download this
    C:\chas_sandbox\grammars>grammarharness.pl packagegrammar.txt packagec
    +ommands.tx
    t
    ...
    
    
    C:\chas_sandbox\grammars>
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2014-08-29 17:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (283 votes), past polls