4.1 Representation languages

A program in the strict Algol 68 language is composed by a series of symbols. These symbols have names such as letter-a-symbol and assigns-to-symbol which are, well, purely symbolic. In fact, these are notions in the two-level grammar that defines the strict language.

A representation language provides a mapping between symbols in the strict language and the representation of these symbols. Each representation is a sequence of syntactic marks. For example, the completion symbol may be represented by exit, where the marks are the bold letters. The tilde symbol may be represented by ~, which is a single mark. The representation of assigns to symbol is :=, which is composed by the two marks : and =. The representation of letter-a is, not surprising, the single mark a.

The section 9.4 of the Report describes the recommended representation for all the symbols of the language. The set of all recommendations constitutes the so-called reference language. Algol 68 implementations are strongly encouraged to use representation languages which are similar enough to the reference language, recognizable “without further elucidation”, but this is not strictly required.

A representation language may specify more than one representation for a given symbol. For example, in the reference language the is not symbol is represented by isnt, :/=: and a variant of the later where the slash sign is superimposed on the equal sign. In this case, an implementation can choose to implement any number of the representations.

Spaces, tabs and newlines are typographical display features that, when they appear between symbols, are of no significance and do not alter the meaning of the program. However, when a space or a tab appear in string or character denotations, they represent the space symbol and the tab symbol respectively1.


Footnotes

(1)

The tab symbol is a GNU extension