Introduction. Here is the first (of two) assessed exercises. It consists of three tasks.

  • Task 1 (worth 20%) is here.
  • Task 2 (worth 40%) is here.
  • Task 3 (worth 40%) is here.

The necessary Java files for all three tasks can be found for convenient download here:

The webpages describing the three tasks also feature download links to individual files. It is probably easier to download them in bulk

This coursework is about writing (parts of) a compiler front-end. Task 1 is a warm up that seeks to solidify your understanding about using FSAs to scan a string (which is the algorithmic essence of lexing). Task 2 asks you to write a lexer for the programming language described here and Task 3 is about parsing the token list output by the lexer in Task 2. The grammar used in Task 3 is for a subset of the language.

When and how to submit. The first assessed exercise is due Friday 8 November 2019 at 18:00. To assure anonymity, please submit via the course's Canvas page, where I will set up a submission link. For submission guidelines see here.