An interpreter translates high-level code.
State what happens to the translation of a program when an interpreter finds a syntax error.
Mark scheme
Award one mark for any of the following:
- Translation/execution stops (when the error is found) / the rest of the program is not translated/executed (1)
Allow stops/terminates/halts when the error is found
Do not accept shows/displays an error message on its own
Do not accept the whole program is translated and errors are reported at the end
Do not accept translates line by line on its own
Example answers and how they were marked
The translation stops as soon as the error is found, so the rest of the program is not translated.
Why: Translation stops when the error is found (1).
An error message is displayed.
Why: Only an error message; it does not say translation stops, and the scheme does not accept a displayed error message on its own.
The whole program is translated and all the errors are reported at the end.
Why: Describes a compiler; the scheme does not accept errors being reported at the end of translating the whole program.