Category:
Blogs
The compilation is spread across many stages. A compiler does not immediately convert a high-level language into binary – it takes time to complete! During the compilation process, the first step that is undertaken is called lexical analysis. During this process, the program typed by the user is shredded to pieces and every token that is a part of it is extracted and stored separately (tokens are the smallest indivisible parts of a program). What does a lexical analyzer do? Separation of a program into its tokens and classification of the tokens is the main responsibility of the lexical analyzer.



