CC lec 1
CC lec 1
CONSTRUCTIO
N
Lecture # 1
PRE-REQUISITE
Theory of automata
RECOMMENDED BOOKS
Compilers: Principles, Techniques and Tools, Alfred v.Aho, Ravi Sethi ,
Jeffrey D.Ullman.
Modern Compiler Design, D. Grune, H. E. Bal, C. J. H. Jacobs, K. G.
Langendoen,
John Wiley, 2003.
Modern Compiler Implementation in C, A. W. Appel, M. Ginsburg,
Cambridge University Press, 2004.
COURSE OBJECTIVES
At the end of the course:
you will know the basic theories and methodologies behind the
construction of a compiler
you should be able to understand the basic issues related to compilers
construction.
TODAY'S LECTURE
Introduction to Compiler
Exercise
INTRODUCTION TO
COMPILERS
Programming languages are notations for describing computations to
people and to machines.
The world as we know it depends on programming languages, because all
the software running on all the computers was written in some
programming language.
But, before a program can be run, it first must be translated into a form in
which it can be executed by a computer.
The software systems that do this translation are called compilers.
WHY STUDY COMPILER?
Build a large ambitious software system.
See theory come to life.
Learn how to build programming language.
Learn how programming language works.
Learn tradeoffs in language design
HISTORY
1940s: computers programmed in assembly
1951-2: Grace Hopper developed A-0 for the UNIVAC I
1957: FORTRAN compiler developed by team led by John Backus
1960s: development of the first bootstrapping compiler for LISP
A MORE FORMAL
DEFINITION OF COMPILER
It is a software program that
converts a program written in HLL
(Source Code) into low level
language (target or object code).
Also reports errors in programs
(Debugging).
LANGUAGE TRANSLATORS
A program that translates between high level languages is usually called a
language translator ,source to source translator ,language converter,or
language rewriter
This last term is usually applied to translations that do not involve a change
of language