# Parsing and Compiling SQL Statements: `Parser`

![`smart`](ParseAndCompilingSQLStatements_aa_001_20211101.png)

--------------------------------------------------------------------------------------
Parsing and compiling are two very important features in TiDB server. First, we will introduce parsing, that is, the `Parser` 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.
