

CA448  Compiler Construction 1
Module Aims
The aims of this module are to give students a comprehensive grounding
in the techniques used in the front end of compilers and to give
handson experience in the construction of compiler front ends through
practical examples.
Learning Outcomes
As a result of this module, students will have a good understanding
of the following:
 the function of the different phases of the front end of a
compiler.
 lexical analysis techniques.
 topdown and bottomup parsing algorithms.
 semantic analysis techniques.
Indicative Syllabus
 structure of a compiler
 lexical analysis: regular expressions, DFAs, conversion of regular
expressions to DFAs, implementation of lexical analysers
 syntax analysis: contextfree grammars, derivations, precedence,
ambiguity
 topdown parsing: predictive parsing, conversion of grammars
to predictive form, recursive descent parsing, LL(1) parsing,
constructing LL(1) parsing tables, implementation of topdown
parsers
 bottomup parsing:handles, shiftreduce parsing, LR parsing,
constructing LR(0) parsing tables, constructing SLR(1) parsing
tables, constructing LR(1) parsing tables, constructing LALR(1)
parsing tables, implementation of bottomup parsers
 semantic analysis: contextsensitive analysis, semantic actions,
incorporating semantic actions in topdown parsers, incorporating
semantic actions in bottomup parsers, attribute grammars, symbol
tables, type checking
Assessment
Continuous assessment: 30 % Endofyear exam: 70 %
Indicative Reading List
Essential:
Compilers: Principles, Techniques and Tools, Alfred V. Aho, Monica S. Lam, Ravi
Sethi and Jeffrey D. Ullman, Pearson, 2007 ISBN: 9780321491695
Supplementary:
Modern Compiler Implementation in Java, Second Edition, Andrew W. Appel, Cambridge University Press, ISBN 052182060X
Generating Parsers With JavaCC, Tom Copeland, Centennial Books, 2007
ISBN: 0976221438
