Compiler version: 11.2017
When I decided in October 2017 to use runtime checks in the first pass of the compiler, I had to do substantial work to remove all the places where out-of-range assigments were done or uninitialized variables were used.
At the same time I tried to use the PASSCAN scanner with the source code formatter PASFORM. This implied the use of the scalar type SYMB. When I introduced this into PASFORM, I got some hundred errors P104 due to unknown identifiers. It turned out, that most P104 errors were followed by other additional errors, because the compiler did additional checks on undefined or incomplete internal structures, which it should not do after the first error.
Furthermore, the compiler crashed, when there was an erroneous semicolon before else, like, for example, in:
|
the problem was, that the statement before "else" ended correctly, and the symbol else at the beginning of the next statement was not handled correctly by the parser and lead to disaster. This had to be fixed as the first step.
The next working version of the compiler showed these errors:
|
The semicolon before "else" is now handled correctly; the compiler shows an error P006 ("Illegal symbol") at the "else" symbol.
This is the 09.2017 version, which does not yet show the errors on the terminal. But anyway: P104 is shown, because CMAX is not defined, and P117 is shown, because the type of CMAX does not fit to the type of the integer constant 1 (which makes no sense).
There were many places in the compiler, where such additional errors after P104 were shown. I tried to eliminate all or most of these. The compiler output now looks like this (12.2017 version):
|