1.2.2 (e) – Applications Generation – Stages of compilation
(1) Lexical Analysis
- All comments and white space is removed.
- Code is turned into tokens.
- Symbol table created.
(2) Syntactic Analysis
- Checks syntax.
- Syntax tree is created using the symbol tree.
(3) Code Generation
- Syntax tree is converted into object code.
(4) Code Optimisation
- Removes unneeded code to make sure it runs as fast as possible, such as unused functions or variables.