025. OCR A Level (H446) SLR5 – 1.2 Stages of compilation
About this video
OCR Specification Reference
A Level 1.2.2e
When a program is compiled it goes through various stages to make it ready for execution, in this video we talk about the various stages and explain what happens during each one.
Key question:
- What happens during the different phases of compilation?
00:00 Stages of compilation
00:11 Intro
00:16 The stages of compilation
00:52 The four stages of compilation
01:07 Stage 1: Lexical analysis
05:30 Going beyond the specification
05:41 Stage 1: Lexical analysis continued
06:30 Stage 2: Syntax analysis
07:20 Checking the syntax
09:58 Create an abstract syntax tree
10:28 Update the symbol table
10:47 Going beyond the specification
10:58 Stage 2: Syntax analysis continued
11:34 Stage 3 and 4: Code generation and optimisation
12:19 Redundant instruction elimination
13:25 Unreachable code
14:08 Flow or control optimisation
14:52 Summary
15:11 Key question
15:21 Outro
Last updated: 23.03.26