Quote:
The native c compiler only implements a limited version of c. It should be considered to
be a 'c like' scripting language.
The language looks closer to B than to C imo. There is only one data type (12-bit int), no "struct" etc.
I guess the native compiler code was kept so terse (one letter function names, no symbolic constants used for the emitted tokens) in order to enable self-hosting, but it really makes the code hard to follow. I would have rather given up self-hosting for a more readable/serviceable source code of the native compiler. For self-hosting, one could still implement a tool in the hosted compiler that parses the native compiler code and produces a minimized version. There are also very few comments, ironically some of those that
are included are rather superfluous:
Code:
J( ) {
K( );
switch(*p++){
case '&': J( ); stri(20); break;
case '|': J( ); stri(-20); break;
default: p--; return;
}
stkp--;
} /* end J */
Oh, "end J" - really? Thanks for helping me figure
that one out!

I would rather have known what "J", "K", "20", "-20" are supposed to mean.
Still, fascinating stuff for such a limited machine!
