Chapter 10. Names and Constants

Table of Contents
10.1. Identifiers
10.2. Numbers
10.3. Literal Constants
10.4. Strings

10.1. Identifiers

Identifiers are used for naming objects of data, labels and switches, procedures, macros and their formal parameters. An identifier consists of an arbitrary sequence of lower case letters and digits, starting with a letter. It carries no information in its form, e.g. single-letter identifiers are not reserved for special purposes. It may be of any length, though it is permissable for compilers to disregard all but the first twelve printing characters. As layout characters are ignored, spaces may be used in identifiers without acting as terminators.

Id ::= 
     Letter  Letterdigitstring

Letterdigitstring ::= 
     Letter  Letterdigitstring
     Digit  Letterdigitstring

Letter ::= a b c d e f g h i j k l m n o p q r s t u v w x y z

Digit ::= 0 1 2 3 4 5 6 7 8 9

An obvious liberty is taken with the layout of alternatives in the above rules.