Some of the steps or processes carried out by the compiler include:
- Lexical analysis stage: Divides the codes into lexemes which are then tokenized in preparation for syntax and sematic analysis.
- Syntax analysis stage: Verifies the code syntax is correct based on the syntax rule of the source language.
- Semantic analysis stage: At this stage the compiler checks the logic of he code and code's accuracy .
- IR code Generator : This stage deals with the generation intermediate Representation of the source code.
- Optimization of code: This stage deals with stripping away and rearranging of code to ensure optimality and low consumption of resources.
- Output code generation