Make whitespace explicit
05Whitespace in the written rule does not automatically appear in the strings it describes.
WSP is an alternative of SP or HTAB. CRLF is a two-value sequence, not either newline character alone.
Source for this drawing: RFC 5234 · Read RFC section 3.1 ↗
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
pair = "a" SP "b" explicitly includes one ASCII space. The spaces around = and between rule elements format the grammar itself.
- pair = "a" SP "b" explicitly includes one ASCII space. The spaces around = and between rule elements format the grammar itself.
- A semicolon starts a grammar comment through the end of its rule line; that note is not part of the matched pair.
- Core SP is value32, HTAB is9, WSP means SP or HTAB, and CRLF means CR followed by LF. Bare LF does not match CRLF. These are ASCII-context definitions.
- Section4 describes ABNF itself. Verified errata2968/3076 correct two whitespace ambiguities in that meta-grammar; this guide does not reproduce a complete ABNF parser.
Examples are invented ASCII strings, not a complete application protocol. Matching syntax does not establish application meaning or authorization. Core rules are in RFC5234 Appendix B.1; external encodings are separate (§2.4).
Read the RFC section ↗