For example, the following example:
input:int I = 0; ;
Scanning analysis process: decompose the complete statement into int, I, =, 0,; Five words, and analyze them according to the predefined thesaurus.
Analysis result: int is keyword I is variable = additional symbol 0 is constant; Is the closing tag of the statement.
On the basis of lexical analysis, it is concluded that this statement defines an integer variable.
For more detailed knowledge, please refer to the book Compilation Principles.
This knowledge is the basic knowledge of compilation principle.
Involving knowledge such as finite state diagram.