[go: up one dir, main page]

0% found this document useful (0 votes)
34 views5 pages

3what Is Compiler

A compiler is a program that translates source code written in a high-level language into assembly or executable code that a computer can understand. It performs several phases to convert code, including lexical analysis, syntax analysis, semantic analysis, intermediate code generation, optimization, and final code generation. The compiler takes human-readable code and translates it into machine-readable instructions to allow programs to run on hardware.

Uploaded by

gpalanimca
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views5 pages

3what Is Compiler

A compiler is a program that translates source code written in a high-level language into assembly or executable code that a computer can understand. It performs several phases to convert code, including lexical analysis, syntax analysis, semantic analysis, intermediate code generation, optimization, and final code generation. The compiler takes human-readable code and translates it into machine-readable instructions to allow programs to run on hardware.

Uploaded by

gpalanimca
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 5

What is Compiler ?

Definition of Compiler :

A computer program which reads source code and outputs


assembly code orexecutable codeis called compiler.

A program that translates software written in source code into


instructions that a computer can understand Software used to
translate the text that a programmer writes into aformat the
CPU can use.

A piece of software that takesthird-generation language


codeand translates it into a specific assembly code. Compilers
can be quite complicated pieces of software.

Compiler Overview

Consider process of Executing Simple C Language Code

We have opened C Code editor and wrote simple C Program , Whenever we


try to compile code and try to execute code our code is given to the
compiler.

int main() { printf("Hello"); return(0); }

Now our main intention is to convert program into lower level language
which can be read by Machine. Compiler have different phases , and
program undergoes through these 6 phases. After Passing through all the
compilation Phases our code is converted into the machine level language
code which can be read by machine.

Different Phases of Compiler

Lexical Analysis Phase


Syntax Analysis
Semantic Analysis
Intermediate Code Generation
Code Optimizer
Code Generation

You might also like