Home > Back-end >  Questions about the compilation principle
Questions about the compilation principle

Time:10-18

Just started learning compiling principle this course, thought of a problem:
1. The compiler to compile a program written in a high-level language, connection to generate an executable file, the program to run, but the compiler itself is a program, so it is who build connection?
2. I have heard of "transplant", another senior L2 can use L1 language compiler, but at the beginning of the compiler must be written in machine language or assembly?
Please break down! Thank you ~

CodePudding user response:

The first compiler must be written machine language, but it is not perfect, should be roughly: machine language to write just can compile the compiler, after by the assembly language compiler to compile the C compiler and more perfect assembler language compiler, and then mixed assembly language by C language compiler compiler out more advanced compiler

Remember there is one of the earliest CSDN compiler is what kind of articles, said the compiler was not perfect and the operation of difficult

CodePudding user response:

Should, of course, the first of the so-called assembly language is a general statement, might be one of the more simple auxiliary machine code generation tool eventually improve step by step

CodePudding user response:

Telegraph operator to send and receive telegraph code and machine code is the same thing, that is memory of 0 s and 1 s machine code is not very difficult, but now the programmers do not even want to return to the ancient arrived, because the machine is written by dedicated hardware devices, this equipment is now even the processor manufacturer also is hard to say

CodePudding user response:

This problem is a little meaning, tools and products development promote each other, the tool itself is part of the product, like lathe, lathe own parts are made by lathe, but in the history of the first lathe parts should be pure made by hand,

CodePudding user response:

Every compiler doesn't fully support programming specification project... And compilers have flaws caused by a Bug... So sometimes on programming skill to avoid a potential problem... Many programmers don't know the fact...

In this world... With the existence of life is a miracle... But... In this world... After all, is not perfect... But can the pursuit of excellence is perfected...
  • Related