Subsections


Lexical conventions

This section describes the classes of lexical tokens.

White space

Blanks, tabs, new-lines, and comments form white space. White space is ignored except when it separates adjacent tokens. All input between (* and *) is considered a comment. Comments do nest. A program may not end with a non-terminated comment.

Identifiers

An identifier consists of a letter or underscore, followed by any number of letters, underscores, and digits. Identifiers are case sensitive. Identifiers are at least 30 characters significant.

Keywords

The following tokens are keywords and are reserved. They cannot be used as regular identifiers.

and array begin bool by char delete do else
end false for function if include int is new
not null of or procedure real repeat return size
string then to true until var while    


include is only a keyword at the beginning of a line.

Integer constants

An integer constant is defined exactly as in ANSI-C (including octal and hexadecimal constants), except that there are no L, l, U, and u suffixes. An integer constant is of type int and cannot be used as lvalue.

Character constants

A character constant is defined exactly as in ANSI-C, except that there is no L prefix for wide-character constants. A character constant is of type char and cannot be used as lvalue.

Real constants

A real constant is defined exactly as in ANSI-C, except that there are no F, f, L, and l suffixes. A real constant is of type real and cannot be used as lvalue.

Bool constants

There are two constants of type bool: true and false. They cannot be used as lvalue.

String constants

A string constant is defined exactly as in ANSI-C, except that there is no L prefix for wide-character string constants, and that strings are not implicitly terminated by '$\backslash$0'. A string constant is of type string and cannot be used as lvalue. Deleting a string constant causes undefined behavior.

The null constant

The value null is of the implicit null type and denotes a null reference. null cannot be used as lvalue.

File inclusion

A file can be included by specifying include file.inc; the keyword include must begin a new line and may not be preceded by white space. It is recommended but not necessary to end a file with .inc. The search path can be modified by using the -I compiler switch.

K.G. Langendoen 2006-10-03