Chapter 5. Place References--Switches

Place references refer to positions of program statements, and the simplest position market if the label (see Section 3.4). A switch is a preset and unalterable array of labels, which must be within scope at the switch declaration. Any use of the indexed switch name refers to the corresponding label. For example, the switch declaration


SWITCH s := a, b, c

causes s[1] to refer to the label a, s[2] to b and s[3] to c. The syntax rules are

Switchdec ::= 
     SWITCH  Switch :=  Labellist 

Labellist ::= 
     Label
     Label ,  Labellist 

Switch ::= Id 

Label ::= Id