Computer Science EngineeringEasy
Which compiler phase reads the character stream and groups it into tokens?
- A. Syntax analysis
- B. Lexical analysis
- C. Code generation
- D. Code optimization
Correct answer: B. Lexical analysis
The lexical analyzer (scanner) produces the token stream for the parser.
Practise more Theory of Computation, Compilers & Digital Logic (ISRO CS) questionsTheory of Computation, Compilers & Digital Logic (ISRO CS): notes and key points
More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions
- How many states are in the minimal DFA over {a, b} that accepts exactly the strings ending in 'ab'?
- The regular expression (a+b) over the alphabet {a, b} denotes
- Context-free grammars correspond to which type in the Chomsky hierarchy?
- Which of the following languages over {a, b} is NOT regular?
- An NFA has 5 states. By subset construction, the equivalent DFA needs at most how many states?
- Context-free languages are NOT closed under which operation?