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

Compiler construction I

Excercise sheet 1

1. What are the advantages of:


1. A compiler over an interpreter?
2. An interpreter over a compiler?
2. A compiler that translates a high-level language into
another high-level language is called a source-to-source
translator. What advantages are there – in your opinion
– to using C as a target language for a compiler? What
advantages are there to using JavaScript?
3. In this course, nonterminal symbols are represented by
uppercase letters, terminal symbols by lowercase letters
(or symbols). Consider the following context free
grammar:
S -> N
N -> N D | D
D -> 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | .
Determine a derivation for the strings:
1. 3
2. 3.
3. 3.1415

You might also like