Lexical analysis and syntax analysis are stages in the compilation of a program.
- (a)Identify two other stages that take place during the compilation of a program.[2]
- (b)Outline the purpose of syntax analysis.[2]
Mark scheme
Marking points from the official mark scheme (Oct/Nov 2022). The mark or mark type is shown in brackets.
- [1] (a) One mark per point • Code generation
- [1] (a) • Optimisation
- [1] (b) One mark per point (Max 2) • It checks that the code matches the grammar of the language // It checks that the tokens conform with the rules of the programming language
- [1] (b) • Syntax errors are reported
- [1] (b) • A parse tree is produced.
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →