#?SuikaWiki/0.9 [1] [[RFC819]] 附属書 A は次の様な [[BNF]] で mailbox と domain を定義してる。 - ::= "@" - ::= | - ::= | - ::= """ """ - ::= "\" | "\" | | - ::= | "\" - ::= | "." - ::= |
- ::= - ::= | - ::= | - ::= | | "-" -
:: = "#" | "[" "]" - ::= | - ::= "." "." "." - ::= one, two, or three digits representing a decimal integer value in the range 0 through 255 - ::= any one of the 52 alphabetic characters A through Z in upper case and a through z in lower case - ::= any one of the 128 ASCII characters except or - ::= any one of the ten digits 0 through 9 - ::= any one of the 128 ASCII characters except CR, LF, quote ("), or backslash (\) - ::= any one of the 128 ASCII characters (no exceptions) - ::= "<", ">", "(", ")", "[", "]", "\", ".", ",", ";", ":", "@", """, and the control characters (ASCII codes 0 through 31 inclusive and 127) [2] 分かりにくいので現代風に [[ABNF]] に書き直してみる。 -mailbox = local-part "@" domain -local-part = string / quoted-string -string = 1*char -quoted-string = <"> qcontent <"> -qcontent = 1*( quoted-pair / qtext ) -quoted-pair = "\" %x00-%x7F -char = atext / quoted-pair -domain = naming-domain *("." naming-domain) ;; 大文字・小文字を区別しない -naming-domain = simple-name / address -simple-name = [[ALPHA]] 1*( ALPHA / [[DIGIT]] / "-" ) ( ALPHA / DIGIT ) -address = "#" 1*DIGIT / "[" [[IPv4address]] "]" -atext = %x21 / %x23-27 / %x2A-2B / %x2D / %x2F / %x30-39 / %x3D / %x3F / %x41-5A / %x5E-7F -qtext = %x00-09 / %x0B-0C / %x0E-21 / %x23-5B / %x5D-7F