# Parse And Compiling Sql Statements


![left](./student-guide/diagram/02-Parse-01-01.png)
------------------------------------------------------------

parse and compiling are two very important functions in TiDB Server. Let's introduce them separately below, and first we will introduce parse.

That's the Parase module. This module uses the lexer lex for abstraction, that is, parse SQL statements into tokens one by one, and then using the parser yacc to generate a tree structure, or abstract syntax tree (AST).

After that, it can be recognized and compiled, as shown in the figure:





