ISO 10303-21:2016(E)

Annex B
(normative)

WSN notational conventions

The syntax of the exchange structure is defined in Wirth Syntax Notation (WSN) as published by Niklaus Wirth in Communications of the ACM, 20:11 (Nov 77), 822-823. The WSN consists of a set of productions or substitution rules. The element given on the left side of a production (i.e. before the equals sign) can be used to represent an occurrence of the pattern given on the right side. Elementary terms that appear only on the right side of such productions are called terminals. Elements that occur on the left side of a production are called non-terminals.

The notational conventions are given below. Table B.1 presents WSN defined in itself.

EXAMPLE      The sequence "A(B|C|D)" is equivalent to "AB|AC|AD"

Table B.1 — Wirth Syntax Notation (WSN) defined in itself
SYNTAX         = { PRODUCTION }.

PRODUCTION     = IDENTIFIER "=" EXPRESSION ".".

EXPRESSION     = TERM { "|" TERM }.

TERM           = FACTOR { FACTOR }.

FACTOR         = IDENTIFIER
                   | LITERAL
                   | "[" EXPRESSION "]"
                   | "(" EXPRESSION ")"
                   | "{" EXPRESSION "}" .

IDENTIFIER     = letter { letter }.

LITERAL        = """" character { character } """".

© ISO 2016 — All rights reserved