Passa al contenuto principale

Appendice 1: BNF per il flusso di byte del protocollo grafico

Legenda di quanto segue:

  • I non terminali sono rappresentati tra <>.
  • I terminali che sono parole chiave corrispondenti a particolari valori di otto bit sono in maiuscolo.
  • I terminali il cui significato dovrebbe essere chiaro al lettore sono in minuscolo. Si noti che «empty_string» significa «zero byte», e non «una <string> il cui <count> è zero».
<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

[Questa RFC è stata convertita in forma leggibile dalle macchine per l'inserimento negli archivi RFC online da Kelly Tardif, Viagénie, nell'ottobre 1999.]