Anhang 1: BNF für den Grafikprotokoll-Bytestrom
Key to below:
Non-terminals are represented in < >.
Terminals which are keywords standing for particular eight-bit values
are in capitals.
Terminals whose meaning should be clear to the reader are in lower case.
Note that "empty_string" means "zero bytes", not "a <string> whose
<count> is zero."
<graphics output byte stream> ::= empty_string
| <picture> <graphics output byte stream>
| <subpicture declaration> <graphics output byte stream>
| <viewport operation> <graphics output byte stream>
| <transmission control stt> <graphics output byte stream>
<picture> ::= <new picture sst> <program stt group> <end picture stt>
<subpicture declaration> ::= <subpicture header stt> <program stt
group><subpicture end stt>
<viewport operation> ::= <declare viewport stt>
| <add subpicture to viewport stt>
| <clear viewport stt>
<transmission control stt> ::= <set data length stt>
| <extensive changes follow stt>
| <end of extensive changes stt>
<program stt group> ::= empty_string | <program stt <program stt group>
<program stt> ::= <picture control stt> | <display stt> |
<transmission control stt>
<picture control stt> ::= <escape to device stt>
| <escape to highest coordinate system stt>
| <restore coordinate system stt>
| <mark stt>
| <null stt>
| <line mode stt>
| <set intensity stt>
| <subpicture declaration>
| <simple instance stt>
| <full instance stt>
| <set character size stt>
<display stt> ::= <move absolute stt>
| <move relative stt>
| <draw absolute stt>
| <draw relative stt>
| <dot absolute stt>
| <dot relative stt>
| <move to mark and pop stt>
| <draw to mark and pop stt>
| <text and restore beam stt>
| <text stt>
| <text out stt>
<new picture stt> ::= ERASE
<end picture stt> ::= ENDPIC
<subpicture header stt> ::= SUBHED <identifier> count> <header info>
<header info> ::= 80-hex | 40-hex | C0-hex
<subpicture end stt> ::= SUBEND
<set viewport stt> ::= SETVW <viewport id> <x coordinate>
<y coordinate> <x delta> <y delta>
<add subpicture to viewport stt> ::= AADSVW <identifier> <viewport id>
<clear viewport stt> ::= CLVW <viewport id>
<extensive changes follow stt> ::= DELAY
<end of extensive changes stt> ::= NODELAY
<escape to device stt> ::= ESCDEV <device code> <string>
<escape to highest coordinate system stt> ::= ESCTOP
<restore coordinate system stt> ::= RESLEV
<null stt> ::= NULL
<mark stt> ::= MARK
<line mode stt> ::= LINMOD <value>
<set character size stt> ::= SETCHS <x delta> <y delta>
<set data length stt> ::= SETDLN <value>
<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>
<move to mark and pop stt> ::= MOVEMK
<draw to mark and pop stt> ::= DRAWMK
<text and restore beam stt> ::= TEXTR <string>
<text stt> ::= TEXT <string>
<text out stt> ::= TEXTO <string>
<simple instance stt> ::= INST <identifier> <simple instance tail>
<full instance stt> ::= INSTF <identifier> <full instance tail>
<simple instance tail> ::= eight_bits_of_binary_0
| <count> <tail code> <as clause> <at clause>
<tail code> ::= bit_pattern_indicating_what_clauses_follow
<full instance tail> ::= eight_bits_of_binary_0
| <count> <tail code> <as clause> <at clause>
<rotation clause> <portion clause>
<uniform magnification clause>
<separate magnification clause> <image size
clause> <complete transformation clause>
<as clause> ::= empty_string | <identifier>
<at clause> ::= empty_string | <x coordinate> <y coordinate>
<rotation clause> ::= empty_string | <angle>
<portion clause> ::= empty_string | <x coordinate> <y coordinate>
<x delta> <y delta>
<uniform magnification clause> ::= empty_string |floating point number>
<separate magnification clause> ::= empty_string |
<floating point number> <floating point number>
<image size clause> ::= empty_string | <x delta> <y delta>
<complete transformation clause> ::= empty_string | six_<floating point
number>'s
<angle> ::= 16-bit_non-negative_fractional_part_of_a_circle
<x coordinate> ::= <coordinate>
<y coordinate> ::= <coordinate>
<x delta> ::= <double coordinate>
<y delta> ::= <double coordinate>
<coordinate> ::= signed,_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
<floating point number> ::= network_standard_floating_point
number_if_any
| 8-bit_two_s_complement_exponent_part and a
16-bit_two_s_complement_fraction_part <count>
::= 7-bit_non-negative_integer
| 15-bit_non-negative_integer_represented_in
"excess_2**15"_notation
<string> ::= <count> count_8-bit_bytes
<identifier> ::= <count> count_upper_case_letters_or_numbers
<viewport id> ::= <identifier>
<device code> ::= 8-bit_integer
<value> ::= 8-bit_integer