I can't undestand the compiler topic. When, for example a compiler C, is implemented with C language, isn't it caused a loop? C calls C calls C .... Thanks in advance
Asked
Active
Viewed 74 times
1
-
@hamedbaziyad What code? The question is about a basic theoretical issue in compiler construction. If you don't understand it, leave it to those who do. – user207421 Feb 10 '20 at 08:43
-
1Possibly better duplicates: [Writing a compiler in its own language](https://stackoverflow.com/questions/193560/implementing-a-compiler-in-itself) and [Bootstrapping a language](https://stackoverflow.com/questions/13537/bootstrapping-a-language) – rici Feb 10 '20 at 14:25
-
No reason to downvote this question, it's perfectly reasonable. – user207421 Feb 11 '20 at 02:21
1 Answers
-1
A compiler takes a given programming language and converts it to Machine Code. For example, a program written in C will be compiled down to machine code and then perform a task. If you write another compiler, the previous compiler (now in machine code) will compile that compiler down to machine code again.

Baron Of Clubs
- 19
- 1
-
Thanks , Yes I know, but for C language, we can write a compiler using C code, so for running this compiler, we need C compiler again, I mean we need compiler C for running an implemented Compiler C – M Rezaei Feb 10 '20 at 08:42
-
@MRezaei Somewhere back in the past there needs to have been a C compiler written in a different language:possibly for a subset, and possibly in assembler. See the duplicate. – user207421 Feb 10 '20 at 08:45