The task of the lexical analysis phase is
The task of the lexical analysis phase is
Lexical analysis is the first phase of a compiler. It takes the modified source code from language preprocessors that are written in the form of sentences. The lexical analyzer breaks these syntaxes into a series of tokens, by removing any whitespace or comments in the source code.
1) To parse the source program into the basic elements or tokens of the language.
2) To build a literal table and identifier table.
3) To build a uniform symbol table.