Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Department of Electrical Engineering,

Media Technology and Computer Science TECHNISCHE


SS 2019 HOCHSCHULE
Prof. Dr. Peter Faber DEGGENDORF

Examination for Formal languages and


compiler construction I
Platzziffer:

General advice:

• Please take care to read the exercises completely.


• Please always provide the complete approach to the solution.

Exercise 1 (Languages and automata) [7 Points]

Consider the language L = {i n o|0 ≤ n ∈ N}.

(a) Construct a finite automaton that accepts exactly L (no proof necessary).

Exercise 2 (LR(0)-items) [18 Points]

Consider the augmented grammar G = (T , N , P , S ′ ) with T = {1, 0}, N = {S , S ′ , I , O}


and P defined by:
S′ → S
S→ I O
I → I 1
I → 1
O→ 0

(a) Which word is the shortest one that can be produced using that grammar?
(b) Construct the canonical set of LR(0)-items for this grammar.

You might also like