Manual on Compiler | Saint Paul University

Only available on StudyMode
  • Download(s) : 87
  • Published : May 30, 2013
Open Document
Text Preview
Compiler Design


COURSE CODE AND TITLE: ITED 308 - Compiler Design COURSE DESCRIPTION: This is a three-unit course. This course is designed as an introduction and construction of compilers and interpreters. It will open with a discussion of translators related to compilers, followed by an overview of the phases and data structures involved in compilation. Topics including lexical analysis, parsing, semantic analysis, code generation, and optimization will then be covered in depth with a series of projects assigned to illustrate practical issues. The performance of the student will be evaluated according to quizzes, machine problems, and term project and modular examinations. PREREQUISITES: - CS 19C – Numerical Method OBJECTIVES: General Objective: To study the theory and techniques of compiler construction. The student completing the course should have gained an understanding of the major ideas and techniques in compiler writing and a further development of programming skills. Specific Objective: - To explain the basic concepts and principles of compiler. - To discuss the problem issues in designing and implementing lexical analyzers. - To listen critically and purposively to the basic concepts of compiler. - To participate actively in the group term project. - To construct a program that act as a recognizer for the set of strings defined by a regular expression or context-free grammar. COURSE CONTENT: Module I. II. III. Title Introduction to Compilers ------------------------------------Lexical Analysis ---------------------------------------------The Syntactic Specification of Programming Languages ---------Pre-Midterm Examination IV. V. Basic Parsing Techniques -------------------------------------Syntax-Directed Translation ----------------------------------Midterm Examination VI. VII. VIII. Symbol Tables ------------------------------------------------Run-Time Storage ---------------------------------------------Error-Detection and Recovery ---------------------------------Pre-Final Examination IX. X. Introduction to Code Optimization ----------------------------Code Generation ----------------------------------------------Final Examination 52 60 37 42 48 27 31 Page 2 6 11

Saint Paul University – San Nicolas Campus

Compiler Design




Compiler writing spans programming languages, machine architecture, language theory, algorithms, and software engineering. Fortunately, a few basic compilerwriting techniques can be used to construct translators for a wide variety of languages and machines. A Compiler is a program that reads a program written in one language – the source language – and translates it into an equivalent program in another language – the target language as illustrated in Figure 1.1 in which the important part of the translation process is that the compiler reports to its user the presence of errors in the source program. target source compiler program program error messages Figure 1.1 A Compiler At first glance, the variety of compilers may appear overwhelming. There are thousands of source languages, ranging from traditional programming languages such as Fortran and Pascal to specialized languages that have arisen in virtually every area of computer application. Target languages are equally as varied; a target language may be another programming language, or the machine language of any computer between a microprocessor and a supercomputer. A compiler translates a source program into machine language. An interpreter program reads individual words of a source program and immediately executes corresponding machine-language segments. Interpretation occurs each time the program is used. Thus, once it has been compiled, a program written into a compiled language will run more quickly than a program in an interpreted language. An interpreter is a computer program that translates commands written in a high-level computer language into...
tracking img