Docsity

Compiler Design- Introduction First Lecture, Lecture notes of Compiler Design

Partial preview of the text

Download Compiler Design- Introduction First Lecture and more Lecture notes Compiler Design in PDF only on Docsity!

CSE 331

Compiler Design

Lecture 01

Ahmed Al Marouf

Lecturer, CSE, DIU

What is a Compiler?

Source program Compiler Target program

Target

Program

Input Output

A compiler translate texts from one language to other language.

Hybrid Compiler

Source program Translator

Intermediate program

(byte codes for Java)

Virtual

Machine

Intermediate

program

Output

Input

Some java compiler, just-in-time compilers compile intermediate program just before start the program for faster processing.

Bootstrapping

Develop a system using itself

Structure of a Compiler

Lexical

Analyzer

Syntax

Analyzer

Semantic

Analyzer

Int. Code

Generator

Code Optimizer

Code Generator

S Y M B O L T A B L E M A N G E R
E R R O R H A N D L E R

Front End Back End

Expression to Code Generation Compiler All the phases