







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Slides of compiler construction
Typology: Assignments
1 / 13
This page cannot be seen from the preview
Don't miss anything!








CSC373-Compiler Construction Week-1 Lecture- Semester-#5 FALL 2019 Prepared by: Eisha Tir Razia Lahore Garrison University
(^) 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
(^) 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
(^) 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
(^) The loader then puts together all of the executable object files into memory for execution
(^) 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
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