Skip to main content

Trinity College Dublin, The University of Dublin

Menu Search

Module Descriptor School of Computer Science and Statistics

Module CodeCS3071
Module NameCompiler Design I
Module Short Title
Semester Taught
Contact Hours

Lecture hours: 30, Lab hours:11, Tutorial hours: 3

Module PersonnelJohn Waldron
Learning Outcomes

On successful completion of this module students should be able to:

•design lexical analysers based on finite-state automata;

•design top­‐down parsers based on push-down machines;

•design l-attributed translation grammars to specify the semantic
processing of high‐level programming language constructs;

•design a recursive-­descent parser for any given LL(1) grammar;

•use Coco/R—a compiler generator tool—to construct lexical analysers and recursive descent parsers for high‐level programming languages.

Learning Aims

To teach the principles of compiler design.

Module Content

After a brief introduction to the subject, the first few classes will be devoted to the study of finite-state automata and their use in the design of efficient lexical analysers based on reduced (minimal) machines. This will be followed by an in-­depth study of syntax analysis (with an emphasis on top‐down parsing methods) based primarily on principles of attributed translation. The final few classes will be devoted to the study of some basic code generation techniques along with a selection of associated run­-time implementation issues.

Tutorial exercises will be incorporated into lecture periods throughout the course, and students will be introduced to the more practical side of compiler construction during the weekly laboratory sessions.

There will be five significant pieces of graded coursework, each of which will involve aspects of compiler design and implementation based on the material covered in lectures.-­‐

Recommended Reading List

Compiler Design Theory, Philip M Lewis, Daniel J Rosenkrantz and Richard E Stearns, Addison Wesley, 1976

The Compiler Generator Coco/R User Manual, Hanspeter Mossenbock,

Module Prerequisites

A basic understanding of machine architectures along with a thorough knowledge of programming in both assembly language and in high level programming languages such as C, C#, C++ or JAVA

Assessment Details

Examination 80%, coursework 20%.

Assessment the supplemental examination is by written paper which

contributes 100% to the overall mark; there is no coursework component.

Examination duration two hours.

Module Website
Academic Year of Data