30. Which compiler phase receives tokenized output?
- (A)
Lexical Analyser
- (B)
Parser
- (C)
Pre-processor
- (D)
Assembler
30. Which compiler phase receives tokenized output?
Lexical Analyser
Parser
Pre-processor
Assembler
ANSWER
The parser receives the tokenized output, so the answer is (b).
Official answer: BSource: ISRO's final answer key of 15 May 2026
A compiler's front end works in sequence: the pre-processor handles raw source text, then lexical analysis, then syntax analysis (parsing), then semantic analysis.
The lexical analyser reads the character stream and produces tokens (identifiers, keywords, operators, constants). Tokens are its output, so it produces them rather than receiving them.
The parser takes that token stream as its input and checks it against the grammar, building a parse tree. So the parser is the phase that receives tokenized output.
The pre-processor runs before the lexer, on raw source text, handling macros and file inclusion. It never sees tokens.
The assembler comes after code generation and works on assembly code, so it does not consume tokens.
Hence the answer is (b), the parser.
KEY IDEA
Phases are chained: each phase's output is the next phase's input. The lexer outputs tokens, and the parser is the next phase, so it receives them.
WATCH OUT FOR
Picking the lexical analyser because tokens are associated with it. The lexer produces tokens; it does not receive them. Its input is the raw character stream.
From the ISRO CS 2025 paper. Every question of this paper · The full paper (PDF, ISRO) · All 3 ISRO Lexical analysis questions, with notes