Compiler Construction WS 17/18 Screencast Assignment 1

Compiler Construction, WS1718

Due to multiple requests:

Assignment 1 means:

– code an interpreter for expressions as Albert did in the lecture. Do it test driven. Have tests.

– extend the interpreter to allow power operators like 3^2 or 2^3^5 (it should be left associative, i.e. (2^3)^5 )
or (2+3)^(2*2) which is not the same as (2+3)^2*2 which corresponds to ((2+3)^2)*2 (power shall bind stronger than multiplication

– provide some quick fix, i.e instead of reporting ‘; missing’ just insert it or in our example
3+*4 should complain about the * but instead of computing NaN it may ignore the * and compute 7.
3+ should complain and compute 3
3+42 should complain and compute 7, and so on.