Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Convert Augmented BNF (ABNF) to Regexp::Grammars

by Anonymous Monk
on Mar 02, 2012 at 16:11 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2025-04-30 19:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.