Appendice A. Grammatica raccolta
Questa appendice contiene la grammatica BNF completa per le regole di sintassi dei tipi di media definite in RFC 2046.
Sintassi dei tipi di media
media-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
x-token = <I due caratteri "X-" o "x-" seguiti, senza
spazi intermedi, da qualsiasi token>
ietf-token = <Un token di estensione definito da un
RFC di standards track e registrato
presso IANA.>
subtype = extension-token / iana-token
iana-token = <Un token di estensione definito pubblicamente>
parameter = attribute "=" value
attribute = token
value = token / quoted-string
Sintassi Multipart
boundary := 0*69<bchars> bcharsnospace
bchars := bcharsnospace / " "
bcharsnospace := DIGIT / ALPHA / "'" / "(" / ")" /
"+" / "_" / "," / "-" / "." /
"/" / ":" / "=" / "?"
dash-boundary := "--" boundary
close-delimiter := delimiter "--"
delimiter := CRLF dash-boundary
discard-text := *(*text CRLF)
preamble := discard-text
epilogue := discard-text
body-part := MIME-part-headers [CRLF *OCTET]
encapsulation := delimiter
body-part
multipart-body := [preamble]
dash-boundary CRLF
body-part
*encapsulation
close-delimiter
[epilogue]
Note:
- Questa grammatica è utilizzata congiuntamente con RFC 2045 e RFC 822
- La sintassi completa richiede il riferimento a tutti gli RFC correlati
- IANA mantiene un elenco dei tipi di media registrati