Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 contemplating the Monastery: (7)
As of 2014-12-28 10:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (180 votes), past polls