Compiler Construction: Chapter # 1 - Introduction Instructor: Ms. Raazia Sosan
Compiler Construction: Chapter # 1 - Introduction Instructor: Ms. Raazia Sosan
Chapter # 1 - Introduction
Instructor: Ms. Raazia Sosan
About the Instructor
• Name: Raazia Sosan
• Email: [email protected]
2
Course Objectives
• To understand the structure of compilers
• To understand the basic techniques used in compiler
construction such as lexical analysis, top-down, bottom-up
parsing, and intermediate code generation
• To understand the basic data structures used in compiler
construction such as abstract syntax trees, symbol tables,
three-address code, and stack machines
• To design and implement a compiler using a software
engineering approach
3
Course Contents
• Introduction to Compilers
• Lexical Analysis
• Syntax Analysis
• Parsers
• Semantic Analysis
• Intermediate Representation, code generation
• Code generation and Code optimization
• Error Detection and Recovery
• Compiler Implementation
4
Textbook
• Title: Compilers Principles, Techniques and Tools
Author(s)/Editor(s): Alfred V. Aho, Ravi Sethi and Jeffry D. Ulman
Publisher: Addison Wesley Longman, 1986
ISBN: 0- 201- 10088- 6
5
Reference Material
• Title: Modern compiler implementation in C
Author(s)/Editor(s): Andrew W. Appel
Publisher: Cambridge University Press
ISBN: 81-7596-071-X
• Title: Compiler Construction: Principles and Practice
Author(s)/Editor(s): Kenneth C. Louden
Publisher: PWS Publishing Company
ISBN: 0-534-93972-4
• Handouts provided by the instructor
6
Assessment Instruments
Instrument % of Grade
Quizzes (Best 5) 10%
Assignments (Best 5) 10%
Mid term(3) 30%
Final exam 50%
Total 100%
7
Rules & Regulations
• Maintain discipline in class.
• Arrive on time in class. No attendance will be marked after 10 minutes of
the start of the lecture.
• Submit your assignment in proper file with a covering sheet containing
your name, number, course title and number of the assignment.
• Any completed assignment must be handed to the CR on the due date.
After the deadline “zero” will be awarded. You must keep a duplicate copy
of your work because it may be needed while the original is being marked.
• Coursework, laboratory exercises, reports, and essays submitted for
assessment must be your own work. Zero tolerance towards
cheating/plagiarism. Both offenders get F grade. This holds for sessional
exams, assignments, labs and quizzes as well.
8
Language Processor
Language Processor
Compiler Interpreter
9
Compiler
10
Interpreter
11
Hybrid Compiler
12
Preprocessor
Source
Program
Preprocessor
13
Assembler
Assembly
Source Machine
Compiler Language Assembler
Program Readable Code
Program
14
Linker
Linker
15
Loader
Loads
16
C Building Process
17
Language Processing System
18
Structure of a Compiler
Compiler
19
Phases of Compiler
20
Translation
21
Evolution of Programming Languages
22
Reading Assignment
• Read the following sections:
– Compiler Construction Tools
– Optimization for Computer Architecture
– Design of New Computer Architecture
– Program Translations
– Programming Language Basics
23
THANK YOU
24