Solved

What Is the Role of the Lexical Analyzer in a Compiler

Question 10

Multiple Choice

What is the role of the lexical analyzer in a compiler?


A) The lexical analyzer groups tokens in a program's source code into syntactically correct statements.
B) The lexical analyzer separates the source code into tokens (e.g., keywords, identifiers, operators and punctuation) .
C) The lexical analyzer converts syntactic structures into instructions.
D) The lexical analyzer attempts to optimize the efficiency of the code.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions