Which language is used to write Compilers?

A Computer is an Electronic machine that we know. These devices are stupid, they do not understand the characters we use to communicate and express our feelings. They only work on the power supply we provide and manipulate them accordingly.

Which language is used to write Compilers?

How does the computer understand our Commands?

Whatever we do on our computers is interacting with the software. And that software posts our commands to computer hardware where that command has to be processed. Softwares are created with the help of some programming languages. But how does hardware understand that code?

The codes we write on a computer are not understandable by the hardware of the computer system. So it has to be converted into a more machine-friendly language that the system hardware can understand, i.e., the binary code(0,1).

The Compiler

A compiler converts human-understandable code in any programming language into a machine-understandable language, i.e., the binary(0,1). So that the computer can read the information and carry out the operations and generate an output.

Every time you compile any code in your system, you will find that a temporary executable file gets generated in that folder along with the program code. It helps the computer system to execute the program that you want to perform through the code.

If a compiler helps in reading programming languages, then how is a compiler created? Which language is used to write compilers? Let's find out.

Which language is used to write Compilers?

The language selected for implementing a compiler is often based on the availability of an existing compiler, the expertise of the development team, and some other external factor. One of the first compilers I heard about was written in Fortran to implement the Jovial (ALGOL-like) programming language.

Also, there are compiler toolkits, libraries, and frameworks which are used by any languages's compiler implementations. The languages used to implement these toolkits, libraries, and frameworks varies. LVVM, for example, is largely written in C++, but is used to implement compilers for a variety of languages.

The End Notes

Nothing is magic in the word of computers. Computers are dumb machines and they need orders to do some task. I hope you find this article useful. If yes? Leave a comment down below. And do share this article with your friends, mates and buddies. Because TheNotes is free and will be forever. Have a good one.


Post a Comment