1. Explain the difference between a lexical error and a syntax error. Provide a valid example of each for C++.
2. What does it mean for a grammar to be ambiguous? Explain with examples.
3. Briefly explain what is Just-in-time compilation.
4. In the context of compiler design, what is bootstrapping? What are its advantages?
5. What is the fundamental difference between compilation and interpretation? Briefly explain the advantages of each. List the 3 phases of Front-End Analysis and the 3 phases of Back-End Synthesis.
6. With regard to heap allocation, explain the difference between internal and external fragmentation. Use diagrams if necessary.
7. What is short-circuit evaluation? Explain its usefulness with an example.
8. In terms of binding lifetimes and object lifetimes, what does it mean to have a dangling reference? What about a memory leak? Explain with examples.
9. What is binding and binding time? What are the different times when binding can occur?
10. What is the closest nested scope rule? What are static and dynamic scoping? Explain with examples.