Past-paper question · 2007 October-November · Paper 3 · Q7
Question 7 2007 · October-November · Paper 3 · 6 marks
Reveal official mark-scheme answer
Official answer for Question 7
- Characters in the variable name are tokenised
- Variable name is added to symbol table…
- during lexical analysis
- Data type added…
- scope is added/block(s) in which variable is valid
- during syntax analysis
- Variable names which do not match the rules are reported in error diagnostics
- Statements containing variables are checked for syntax
- Position in table is hashed from the name
- Variable declarations are checked/also variable use
- Address of variable calculated…
- added to symbol table…
- during code generation
✓
(1 per –, max 6)
[6]
Show text version of question
Question 7
Describe how a variable in a high level language program is dealt with by a compiler.
[6]
Question 3
Topic relevance
Why this question appears here
99% assigned-topic match · System software › Language translators
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9691_w07_qp_3.pdf
