RFC 822: Notational Conventions
The notation used in RFC 822 is based on the Backus-Naur Form (BNF) convention but was recoded by Ken L. Harrenstien into an "augmented BNF that makes the representation smaller and easier to understand."
This section primarily describes how rules (which describe the syntax of the message format) are used in the rest of the document. It includes the following notes:
- Quotation marks enclose literal text, which may be upper and/or lowercase.
- Certain basic rules are in uppercase, such as SPACE, TAB, CRLF, DIGIT, ALPHA, and so on.
- Elements separated by a slash (/) are alternatives.
- Elements enclosed in parentheses are treated as a single element.
- Square brackets enclose optional elements.
- The asterisk character (*) preceding an element indicates repetition of that element an unspecified number of times.
- Repetition a specified number of times is indicated by use of a digit: <n>(element) is equivalent to <n>*<n>(element) — that is, exactly <n> occurrences of (element). Thus 2DIGIT is a 2-digit number, and 3ALPHA is a string of three alphabetic characters.
- Lists are made using the # character. The construct # is defined, similar to *, as follows: <l>#<m>element
- A semicolon, set off some distance to the right of rule text, starts a comment that continues to the end of line.