Connected: An Internet Encyclopedia
RFC 822 - 3.4.3. COMMENTS

Top: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 822
Up: 3. LEXICAL ANALYSIS OF MESSAGES
Up: 3.4. CLARIFICATIONS
Prev: 3.4.2. WHITE SPACE
Next: 3.4.4. DELIMITING AND QUOTING CHARACTERS

### 3.4.3. COMMENTS

A comment is a set of ASCII characters, which is enclosed in matching parentheses and which is not within a quoted-string The comment construct permits message originators to add text which will be useful for human readers, but which will be ignored by the formal semantics. Comments should be retained while the message is subject to interpretation according to this standard. However, comments must NOT be included in other cases, such as during protocol exchanges with mail servers.

Comments nest, so that if an unquoted left parenthesis occurs in a comment string, there must also be a matching right parenthesis. When a comment acts as the delimiter between a sequence of two lexical symbols, such as two atoms, it is lexically equivalent with a single SPACE, for the purposes of regenerating the sequence, such as when passing the sequence onto a mail protocol server. Comments are detected as such only within field-bodies of structured fields.

If a comment is to be "folded" onto multiple lines, then the syntax for folding must be adhered to. (See the "Lexical Analysis of Messages" section on "Folding Long Header Fields" above, and the section on "Case Independence" below.) Note that the official semantics therefore do not "see" any unquoted CRLFs that are in comments, although particular parsing programs may wish to note their presence. For these programs, it would be reasonable to interpret a "CRLF LWSP-char" as being a CRLF that is part of the comment; i.e., the CRLF is kept and the LWSP-char is discarded. Quoted CRLFs (i.e., a backslash followed by a CR followed by a LF) still must be followed by at least one LWSP-char.

Next: 3.4.4. DELIMITING AND QUOTING CHARACTERS

Connected: An Internet Encyclopedia
RFC 822 - 3.4.3. COMMENTS