12. Shared definitions for ABNF grammars

This section lists shared ABNF definitions accross different grammars defined along this document.

12.1. ASCII

1
2
3
4
5
6
7
8
UPPERCASE-ALPHA = %x41-5A ; A-Z
LOWERCASE-ALPHA = %x61-7A ; a-z
ALPHA           = UPPERCASE-ALPHA / LOWERCASE-ALPHA
ASCII-CHAR      =  %x01-7F
                  ; any 7-bit US-ASCII character,
                  ; excluding NUL
DIGIT           =  %x30-39
                  ; 0..9

12.2. UTF-8

1
2
3
4
5
6
7
8
9
UTF8-octets = *UTF8-char
UTF8-char   = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4
UTF8-1      = %x00-7F
UTF8-2      = %xC2-DF UTF8-tail
UTF8-3      = %xE0 %xA0-BF UTF8-tail / %xE1-EC UTF8-tail /
              %xED %x80-9F UTF8-tail / %xEE-EF UTF8-tail
UTF8-4      = %xF0 %x90-BF 2UTF8-tail / %xF1-F3 3UTF8-tail /
              %xF4 %x80-8F 2UTF8-tail
UTF8-tail   = %x80-BF

12.3. Special characters

1
2
3
4
5
6
7
8
DQUOTE         = %x22
HTAB           = %x09 ; horizontal tab
SP             = " "
WSP            = SP / HTAB
COLON          = ":"
HYPHEN         = "-"
UNDERSCORE     = "_"
WSP-SEQUENCE   = 1*(WSP)