Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Lexical analysis: What are the processed objects and results?
Lexical analysis: What are the processed objects and results?
The basic function of lexical analysis is to analyze the input sentences and the parsed words.

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.