The compiler has two modules namely front end and back end. Front-end constitutes of the Lexical analyzer, semantic analyzer, syntax analyzer and intermediate code generator. And the rest are assembled to form the back end. Here Compiler is designed using c++.
1.Lexical Analysis
Lexical Analysis is the first phase of compiler also known as scanner. It converts the input into a sequence of Tokens.