Pascal Syntax L. Allison, Dept. of Computer Science, Monash University http://www.cs.monash.edu.au/ Please Note: 1. has *not* been carefully checked 2. does not include conformant arrays 3. is not immediately suitable for use in yacc or similar systems 4. [ ... ] used for optional items, so `[' is a terminal square bracket 5. { ... } used for repetition, zero or more times 6. See Programming Language Pascal, AS 2580-1983, BS 6192:1982, ISO 7185 Semicolon `;' is a statement separator *not* a statement terminator but there is an statement so begin x:=1; y:2; end is a valid compound statement containing *three* sub-statements. Lexical Items: -------------- - alphanumeric starting with a letter - you know includes floating point e.g. 3.14 = 314 E -2 = 0.314 E 1 string e.g. 'a string' 'Sophie''s choice' Syntax: ------- ::= program ( {, } ); . ::= [ label ] [ const ] [ type ] [ var ] { } ::=