previous contents index next
(Common Basis: ...) Contents Index (Source Code Components)

2.1 Arrangements

In order to describe the components of the SCARLET programming language we only use such names for non-terminal symbols which are suggested by the formal grammar. We also use them, whenever we mean the whole class of non-terminals and not only a single element of it. Whenever such a name appears in the headline of a paragraph, the syntactical objects mentioned there are usually elements of the belonging class.
 

Sometimes it makes things easier to use names for more general classes than given by the grammatical rules:
The union of IntExpression, StringExpression, CellExpression and BoolExpression, for example, we will call Expression. Analogously we get the classes Var and ConstantIdentifier.


 

Instead of one or more objects of an arbitrary class Class separated by commas, we will sometimes write ClassList.


 

As soon as the syntax of a class consists of more than one terminal or non-terminal symbol, we give a syntax diagram to clarify the structure: Terminal symbols appear in ovals, while non-terminals are framed by rectangles. (In addition, terminals are always printed in typewriter font unlike the non-terminals which appear in the normal but italic font.)

Syntax example

Fig. 6: An example of a syntax diagram.

A path through the graph which leads to valid grammatical objects starts with the arrow at the very left side, and follows always the direction pointed out by the arrows, until it ends at the point of the arrow on the right. We get an element of the described class by writing the terminal and non-terminal symbols one behind each other in right the order we passed them on a path through the diagram. The single symbols should usually be separated by blanks.


Sometimes there will be phrases like ''There can be an arbitrary amount of objects...''. Then we mean, of course, that the number is only restricted by the size of the available saving medium.


previous contents index next
(Common Basis: ...) Contents Index (Source Code Components)