Which compiler phase is responsible for reading the source code character stream and grouping it into meaningful units called tokens?
A
Step-by-Step Solution
Key idea: This is a direct recall question about compiler phase responsibilities.
Step 1: Recall the primary function of the Lexical Analyzer. It scans the source code character by character and groups them into meaningful sequences called tokens (e.g., keywords, identifiers, operators).
Step 2: Verify other options. Syntax Analyzer builds parse trees from tokens. Semantic Analyzer checks for logical consistency and type compatibility. Intermediate Code Generator produces an abstract intermediate representation.
Answer: A