Re: In which language was C compiler written | 11 Sep 2009 BTW today's date is 10 september not 11 september.
Re: In which language was C compiler written | 11 Sep 2009 First version was written in Assembly Language !!
Re: In which language was C compiler written | 11 Sep 2009 I guess, the first C compiler was written in "B Language", which can be "thought of as C without types". The first B compiler was written in TMG Source :: http://plan9.bell-labs.com/who/dmr/chist.html
Bizarrely enough I reckon kshiteej is correct, reading carefully through http://cm.bell-labs.com/cm/cs/who/dmr/chist.html and specifically "In 1971 I began to extend the B language by adding a character type and also rewrote its compiler to generate PDP-11 machine instructions instead of threaded code. Thus the transition from B to C was contemporaneous with the creation of a compiler capable of producing programs fast and small enough to compete with assembly language. I called the slightly-extended language NB, for `new B.' " It seems from this that as NB was developed further, there came a point where he decided to call the new language C: "After creating the type system, the associated syntax, and the compiler for the new language, I felt that it deserved a new name; NB seemed insufficiently distinctive. I decided to follow the single-letter style and called it C" So the question really hinges on whether or not the compiler itself used the type system and syntax mentioned here. If it did, then the compiler itself would have been a C compiler. So the answer is either C as kshiteej says, or it's NB, if you can't accept the mildly paradoxical view that the first C compiler was written in C. I guess we'd need DMR's view on the question to be certain what the correct answer is.
But I think it's obvious that the very first C compiler ever written was not written in C, but more probably in assembly language or possibly in a predate language like BCPL.
But how can C be written in C ?? :undecided It must be written in a language that is a predecessor to C, but not C. Anyway, if you think the answer is C; I don't have anything to say :mean: -- I already mentioned the source according which it was in B. So, congratz Kshiteej.
If the language is renamed from its original prototype name of NB meaning New B then it's entirely possible that the very first C compiler was written in C. Remember, with the now extensive differences between B and C, DMR decided it was time for a new name. So if what defines C, specifically the types etc, existed in the NB compiler at the time that NB was renamed to C, then there is no logical problem with saying that the first C compiler was written in C, because it was all originally NB/New B, and just renamed. Anyway as I said I think only DMR can answer this question definitively. Maybe I should ask him...
Is there any relation between yacc and C compiler? I was going through an interview of Stephen Johnson, the developer of YACC, which mentions about the involvement of Dennis Ritchie during the development of C. If anyone has any idea please share.