# Parse And Compiling Sql Statements

![left](./student-guide/diagram/ParseAndCompilingSQLStatements_en_001_20211101.png)

------------------------------------------------------------
Parsing and compiling are two very important functions in TiDB Server. Let's introduce them separately. First, we will introduce parsing, that is, the Parase module. This module uses lexer lex for abstraction, that is, parse SQL statements into tokens one by one, and then uses the parser yacc to generate a tree structure, that is, an abstract syntax tree (AST). It can then be identified and compiled, as shown in the figure.





