>This is really cool. Writing a compiler in the language that you're compiling seems kind of meta.
It's been done before, for more than one language, IIRC.
The technique by which they make an executable of a compiler for language L on platform B, using an existing executable of the same compiler for L on platform A, together with the source code of the compiler for L on A, is also cool. I forget the full details right now. Maybe someone else will pitch in and explain. It's called bootstrapping. It's also related to cross-compiling.
It's been done before, for more than one language, IIRC.
The technique by which they make an executable of a compiler for language L on platform B, using an existing executable of the same compiler for L on platform A, together with the source code of the compiler for L on A, is also cool. I forget the full details right now. Maybe someone else will pitch in and explain. It's called bootstrapping. It's also related to cross-compiling.
Update: Looked it up in Google:
https://en.wikipedia.org/wiki/Bootstrapping_(compilers)
https://en.wikipedia.org/wiki/Cross_compiler
Also see Canadian Cross under above article - this is like the cool technique I talked about above, but more complex.