The document discusses the different phases of a compiler:
1. Lexical analysis scans the source code as characters and converts them into tokens.
2. Syntax analysis takes the tokens and checks that they form a syntactically correct parse tree based on the language's grammar.
3. Semantic analysis checks that the parse tree follows the language's rules, such as compatible data types in assignments.