西西河

主题:【原创】语言编译器等请教 -- 中国农民

共:💬62 🌺30 新:
全看分页树展 · 主题 跟帖
家园 IMHO

Sorry first since I cannot input Chinese in my office machine:( It's something like when you install GCC on your linux box (like 3 ~ 5 years ago), you have to install a bootstrap gcc first, then use that to compile your real gcc compiler (or the latest gcc compiler). And then after that, you can compile your C/C++ program using the "real" gcc compiler.

So at the beginning, there is only machine code, then the assembly language (you can use assembler to generate machine code). The first assembler had to be programmed using machine code. But after that, programmers can create better assemblers using the very first assembler. Then it comes to the so called "advanced programming language" era, some guys used the assembler (along with some machine code when necessary) to create a first compiler for an advanced programming language. After the first compiler works, programmers then could use that first compiler to create a better compiler. Just like now you can use yacc/lex to create a compiler/interpreter for some of your own languages:)

Just like the "Tao".....:D

全看分页树展 · 主题 跟帖


有趣有益,互惠互利;开阔视野,博采众长。
虚拟的网络,真实的人。天南地北客,相逢皆朋友

Copyright © cchere 西西河