Appendix B. Core ABNF of ABNF
B.1. Core Rules
Certain basic rules are in uppercase, such as SP, HTAB, CRLF, DIGIT, ALPHA, etc. These core rules are defined in this appendix.
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)
; Use of this linear-white-space rule
; permits lines containing only white
; space that are no longer legal in
; mail headers and have caused
; interoperability problems in other
; contexts.
; Do not use when defining mail
; headers and use with caution in
; other contexts.
OCTET = %x00-FF
; 8 bits of data
SP = %x20
VCHAR = %x21-7E
; visible (printing) characters
WSP = SP / HTAB
; white space
B.2. Common Encoding
Externally, data are represented as "network virtual ASCII" (namely, 7-bit US-ASCII in an 8-bit field), with the high (8th) bit set to zero. A string of values is in "network byte order", in which the higher-valued bytes are represented on the left-hand side and are sent over the network first.
Character Encoding
The core rules use US-ASCII encoding. Each character is represented by its corresponding ASCII value:
- Letters (A-Z, a-z): %x41-5A, %x61-7A
- Digits (0-9): %x30-39
- Common symbols: SP (%x20), HTAB (%x09), etc.
Usage Guidelines
These core rules are designed to be used across multiple Internet specifications. They provide a common vocabulary for basic syntactic elements, ensuring consistency across different protocols and formats.
Important Notes:
- LWSP (linear white space) should be used with caution, as it permits lines containing only white space
- The core rules assume a 7-bit US-ASCII environment
- For specifications using different character encodings, appropriate adjustments should be made