You are on page 1of 7

Compilers Principles, Techniques and Tools

2nd Edition

Chapter-1

Introduction
Instructor
Shagufta Riaz
What is a Compiler?
 A compiler is a computer program that
translates a program in a source language into
an equivalent program in a target language.

 A source program/code is a program/code written in the


source language, which is usually a high-level language.
 A target program/code is a program/code written in the
target language, which often is a machine language or an
intermediate code.

2
What is Interpreter?
 An Interpreter is a computer program
that reads a source program and
produces the results of executing that
program.

3
Compiler Vs Interpreter

4
Answer These Questions
 Why we need compiler?
 What are the high- or low-level
languages?
 Difference b/w Assembly and Machine
language.
 What is the language of computer ?
 Why we feel easy in high level language ?

5
A Language Processing
System / Cousins of a Compiler

6
Phases of a Compiler

You might also like