Stages of Compilation (OCR A-Level Computer Science): Quizzes
📚Quizzes
Practise the questions
12 questions from this quiz
ShowHide
Practise the questions
12 questions from this quiz
How many main stages are there in the compilation process?
How many main stages are there in the compilation process?
Four
What is the primary purpose of lexical analysis?
What is the primary purpose of lexical analysis?
Break code into tokens
Which elements are removed during lexical analysis?
Which elements are removed during lexical analysis?
Whitespace and comments
What are tokens in lexical analysis?
What are tokens in lexical analysis?
Atomic units like keywords
What is created during lexical analysis to track identifiers?
What is created during lexical analysis to track identifiers?
Symbol table
What does syntax analysis check?
What does syntax analysis check?
Token sequence follows syntax rules
What structure is built during syntax analysis?
What structure is built during syntax analysis?
Abstract Syntax Tree
When are syntax errors identified?
When are syntax errors identified?
During syntax analysis
What does code generation convert the AST into?
What does code generation convert the AST into?
Machine code or object code
Is the code produced by code generation platform-dependent?
Is the code produced by code generation platform-dependent?
Yes, varies by architecture
What does optimisation aim to improve?
What does optimisation aim to improve?
Execution time and memory usage
Which optimisation technique condenses repeated operations?
Which optimisation technique condenses repeated operations?
Loop optimisation
