Zum Hauptinhalt springen

Anhang A. Gesammelte Grammatik (Collected Grammar)

Dieser Anhang enthält die vollständige BNF-Grammatik für alle in RFC 2045 definierten MIME-Syntaxregeln.

MIME-Header-Felder

MIME-message-headers := entity-headers
fields
version CRLF

entity-headers := [ content CRLF ]
[ encoding CRLF ]
[ id CRLF ]
[ description CRLF ]
*( MIME-extension-field CRLF )

version := "MIME-Version" ":" 1*DIGIT "." 1*DIGIT

Content-Type

content := "Content-Type" ":" type "/" subtype
*(";" parameter)

type := discrete-type / composite-type

discrete-type := "text" / "image" / "audio" / "video" /
"application" / extension-token

composite-type := "message" / "multipart" / extension-token

extension-token := ietf-token / x-token

ietf-token := <An extension token defined by a
standards-track RFC and registered
with IANA.>

x-token := <The two characters "X-" or "x-" followed, with
no intervening white space, by any token>

subtype := extension-token / iana-token

iana-token := <A publicly-defined extension token.>

parameter := attribute "=" value

attribute := token

value := token / quoted-string

token := 1*<any (US-ASCII) CHAR except SPACE, CTLs,
or tspecials>

tspecials := "(" / ")" / "<" / ">" / "@" /
"," / ";" / ":" / "\" / <">
"/" / "[" / "]" / "?" / "="

Content-Transfer-Encoding

encoding := "Content-Transfer-Encoding" ":" mechanism

mechanism := "7bit" / "8bit" / "binary" /
"quoted-printable" / "base64" /
ietf-token / x-token

Content-ID

id := "Content-ID" ":" msg-id

Content-Description

description := "Content-Description" ":" *text

Hinweis:

  • Diese Grammatik wird in Verbindung mit dem BNF von RFC 822 verwendet
  • Einige Regeln verweisen auf in RFC 822 definierte Begriffe
  • Die vollständige Grammatik erfordert Verweise auf RFC 822 und RFC 1123