CCEA A-Level Digital Technology 2650
Systems Analysis and Development Approaches
Design, Development and Testing
Implementation and System Security
Programming
Data, Information and Data Representation
Computer Architecture and Processing Systems
System Software, Application Software and the User Interface
Web Technology and Multimedia
Networks
Databases
Artificial Intelligence, Expert Systems and Robotics
Mobile Technology, Data Mining and Cloud Computing
Individual, Social and Legal Considerations
The Development Project: Analysis and Design
The Development Project: Build, Testing and Evaluation
Programming
The stages of compilation and linking
- 3 things to know
- AS Unit 1
Overview
Main stages a compiler works through, symbol table and syntax error.
What you need to know
Answer each one before you reveal it.
What happens during code generation?
Why can a compiler never detect a logic error?
Questions from this subtopic
Each one with the model answer underneath.
- 1
Name the main stages a compiler works through.
Model answer
A compiler carries out lexical analysis, syntax analysis, semantic analysis, code generation and code optimisation.
- 2
What happens during lexical analysis?
Model answer
Lexical analysis reads the source character by character and groups it into tokens such as keywords, identifiers, operators and constants, discarding comments and unnecessary spaces.
- 3
What is a token?
Model answer
A token is the smallest meaningful unit of source code recognised by a compiler, such as a keyword, an identifier, an operator or a literal value.
- 4
What is the symbol table, and what is held in it?
Model answer
The symbol table is a store the compiler builds during translation, holding every identifier used in the program together with its data type, its scope and the memory address eventually allocated to it.
- 5
What does syntax analysis check?
Model answer
Syntax analysis checks that the sequence of tokens obeys the grammar rules of the language, building a structure that represents the program and reporting any statement that breaks those rules.
- 6
What is a syntax error? Give an example.
Model answer
A syntax error is a breach of the rules for writing statements in a language, such as a missing closing bracket or a misspelt keyword, and it stops the program being translated.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Programming, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.