compiler and their types

patchamounika7 30,210 views 10 slides Sep 22, 2015
Slide 1
Slide 1 of 10
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10

About This Presentation

compilers and types i.e one pas,multi pass,etc and thier phases including and properties


Slide Content

Compilers and types of compilers

Contents: Definitions Phases of compiler Types of compilers

Definition: I t is a program which a cts as a translator, transforming human-oriented programming languages into computer-oriented machine languages. Ignore machine-dependent details for programmer

What do compilers do? Compilers may generate three types of code: Pure Machine Code Machine instruction set without assuming the existence of any operating system or library. Mostly being OS or embedded applications. Augmented Machine Code Code with OS routines and runtime support routines. More often Virtual Machine Code Virtual instructions, can be run on any architecture with a virtual machine interpreter or a just-in-time compiler Ex. Java

Retargetable compiler A compiler that can be easily modified to a compile source code for different source code model. All these about the types of compilers that work on different languages such as c++, Java,c etc.

Thank you

Phases of a compiler: There are mainly 6 phases in a compiler, as these phases help in converting the H.L.L in to the machine code. The phases of a compiler are 1.lexical analysis 2.syntax analysis 3.semantic analysis 4.intermediate code generator 5.code optimizer 6. code generator All these phases convert the source code by dividing in to tokens, creating pare trees, and optimizing the source code by different phases.

Phases of a compiler

Types of compilers: Native code compiler T he compiler used to compile a source code for same type of platform only. Cross compiler The compiler used to compile a source code for different kinds platform. Source to source compiler the compiler that takes high-level language code as input and outputs source code of another high-level language only.

One pass compiler It is a type of compiler that compiles the whole process in only one-pass. Threaded code compiler T he compiler which simply replace a s tring by an appropriate binary code. Incremental compiler T he compiler which compiles only the changed lines from the source code and update the object code . Source compiler The compiler which converts the source code high level language code in to assembly language only
Tags