CBFalconer wrote:
The following source (cut down already)
PROGRAM pprt(input, output);
(* Nils Goesche <ngo@cartan.de> wrote in comp.programming
0 is defined as the empty set -- denoted {} 1 is defined as the set that contains 0 -- {0} = {{}}
[...]
gpc is being run through an alias that supplies --standard-pascal.
Are you trying to have the lexer do too much at once? Once a comment is started nothing except *) (or maybe } or EOF) should close it.
According to both standards, comments can be closed with either `*)' or `}', regardless whether they were started with `(*' or `{' (see ISO 7185, 6.1.8, the grammar rule and note 1). So the comment ends at the first `}', and the following text is no valid Pascal, of course. Since we don't consider this behaviour too useful (and apparently you don't, either ;-), GPC's default is to require "matching" comment endings. However, with `--standard-pascal' etc., the standard conformant behaviour is enforced. You can override it with `--no-mixed-comments'.
Also PascalP has no problem.
Then it's not strictly conformant. ;-) Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: 51FF C1F0 1A77 C6C2 4482 4DDC 117A 9773 7F88 1707