What is a Compiler?Types of Compiler

What is a Compiler? Types of Compiler with full detail.


What is a Compiler?

Common types of compiler

  • Decompiler
  • Cross-compilers
  • Language translator
  • Source-to-source compilers
  • Byte code compilers
  • Hardware compilers


What is a Compiler:

A compiler is a program that is written in a particular programming language. This program change code or machine language into the source code and vice versa.Further, this code is used by a computer’s processor. Mostly, the programmer writes compiler code in language.E.g Pascal or C-language using an editor.
The programming file that is created contains the source statements. The further programmer runs the appropriate language compiler. A programmer also specifies the name of the file that contains source statements.
Such(compiler) a program that helps to translates source code into object code.

There are many other translators that help to change source code into object code. As the compiler reads the entire source code. After reading the source code compiler collects and reorganize the instructions. So this is the reason why the compiler is different from an interpreter. As interpreter analyzes and executes each line of source code.
The compiler needs time to execute the required instruction.

Interpreters execute instruction fast than the compiler. But, programs read by compilers run faster than the same written by an interpreter.


What is a Compiler


Common Types of the compiler:

Following are some common types of compiler


Such a type of compiler that helps to converts machine language into high-level natural language.


Such a type of compiler that produces the object code into executable form to run on a system.

Language translator:

A compiler that converts one programming language into another language.

Source-to-source compilers:

A compiler that changes the high-level language into high-level language. First, take as input and second as outputs.

Byte code compilers:

This compiler change assembly language of a theoretical machine such as Prolog implementations

Hardware compilers

Such a compiler whose output is in a description of the hardware configuration. It does not show a sequence of instructions.




As you read what is a compiler and its common types, You can read more about:

What is Wide Area Network

Types of Topology

All detail of Spiral Model