Funny fact about bootstrapping
A few weeks ago, we had our 29th ECMA meeting. While we were reviewing the standard, we went over the special characters and their codes (Section 8.32.23). Special characters are %N, %R, %T, %(, .... and they all have a specific meaning. For example, %N means the ASCII character 0x0A, %R 0x0D, etc...
While I was looking at our code to verify that we handle special characters properly I was surprised to see that our lexer was doing something like:
which is quite surprising since we are saying here that if you read %N, interpret it as %N. But what does %N actually means? It is either what the standard says or something completely different.
Luckily, the first Eiffel compiler that compiled this code did a good job and it does what the standard says! And today, we rely on that first Eiffel compiler since there is nothing in the code that tells how the mapping is done.
But maybe we should not be that trusting and simply put the actual mapping which is not that much more complicated and certainly less troubling.