Skip to main content

Formal Syntax

The notational conventions used here are identical to those used in RFC 822 [RFC822].

The * (asterisk) convention is as follows:

l*m something

meaning at least l and at most m somethings, with l and m taking default values of 0 and infinity, respectively.

message             = headers 1*( CRLF *single-byte-char *segment
single-byte-seq *single-byte-char )
; see also [MIME1] "body-part"
; note: must end in ASCII

headers = <see [RFC822] "fields" and [MIME1] "body-part">

segment = single-byte-segment / double-byte-segment

single-byte-segment = single-byte-seq 1*single-byte-char

double-byte-segment = double-byte-seq 1*( one-of-94 one-of-94 )

single-byte-seq = ESC "(" ( "B" / "J" )

double-byte-seq = ESC "$" ( "@" / "B" )

CRLF = CR LF

; ( Octal, Decimal.)

ESC = <ISO 2022 ESC, escape> ; ( 33, 27.)

SI = <ISO 2022 SI, shift-in> ; ( 17, 15.)

SO = <ISO 2022 SO, shift-out> ; ( 16, 14.)

CR = <ASCII CR, carriage return>; ( 15, 13.)

LF = <ASCII LF, linefeed> ; ( 12, 10.)

one-of-94 = <any one of 94 values> ; (41-176, 33.-126.)

7BIT = <any 7-bit value> ; ( 0-177, 0.-127.)

single-byte-char = <any 7BIT, including bare CR & bare LF, but NOT
including CRLF, and not including ESC, SI, SO>