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

付録 1: グラフィックス・プロトコルのバイト・ストリームの BNF

以下の凡例:

  • 非終端記号は <> で表す。
  • 特定の 8 ビット値を表すキーワードである終端記号は大文字で表す。
  • 意味が読者に明らかであるはずの終端記号は小文字で表す。「empty_string」は「0 バイト」を意味し、「<count> が 0 の <string>」ではないことに注意されたい。
<graphics output byte stream> ::= empty_string
| <picture> <graphics output byte stream>
<picture> ::= <new picture stt> <sttgroup> <end stt>
<stt group> ::= empty_string | <stt> <stt group>.
<stt> ::= <control stt> | <display stt>
<control stt> ::= <escape to device stt>
| <null stt>
<display stt> ::= <move absolute stt>
| <move relative stt>
| <draw absolute stt>
| <draw relative stt>
| <dot absolute stt>
| <dot relative stt>
| <text and restore beam stt>
| <text stt>

<new picture stt> ::= ERASE
<escape to device stt> ::=ESCDEV <device code> <string>
<null stt>::= NULL
<end stt>::= ENDPIC
<move absolute stt> ::= MOVEA <x coordinate> <y coordinate>
<move relative stt> ::= MOVER <x delta> <y delta>
<draw absolute stt> ::= DRAWA <x coordinate> <y coordinate>
<draw relative stt> ::= DRAWR <x delta> <y delta>
<dot absolute stt> ::= DOTA <x coordinate> <y coordinate>
<dot relative stt> ::= DOTR<x delta> <y delta>
<text and restore beam stt> ::= TEXTR <string>
<text stt> ::= TEXT <string>
<x coordinate> ::= <coordinate>
<y coordinate> ::= <coordinate>
<x delta> ::= <double coordinate>
<y delta> ::= <double coordinate>
<coordinate> ::= singed,_two's-complement,_fraction_in_range
-1/2_to_less_than_+1/2
<double coordinate> ::= signed,_two's_complement,_fraction,
range_strictly_between_-1_and_+1
<count ::= 7-bit_non-negative_integer
| 15-bit_non-negative_integer_represented_in
"excess_2**15"_notation
<string> ::= <count> count_8-bit_bytes
<device code> ::= <value>
<value> ::= 8-bit_integer

[この RFC は、Viagénie の Kelly Tardif により、1999 年 10 月にオンライン RFC アーカイブへの登録用として機械可読形式にされた。]