Sha256: f1f5143bea56c9e749aebf456d419f49d33e5bd697c674727a459cad7b73bc4e

Contents?: true

Size: 1.02 KB

Versions: 1

Compression:

Stored size: 1.02 KB

Contents

require 'abnf/abnf'
require 'abnf/parser'

class ABNF
  CoreRules = ABNF.parse(<<'End', true) # taken from RFC 2234
        ALPHA          =  %x41-5A / %x61-7A   ; A-Z / a-z
        BIT            =  "0" / "1"
        CHAR           =  %x01-7F ; any 7-bit US-ASCII character, excluding NUL
        CR             =  %x0D ; carriage return
        CRLF           =  CR LF ; Internet standard newline
        CTL            =  %x00-1F / %x7F ; controls
        DIGIT          =  %x30-39 ; 0-9
        DQUOTE         =  %x22 ; " (Double Quote)
        HEXDIG         =  DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
        HTAB           =  %x09 ; horizontal tab
        LF             =  %x0A ; linefeed
        LWSP           =  *(WSP / CRLF WSP) ; linear white space (past newline)
        OCTET          =  %x00-FF ; 8 bits of data
        SP             =  %x20
        VCHAR          =  %x21-7E ; visible (printing) characters
        WSP            =  SP / HTAB ; white space
End
end

if $0 == __FILE__
  require 'pp'
  pp ABNF::CoreRules
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
abnf-0.0.1 lib/abnf/corerules.rb