Question: What is the role of a semantic analyzer in the context of intermediate code generation?
Options:
Correct Answer: To ensure type correctness and gather type information
Solution:
The semantic analyzer checks for type correctness and gathers type information, which is crucial for generating valid intermediate code.