Penso B.S. risponde a questa domanda:
The first C++ compiler (Cfront) was written in C++. To build that, I
first used C to write a "C with Classes"-to-C preprocessor. "C with
Classes" was a C dialect that became the immediate ancestor to C++.
That preprocessor translated "C with Classes" constructs (such as
classes and constructors) into C. It was a traditional preprocessor
that didn't understand all of the language, left most of the type
checking for the C compiler to do, and translated individual
constructs without complete knowledge.
I then wrote the first version
of Cfront in "C with Classes". Cfront was a traditional compiler that
did complete syntax and semantic checking of the C++ source. For that,
it had a complete parser, built symbol tables, and built a complete
internal tree representation of each class, function, etc. It also did
some source level optimization on its internal tree representation of
C++ constructs before outputting C. The version that generated C, did
not rely on C for any type checking. It simply used C as an assembler.
The resulting code was uncompromisingly fast.
Prima ha creato qualcosa che ha chiamato "C with Classes" implementato da un semplice preprocessore in C. Era fondamentalmente C ++, ma il preprocessore ha fatto poco o nessun controllo. L'ha poi usato per scrivere Cfront, la versione più potente del traduttore di C ++ in C, completa di controllo del tipo, tabelle dei simboli, ecc.