All posts by Albert Zündorf

Compiler Construction, WS0910

On the next 2 Fridays (Nov. 13th & Nov. 20th) there will be no lecture. The deadline for homework #4 will be Friday, Nov. 27th. There was no exercise today, instead the exercise covering homework #4 will be held in place of the lecture on Friday, starting 10:15!

To summarize, the next dates are:

  • Friday, Nov. 13th, 10:15 – Exercise for homework #4
  • Friday, Nov. 27th, 10:15 – Deadline for homework #4 and next lecture
Compiler Construction, WS0910

Please implement the following extensions to your interpreter:

  • identifiers longer than one character
  • floating point numbers

To do this, you have to implement a simple scanner, as demonstrated in the lecture. Create a Token class which contains information about a word. Tokens are created by the scanner using a finite automaton and then interpreted by the parser. As usual, create tests first!

I was asked what the criteria for evaluation of the homeworks are. The tests are very important, as is a consistent and readable code style. If the functionality is complete and working, and the tests make sense and cover most of the implementation, you will get full score. Comments are welcome, but not required, and I prefer meaningful method and variable names. In extreme cases, I may deduct points for code I’m not able to comprehend, so keep it simple 🙂