PAS1 Loops Infinitely if Too Many Errors

Product Version(s): 3.13 3.20
Operating System:   MS-DOS
Flags: ENDUSER | TAR07491 buglist3.13 buglist3.20 fixlist3.30
Last Modified: 16-DEC-1987    ArticleIdent: Q10396

Problem:
   Under Version 3.13 of the Pascal compiler, when the
number of syntax errors encountered by PAS1 exceeds the
amount specified with the $errors metacommand, PAS1 loops
infinitely. Under Version 3.20, PAS1 emits the error
message "error count exceeded - compiler cannot continue"
repeatedly until the compiler runs out of memory.

Response:
   This behavior was caused because the procedure called
when the number of errors overflows ("panic") attempts to
flush the listing file by successively calling the lexer.
Since the lexer can generate errors, rampant recursion is
triggered. The Pascal front end (PAS1) was changed to avoid
this recursion in Version 3.30.
