Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Convert Augmented BNF (ABNF) to Regexp::Grammars

by Anonymous Monk
on Mar 02, 2012 at 16:11 UTC ( #957506=CUFP: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl --
    use strict; use warnings;
    use File::Slurp;
    ...
        $ret ;
    }
    __END__
    
  2. or download this
    $ cat core.abnf
    BIT            =  "0" / "1"
    CR             =  %d13
    ...
    CR             =  %b1101
    CRLF           =  CR LF
    LF             =  %x0A
    
  3. or download this
    $ perl abnf.to.grammars.pl core.abnf
    <rule: BIT>  0 | 1
    <rule: CR>  \15
    ...
    <rule: CR>  \15
    <rule: CRLF>  (?: <CR><LF> )
    <rule: LF>  \x0A
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2015-07-03 08:21 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 (49 votes), past polls