Department of Computing

Local Navigation

COMP332 Programming Languages

Lecture Notes

All lecture notes / slides / support materials for the lectures of this unit will be posted to this page, and in most cases we will endevour to do that before each lecture is given.

Please note: The materials posted here are intended to act as a supplement to the unit text, Programming language pragmatics (2nd Edition) by Michael L Scott, Morgan Kaufmann, 2006. They do not cover every topic in detail, and should only be used in conjunction with the textbook.

The audio of all lectures this semester will be recorded and made available for download from the COMP332 Moodle website. These can be a useful reminder of what went on in a particular lecture, but again please don't rely on them as your only source of lecture information. Much of what goes on in the lectures is visual in nature and is, therefore, not recorded on these audio recordings.

Language of the Week

When we have time in a week, we like to run a lecture segment called "language of the week". This is an opportunity to briefly introduce an unfamiliar programming language to you, and to have a bit of fun thinking about the (sometimes peculiar) facilities that different languages present to the programmer. While we hope you will find out more about the languages we discuss in this segment, and even experiment with a couple of them by downloading a compiler/interpreter and writing some simple code, this material is not examinable.

Week Topic Readings
week 1
from Aug 4

Introduction to programming languages and implementation.

Programming language syntax: specification and recognition.

Chapter 1 of Scott text. Sections 2.1-2.3.3
Lecture notes: Introduction; Specifying Syntax; SPARC programming; Quicksort in C; Quicksort in Haskell; Dom's Lecture Slides

Language of the week: Forth

week 2
from Aug 11
Programming language syntax: specification and recognition (cont).

Sections 2.1-2.3.3 of Scott text.
Lecture notes: Specifying Syntax; Scanners ; Parsers; Obr syntax specification

week 3
from Aug 18
Programming language syntax: specification and recognition (cont).

Sections 2.1-2.3.3 of Scott text.
Lecture notes: Specifying Syntax; Recursive descent parsing; Shift-reduce parsing

Extra notes on recursive descent parsing

FIRST and FOLLOW sets - a worked example

week 4
from Aug 25

Names, scopes and bindings.

Sections 3.1-3.6.3 of Scott text.
Lecture notes: Names, scopes and bindings
lecture slides 1.

week 5
from Sep 1
Semantic analysis and attribute grammars.

Sections 4.1-4.4, 4.6 of Scott text.
Lecture notes: Semantic analysis; Implementing Semantic Analysis.
Dynamic / static scope examples: static scope in scheme and dynamic scope in emacs lisp - have a look at the comments in these files to remined you of the behaviours we observed in the lectures.

week 6
from Sep 8
Semantic analysis and attribute grammars.

Sections 4.1-4.4, 4.6 of Scott text.
Lecture notes: Semantic analysis; Implementing Semantic Analysis.

week 7
from Sep 15
Data types.

Sections 7.1-7.8, 7.10 of Scott text.
Lecture notes: Data types
Lecture slides: Data types slides

from Sep 22
to Oct 5
recess recess
week 8
from Oct 6
Labour day public holiday - no lecture.
week 9
from Oct 13
Translation and code generation.

Sections 14.1-14.3 of Scott text.
Lecture notes: Translation and Code Generation
Supplemental code generation slides.

week 10
from Oct 20
Control flow.

Sections 6.1-6.6 of Scott text.
Lecture notes: Control Flow

week 11
from Oct 27
Subroutines and control abstraction.

Sections 8.1-8.6 of Scott text.
Lecture notes: Subroutines and Control Abstraction
Dom's lecture slides on procedures and control abstraction.

week 12
from Nov 3
Assembly, linking and loading.

Sections 14.5-14.7 of Scott text.
Lecture notes: Assembly, linking and loading

week 13
from Nov 10
Review and Revision.



Comments to: domv@ics.mq.edu.au

Copyright & Site information

  • CRICOS Provider No 00002J, ABN 90 952 801 237
  • Authorised by: HOD