Six original Cambridge-style questions on translation software and the stages of compilation, with mark-scheme solutions.
Explain how an interpreter can execute a program without producing a translated version of it.
Describe what happens during the lexical analysis stage of compilation.
Describe what happens during the syntax analysis stage of compilation.
State the stage of compilation at which each error would be detected: (a) the identifier Cost# contains a character that is not allowed (b) a FOR loop has no NEXT (c) the statement Total ← * 3 has two operators together.
Explain the purpose of the optimisation stage and give two examples of optimisation.
The symbol table is used by more than one stage of compilation. Explain how it is used by lexical analysis and by code generation.
Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.