User Tools

Site Tools


Compilers Exam, 2017-01-20

Programming Part

The following tasks should be solved in the order below. Write tests for each step!

  • Grade 2: Add new regular expressions to the lexer for each required token of a loop construct of the following form:
    for i in 10 .. a+20 do
  • Grade 3: Add the new loop construct to the grammar.
  • Grade 4: Change the format of identifiers in the language as follows:
    • Identifiers can contain letters and digits.
    • Letter cannot follow a digit.
  • Grade 5: Extend the semantic analysis:
    • The type of the variable of the for loop must be integer.
    • The type of the lower and upper bound expressions have to be integer.
compilers/exam20170120.txt · Last modified: 2017/01/20 10:14 by deva