Appendix 1 The Lexis of Modula-2

A1.1 Reserved Words (Keywords)

AND	        ARRAY	        BEGIN	        BY
CASE	        CONST	        DEFINITION	DIV
DO	        ELSE	        ELSIF	        END 
EXIT	        EXCEPT	        EXPORT	        FINALLY
FOR	        FORWARD	        FROM	        IF
IMPLEMENTATION	IMPORT	        IN	        LOOP
MOD	        MODULE	        NOT	        OF
OR	        PACKEDSET	POINTER	        PROCEDURE
QUALIFIED	RECORD	        REM	        RETRY
REPEAT	        RETURN	        SET	        THEN
TO	        TYPE	        UNTIL	        VAR
WHILE	        WITH

The keywords EXCEPT, FINALLY, FORWARD, PACKEDSET, REM, and RETRY were added for ISO Modula-2.

The keywords AND, DIV, IN, MOD, NOT, OR, and REM are called operator keywords; the rest are punctuation keywords.

A1.2 Standard (Pervasive) Identifiers

ABS	        BITSET	        BOOLEAN	   CARDINAL
CAP	        CHR	        CHAR	   COMPLEX
CMPLX	        DEC	        DISPOSE	   EXCL
FALSE	        FLOAT	        HALT	   HIGH
IM	        INC	        INCL	   INT
INTERRUPTIBLE	INTEGER	        LENGTH	   LFLOAT
LONGCOMPLEX	LONGREAL	MAX	   MIN
NEW	        NIL	        ODD	   ORD
PROC	        PROTECTION	RE	   REAL
SIZE	        TRUE	        TRUNC	   UNINTERRUPTIBLE
VAL

The pervasive identifiers COMPLEX, CMPLX, IM, INT, INTERRUPTIBLE, LENGTH, LFLOAT, LONGCOMPLEX, LONGREAL, PROTECTION, RE and UNINTERRUPTIBLE were added for ISO Modula-2.

A1.3 Standard Symbols

:	colon	        seperates variable from type or case label from statements
,	comma	        seperates items in lists
..	ellipsis	range indicator
=	equals	        constant or type declarations
.	period	        decimal point, qualified identifier selector, end of program
;	semicolon	statement separator 
( )	parentheses expressions, parameter lists or enumerations
[ ]	brackets	index, range, module priority, or absolute address brackets
(! !)	brackets - alternate form
{ }	braces	        set delimeters
(: :)	braces - alternate form
|	bar	        separates each varient in case statement
< >	pragma	        source code directive indicator
(*  *)	comment	        contain comments 
E (in a REAL) the exponent or scale factor
B(after a constant) an octal literal
H(after a constant) a hexadecimal literal
C(after an octal constant) the corresponding character literal

A1.4 Standard Operators

:=	assignment operator
+	plus (identity) and set union operator, string concatenation symbol
-	minus, negation, and set difference operator
OR	logical disjunction operator
*	multiplication and set intersection operator
/	division operator and symmetric set difference operator
DIV	div operator
MOD	mod operator
REM	rem operator
AND, &	logical disjunction operator
NOT, ~	logical negation operator
=	equals operator
# <>	not equals operator
<	less than operator
>	greater than operator
<=	less than or equal and subset operator
>=	greater than or equal and superset operator
IN	set membership operator
^,@	dereferencing operator (caret or hat)

Contents