メインコンテンツまでスキップ

Appendix A. 収集された文法 (Collected Grammar)

この付録には、RFC 2045で定義されたすべてのMIME構文規則の完全なBNF文法が含まれています。

MIMEヘッダーフィールド (MIME Header Fields)

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

注記 (Note):

  • この文法はRFC 822のBNFと組み合わせて使用されます
  • 一部の規則はRFC 822で定義された用語を参照しています
  • 完全な文法には、RFC 822およびRFC 1123への参照が必要です