Programming Languages and Compilers

 

Lecture 2

 

In this lecture we will look at a high level way of understanding language processors and we shall look a bit deeper into what is inside a compiler. The slides for this lecture can be found here and here.

 

Literature

 

Watt and Brown, chapter 2 and chapter 3.

 

Exercises

 

Exercises for lecture 2 will be done from 8.15 till 10.00 before Lecture 3 on Wednesday the 25th of February.

 

  1. Do Watt and Brown exercise 2.2 page 52
  2. Do Watt and Brown exercise 2.4 page 53
  3. Do Watt and Brown exercise 2.9 page 54
  4. Do Watt and Brown exercise 2.1 page 52
  5. Do Watt and Brown exercise 3.2 page 71
  6. Do Watt and Brown exercise 3.3 page 71
  7. Do Watt and Brown exercise 3.5 page 71
  8. Do Watt and Brown exercise 3.6 page 72
  9. Do Watt and Brown exercise 3.4 page 71
  10. If you haven’t done exercise 11 from lecture 1 by downloading the Triangle compiler and TAM virtual machine, do so now!
  11. Take a look at the Java source code for the Triangle compiler starting with the file Compiler.java in the Triangle directory.