This document contains an exercise sheet for a compiler construction course. It asks 3 questions: 1) What are the advantages of compilers vs interpreters and vice versa? 2) What advantages are there to using C or JavaScript as target languages for source-to-source compilers? 3) Given a context free grammar, derive strings of 3, 3., and 3.1415 according to the grammar.
This document contains an exercise sheet for a compiler construction course. It asks 3 questions: 1) What are the advantages of compilers vs interpreters and vice versa? 2) What advantages are there to using C or JavaScript as target languages for source-to-source compilers? 3) Given a context free grammar, derive strings of 3, 3., and 3.1415 according to the grammar.
This document contains an exercise sheet for a compiler construction course. It asks 3 questions: 1) What are the advantages of compilers vs interpreters and vice versa? 2) What advantages are there to using C or JavaScript as target languages for source-to-source compilers? 3) Given a context free grammar, derive strings of 3, 3., and 3.1415 according to the grammar.
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