-
Notifications
You must be signed in to change notification settings - Fork 4
/
765.txt
52 lines (41 loc) · 2.01 KB
/
765.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
* [CODE(ABNF)[phrase]] (822)
**RFC 2822 から
-[1] word = atom / quoted-string ;; RFC 2822 3.2.6
-[2] phrase = 1*word / obs-phrase ;; RFC 2822 3.2.6
-[3] obs-phrase = word *(word / "." / CFWS) ;; RFC 2822 4.1
[4] [CODE(ABNF)[obs-phrase]] に [CODE(ABNF)["."]]
が含まれているのは、名前の頭文字などで [CODE(ABNF)[quoted-string]]
の外で使う [[DQN]] が多かったせいです (4.1)。
- [5] [[quoted-string]] も [[atom]] も周りの [[CFWS]] は省略可能ですから、 [SAMP[atom1"quoted-string1"atom2]] とか [SAMP["quoted-string1""quoted-string2"]] とかもありですね。意味があるのかと問われればないと思いますけど、 parser はこういうのも覚悟しないといけないということで。
[[#comment]]
**MIME
[6] [[RFC 2047]] 5. (3) が最新の定義です。次のようにあります。
また、説明によると [[encoded-word]] は必ず隣接する他のものと [[linear-white-space]]
で区切られる必要があります。
-[7] phrase = 1*( encoded-word / word )
[8] >>1-3,>>6-7 を考慮に [[ABNF]] で書き直すと、
-[9] phrase = 1*(word / encoded-word) / obs-phrase
-[10] encoded-word = CFWS <RFC 2047 encoded-word> CFWS
但し [CODE(ABNF)[phrase]] が行全体の初めや終わりに来る場合は [[CFWS]]
は要りませんから、この部分だけ ABNF で表すのは無理ですね...
[[#comment]]
** メモ
[[#comment]]
* 要素型級 [CODE(SGML)[%phrase]] (HTML)
[11] [[HTML 4]] の[[要素型級]] [DFN[[CODE(SGML)[%phrase]]]]:
- [CODE(HTMLe)[[[abbr]]]]
- [CODE(HTMLe)[[[acronym]]]]
- [CODE(HTMLe)[[[cite]]]]
- [CODE(HTMLe)[[[code]]]]
- [CODE(HTMLe)[[[dfn]]]]
- [CODE(HTMLe)[[[em]]]]
- [CODE(HTMLe)[[[kbd]]]]
- [CODE(HTMLe)[[[samp]]]]
- [CODE(HTMLe)[[[strong]]]]
- [CODE(HTMLe)[[[var]]]]
仕様書:
- [[HTML 4]]
-- [[厳密DTD]]: <IW:HTML4:"sgml/dtd.html#phrase">
-- [[移行用DTD]]: <IW:HTML4:"sgml/loosedtd.html#phrase">
[[#comment]]
*メモ