Module Identifier CS24210  
Module Title SYNTAX ANALYSIS AND TOPICS IN PROGRAMMING  
Academic Year 2001/2002  
Co-ordinator Dr Mark Ratcliffe  
Semester Semester 2  
Other staff Dr Edel Sherratt  
Co-Requisite CS21120  
Mutually Exclusive CS34210  
Course delivery Lecture   22 lectures  
  Workshop   (Up to) 4 workshop sessions  
  Practical   (Up to) 4 x 2 hr sessions  
Assessment Supplementary examination   Will take the same form, under the terms of the Department's policy.    
  Exam   2 Hours Written examination   100%  
Further details http://www.aber.ac.uk/compsci/ModuleInfo/CS24210  

General description


This module aims to familiarise students with the concepts required for specifying and implementing programming languages, and to study their practical applications in a variety of contexts.

Aims


This module aims to familiarise students with the concepts required for specifying and implementing programming languages.

Learning outcomes


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

Syllabus


1. Overview of Language Processing Software - 1 Lecture
Editors, compilers, static analysers, interpreters, text formatting, scripting languages.


2. The structure of a typical compiler - 1 Lecture
Lexical, syntactic and semantic analysis; Optimisation and code generation; Implementation; Symbol tables


3. Lexical Analysis - 4 Lectures, 2 Practicals
Lexemes and tokens; Regular Expressions; Finite Automata; Practical use of a scanner generator


4. Syntactic Analysis - 3 Lectures, 2 Practicals
Context free grammars; Parse trees and abstract syntax trees; Parsing strategies (recursive descent, LL, LR); Practical use of a parser generator


5. Intermediate Languages - 2 Lectures
Abstract syntax trees; Reverse polish notation; 3-address code; Attribute grammars and structural attributes


6. Semantic Analysis - 2 Lectures
Different kinds of semantic analysis; Attribute grammars and semantic attributes


7. Code generation - 3 Lectures
Aims of code generation; Memory management, instruction selection and register allocation; Flow graphs; A simple code generator


8. Optimisation and Optimising Compilers - 2 Lectures
Optimisation of source, intermediate and target code; Safety and profitability of optimisation; Flow graphs and optimisation of intermediate code


9. Applications of Compilation Techniques - 4 Lectures
Markup languages; scripting languages;

Reading Lists

Books
** Recommended Text
A.V. Aho, R. Sethi, and J.D. Ullman. (1986) Compilers: Principles, Techniques and Tools. Addison-Wesley 0201100886
** Should Be Purchased
J. Bennett. (1996) Introduction to Compiling Techniques: a first course using ANSI C, lex and Yacc. McGraw-Hill 007709221X