Compiler Construction: Cousins of the Compiler, Properties, and Interpreters, Assignments of Compiler Construction

Slides of compiler construction

Typology: Assignments

2019/2020

Uploaded on 10/29/2020

sohaib-ashraf-butt
sohaib-ashraf-butt 🇵🇰

3

(1)

5 documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSC373-Compiler Construction
Week-1 Lecture-2
Semester-#5 FALL 2019
Prepared by:
Eisha Tir Razia
Lahore Garrison University
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Compiler Construction: Cousins of the Compiler, Properties, and Interpreters and more Assignments Compiler Construction in PDF only on Docsity!

CSC373-Compiler Construction Week-1 Lecture- Semester-#5 FALL 2019 Prepared by: Eisha Tir Razia Lahore Garrison University

Instructor Contact Details

 (^) Instructor Name: Eisha Tir Razia  (^) Course : CSC373- Compiler Construction  (^) Credit Hours: 3  (^) Office Location: CS-Female Staff Room  (^) Email: [email protected]  (^) Visiting Hours: Tuesday 11:00 am to 12:00 pm

Preprocessor

 (^) A source program may be divided into modules stored in separate files. The task of collecting the source program is sometimes entrusted to a separate program, called a preprocessor. The preprocessor may also expand shorthands, called macros, into source language statements

Assembler

 (^) The modified source program is then fed to a compiler. The compiler may produce an assembly-language program as its output, because assembly language is easier to produce as output and is easier to debug. The assembly language is then processed by a program called an assembler that produces relocatable machine code as its output

Loader

 (^) The loader then puts together all of the executable object files into memory for execution

Cont..

Properties of Compiler

 (^) Compiler itself must be bug-free  (^) Machine code is generated in correct form  (^) Generated machine code must run fast.  (^) Compiler itself must run fast  (^) Compiler must be portable  (^) It must gives good diagnostics error messages  (^) The generated code must work well  (^) It must have consistent optimization

Interpreter

 Interpreter is a program that appears to execute a source

program as if it were machine language.

References

Compilers: Principles, Techniques, and Tools By Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman, Contributor Jeffrey D. Ullman, Addison-Wesley Pub. Co., 2nd edition, 2006