<html xmlns="http://www.w3.org/1999/xhtml" a0:Name="SuikaWiki" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:Version="0.9"><head></head><body><p><a0:anchor-end a0:anchor="1">[1]</a0:anchor-end> <a0:anchor>RFC819</a0:anchor> 附属書 A は次の様な <a0:anchor>BNF</a0:anchor> で mailbox と domain を定義してる。</p><ul><li>&lt;mailbox&gt; ::= &lt;local-part&gt; &quot;@&quot; &lt;domain&gt;</li><li>&lt;local-part&gt; ::= &lt;string&gt; | &lt;quoted-string&gt;</li><li>&lt;string&gt; ::= &lt;char&gt; | &lt;char&gt; &lt;string&gt;</li><li>&lt;quoted-string&gt; ::=  &quot;&quot;&quot; &lt;qtext&gt; &quot;&quot;&quot;</li><li>&lt;qtext&gt; ::=  &quot;\&quot; &lt;x&gt; | &quot;\&quot; &lt;x&gt; &lt;qtext&gt; | &lt;q&gt; | &lt;q&gt; &lt;qtext&gt;</li><li>&lt;char&gt; ::= &lt;c&gt; | &quot;\&quot; &lt;x&gt;</li><li>&lt;domain&gt; ::= &lt;naming-domain&gt; | &lt;naming-domain&gt; &quot;.&quot; &lt;domain&gt;</li><li>&lt;naming-domain&gt; ::=  &lt;simple-name&gt; | &lt;address&gt;</li><li>&lt;simple-name&gt; ::= &lt;a&gt; &lt;ldh-str&gt; &lt;let-dig&gt;</li><li>&lt;ldh-str&gt; ::= &lt;let-dig-hyp&gt; | &lt;let-dig-hyp&gt; &lt;ldh-str&gt;</li><li>&lt;let-dig&gt; ::= &lt;a&gt; | &lt;d&gt;</li><li>&lt;let-dig-hyp&gt; ::= &lt;a&gt; | &lt;d&gt; | &quot;-&quot;</li><li>&lt;address&gt; :: =  &quot;#&quot; &lt;number&gt; | &quot;[&quot; &lt;dotnum&gt; &quot;]&quot;</li><li>&lt;number&gt; ::= &lt;d&gt; | &lt;d&gt; &lt;number&gt;</li><li>&lt;dotnum&gt; ::= &lt;snum&gt; &quot;.&quot; &lt;snum&gt; &quot;.&quot; &lt;snum&gt; &quot;.&quot; &lt;snum&gt;</li><li>&lt;snum&gt; ::= one, two, or three digits representing a decimal integer value in the range 0 through 255</li><li>&lt;a&gt; ::= any one of the 52 alphabetic characters A through Z in upper case and a through z in lower case</li><li>&lt;c&gt; ::= any one of the 128 ASCII characters except &lt;s&gt; or &lt;SP&gt;</li><li>&lt;d&gt; ::= any one of the ten digits 0 through 9</li><li>&lt;q&gt; ::= any one of the 128 ASCII characters except CR, LF, quote (&quot;), or backslash (\)</li><li>&lt;x&gt; ::= any one of the 128 ASCII characters (no exceptions)</li><li>&lt;s&gt; ::= &quot;&lt;&quot;, &quot;&gt;&quot;, &quot;(&quot;, &quot;)&quot;, &quot;[&quot;, &quot;]&quot;, &quot;\&quot;, &quot;.&quot;, &quot;,&quot;, &quot;;&quot;, &quot;:&quot;, &quot;@&quot;, &quot;&quot;&quot;, and the control characters (ASCII codes 0 through 31 inclusive and 127)</li></ul><p><a0:anchor-end a0:anchor="2">[2]</a0:anchor-end> 分かりにくいので現代風に
<a0:anchor>ABNF</a0:anchor> に書き直してみる。</p><ul><li>mailbox = local-part &quot;@&quot; domain</li><li>local-part = string / quoted-string</li><li>string = 1*char</li><li>quoted-string = &lt;&quot;&gt; qcontent &lt;&quot;&gt;</li><li>qcontent = 1*( quoted-pair / qtext )</li><li>quoted-pair = &quot;\&quot; %x00-%x7F</li><li>char = atext / quoted-pair</li><li>domain = naming-domain *(&quot;.&quot; naming-domain) ;; 大文字・小文字を区別しない</li><li>naming-domain = simple-name / address</li><li>simple-name = <a0:anchor>ALPHA</a0:anchor> 1*( ALPHA / <a0:anchor>DIGIT</a0:anchor> / &quot;-&quot; ) ( ALPHA / DIGIT )</li><li>address = &quot;#&quot; 1*DIGIT / &quot;[&quot; <a0:anchor>IPv4address</a0:anchor> &quot;]&quot;</li><li>atext = %x21 / %x23-27 / %x2A-2B / %x2D / %x2F / %x30-39 / %x3D / %x3F / %x41-5A / %x5E-7F</li><li>qtext = %x00-09 / %x0B-0C / %x0E-21 / %x23-5B / %x5D-7F</li></ul></body></html>