Institutt for Informatikk
Universitetet i Bergen
INF 225 - Innføring i Programoversettelse - H05


Voluntary Exercise Set 1 (Group meeting 29.08.2005)

  1. Show the stream of tokens for the C- program in Figure 1.5 on page 27 of the text. For each token, give an appropriate token name. For tokens that are either identifiers or numbers, show the string value as well as an appropriate token name.

  2. Exercise 2.1 parts a and h on page 91 of the text.

  3. Exercise 2.5 on page 91 of the text.

  4. Exercise 2.8 parts b, d, and f on page 91 of the text.

  5. Exercise 2.9 on page 91 of the text.

  6. Draw a DFA that accepts all strings from the alphabet {a, b, c} containing a number of a's that is a multiple of 4.

  7. Draw a DFA that accepts all binary numbers that are divisible by 5. Try this problem on your own first. If, after attempting the problem on your own, you need a hint, click here.