How to use C to write a C compiler?
- by israkir
I am taking a compiler course this semester and we talked about this interesting thing in the class. Teacher used an example of p-code along with pascal to explain it.
After google-ing a bit, I saw this phenomena is called self-hosting and naturally related to the first compilers.
Ok, there is an interpreter which interprets the compiler source code written in its own language. But, there is still something missing in the explanations I found. I mean, there are some parts still looks mysterious (what about the interpreter? it is also a program, still need to be translated into machine code etc...)
What I am asking you guys is that can you explain it as simple as possible or provide any online resource which you think that it explains this phenomena precisely..