Syntax diagrams

All elements of the Pascal language are explained in syntax diagrams. Syntax diagrams are like flow charts. Reading a syntax diagram means getting from the left side to the right side, following the arrows. When the right side of a syntax diagram is reached, and it ends with a single arrow, this means the syntax diagram is continued on the next line. If the line ends on two arrows pointing to each other, then the diagram is ended.

Syntactical elements are written like this
--                         -----------------------------------------------
  syntactical elements are like this
Keywords which must be typed exactly as in the diagram:
--keywords are like this-----------------------------------------------------
When something can be repeated, there is an arrow around it:
---|this can be repeated----------------------------------------------------
   ------------------
When there are different possibilities, they are listed in rows:
---|-First possibility----------------------------------------------------------
   -Second possibility--
Note, that one of the possibilities can be empty:
--------------------------------------------------------------------------
   - First possibility --|
    Second possibility
This means that both the first or second possibility are optional. Of course, all these elements can be combined and nested.

For some syntactical elements you will find no definition in the various diagrams. This is because they are defined implicitly in the pascal parser: the tokens of the pascal language.

The following elements are defined implicitly:

string

This is a literal string.

number

This can be an integer number or a floating point number.

identifier

This is basically a name the programmer has given to an item he wishes to use in his code. This item can be a type, a variable, a constant or even the name of a procedure or unit.

Comments or whitespace will not appear in the syntax diagrams.