Worked solution from the System Software Paper 3 Advanced Theory booklet, Part 2 of 2.
Lexical analysis is the first stage of compilation. Write any four of these:
It is the first stage of compilation [1]
White space and comments are removed [1]
The source code is broken into a series of tokens [1]
Each token is given a type (categorised) [1]
Other points that score: identifiers are stored in a symbol table; invalid tokens give an error; good tokens pass to the syntax analyser (only 4 marks available).
▶ Topic lesson
A lesson on this topic · by Craig'n'Dave. Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.