This is the first phase of a compiler. Gate Smashers explains that the Lexical Analyzer reads the stream of characters making up the source program and groups them into meaningful sequences called . It identifies keywords, identifiers, operators, and constants, stripping away comments and whitespace in the process. Understanding tokenization is the first step in mastering how a compiler "reads" your code.
A category of lexical elements (e.g., KEYWORD , IDENTIFIER , OPERATOR ). compiler design gate smashers
Type checking (e.g., ensuring you don't add a string to an integer) and array bound checking. This is the first phase of a compiler