Compiler Designs and Constructions

Download Report

Transcript Compiler Designs and Constructions

Compiler Designs and
Constructions
Chapter 1: Introduction
Objectives:
Course Objectives
 Introduction

Dr. Mohsen Chitsaz
Chapter 1: Introduction
1
Objectives of COSC 470/570
A. Theoretical Computer Science Topics:
1.
2.
3.
Theory of Computability
Theory of Formal Languages
Automata Theory
B. Compiler
C. Software Engineering
1.
2.
Large Project
Update, Modification of a project
Chapter 1: Introduction
2
Introduction
Translator
Source Program ======= Object Program
Source Code
Object Code
Type of Translator:



Assembler
Interpreter
Compiler
Chapter 1: Introduction
3
Introduction
Source Program (A)  Compiler  Target Program (B)
Error
Chapter 1: Introduction
4
Preparation for Execution
Source Code
Preprocessor (Front End)
Compiler
Code Optimization
(Code Generator) Back End
Assembler
Loader/Linker
Library Object Files
Absolute Machine Code
Chapter 1: Introduction
5
Compiler
Source Program
Scanner (Lexical Analyzer)
Parser (Syntax Analyzer)
Semantic Analyzer
Intermediate Code Generation Code
Code Optimizer
Symbol Table
Code Generator
Error Handling
Target Program
Chapter 1: Introduction
6