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

付録 B. ABNF のコア ABNF

本付録は、一般に使われているいくつかの基本規則 (basic rule) を含みます。基本規則は大文字です。これらの規則は、7 ビット ASCII または 7 ビット ASCII のスーパーセットである文字集合で符号化された ABNF に対してのみ有効であることに注意してください。

B.1. コア規則 (Core Rules)​

SP, HTAB, CRLF, DIGIT, ALPHA など、特定の基本規則は大文字です。

      ALPHA          =  %x41-5A / %x61-7A   ; A-Z / a-z

BIT = "0" / "1"

CHAR = %x01-7F
; any 7-bit US-ASCII character,
; excluding NUL

CR = %x0D
; carriage return

CRLF = CR LF
; Internet standard newline

CTL = %x00-1F / %x7F
; controls

DIGIT = %x30-39
; 0-9

DQUOTE = %x22
; " (Double Quote)

HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"

HTAB = %x09
; horizontal tab

LF = %x0A
; linefeed

LWSP = *(WSP / CRLF WSP)
; Use of this linear-white-space rule
; permits lines containing only white
; space that are no longer legal in
; mail headers and have caused
; interoperability problems in other
; contexts.
; Do not use when defining mail
; headers and use with caution in
; other contexts.

OCTET = %x00-FF
; 8 bits of data

SP = %x20

VCHAR = %x21-7E
; visible (printing) characters

WSP = SP / HTAB
; white space

B.2. 共通の符号化 (Common Encoding)​

外部では、データは "network virtual ASCII" (すなわち、8 ビットフィールド内の 7 ビット US-ASCII) として表現され、上位 (8 番目) のビットは 0 に設定されます。値の文字列は "network byte order" であり、値の大きいバイトが左側に表現され、ネットワーク上で最初に送信されます。