1. The document describes the 6 main phases of a compiler: lexical analysis, syntax analysis, semantic analysis, intermediate code generation, code optimization, and code generation.
2. Each phase transforms the source program into different representations, with the lexical analyzer identifying tokens, the syntax analyzer constructing a parse tree, and the semantic analyzer performing type checking.
3. The intermediate code generator produces machine-independent code, the code optimizer improves performance, and the code generator outputs machine-specific object code.