Re:Dennis Ritchie's first C compiler on Github
by lanna on Tuesday May 21, 2013 @11:54PM
(#5748794)
A compiler has to do a lot more than parse a source file and translate it to target code: error checking and reporting, optimization, etc.
To compile a C compiler, you don't need a full-blown C compiler. For instance, I bet floats and doubles are not used. Therefore, you can write a barebones proto-C compiler in whatever language you have available and use it to bootstrap your compiler. Rinse and repeat.
To compile a C compiler, you don't need a full-blown C compiler. For instance, I bet floats and doubles are not used. Therefore, you can write a barebones proto-C compiler in whatever language you have available and use it to bootstrap your compiler. Rinse and repeat.