Think of the compiler as a pipeline. It has a number of steps, and each of them deals with the
result of the previous step. This pipeline can be divided into two big subsystems:
the front end and the back end.
So far, we have explored the front end of the compiler. The front end deals with
the language itself: It consists of lexing,
parsing and the result is the AST.
Now, we are going to dive into the back end and have a better look on the
intermediate representation as well.
We are done with the first big part of the compilation process which includes
lexing and parsing,
the two steps that transform the code into a form that it easy to reason about by humans.
With static analysis we start transforming the code into a form that the CPU will understand.
Parsing is the part when the rules of the grammar are applied to the tokens.
It is similar to what we, humans do when we learn the rules of our mother tongue in
elementary school. The parser takes the token stream and turns it into a tree that reflects
the rules of the grammar. This is the Abstract Syntax Tree (AST).