(a) a straight copy of a section of RFC #822 Standard for ARPA Internet Text Messages, August 13, 1982,
(b) changes and additions to (a),
(c) a set of rules that we use everywhere and that are listed here once.
"<" and ">"are not used, in general. The name of a rule is simply the name itself, rather than
<name>Quotation-marks enclose literal text (which may be upper and/or lower case). Certain basic rules are in uppercase, such as SPACE, TAB, CRLF, DIGIT, ALPHA, etc. Angle brackets are used in rule definitions, and in the rest of this document, whenever their presence will facilitate discerning the use of rule names.(Note for WWW: we never use them)
<l>*<m>elementindicating at least l and at most m occurrences of element. Default values are 0 and infinity so that "*(element)" allows any number, including zero; "1*element" requires at least one; and "1*2element" allows one or two.
"<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.
<l>#<m>elementindicating at least l and at most m elements, each separated by one or more commas (","). This makes the usual form of lists very easy; a rule such as '(element *("," element))' can be shown as "1#element". Wherever this construct is used, null elements are allowed, but do not contribute to the count of elements present. That is, "(element),,(element)" is permitted, but counts as only two elements. Therefore, where at least one element is required, at least one non-null element must be present. Default values are 0 and infinity so that "#(element)" allows any number, including zero; "1#element" requires at least one; and "1#2element" allows one or two.
NonTerminal ::= RuleOfTerminalsAndNonTerminals3) because the slash is heavily used in directory path names, the alternatives are separated by a vertical bar "|" rather than a slash.
4) sometimes it is necessary to specify a layout character sequence, such as newline. We have here adopted the conventions used in C strings:
\n newline \r carriage-return \t tab \b backspace \f form feed
CrLf ::= \r\n
If a double-quote character is used inside a string, it must appear as the sequence \" (backslash followed by double quote).
A control character can be represented by a backslash followed by its ASCII sequence number in octal notation.
The NUL is not representable.
RC