Mapa mental
Program compilation process
Contenido del mapa
Program compilation process
Lexical analysis
- All comments and irrelevant spaces are removed. Then lines are read and assigned a token, like an identifier, operator or literal, which are then organized in a table. Things like variables are checked to ensure they have been declared.
Syntax Analysis
- The tokens are checked by the compiler to make sure they follow the syntax rules of the programming language, like using the correct format, if not, then it will throw out a syntax error message until the code is fixed.
Semantic analysis
- Semantic consistency of the code is checked using the previous syntax analysis, the analyzer will check for Type mismatches, incompatible operands, undeclared variables, etc.
Code generation (Intermediate)
- After both syntax and semantic analysis, the compiler creates a separate code from the source code. This code is executable in a machine and is the characteristic of compilers.
Code optimisation
- Any repeated lines are removed, same goes with unnecessarily repeated code or code that is executed multiple times in a loop, the code can also be rearranged to make the process faster and use less resources.
Code generation
- The code generation phase receives the inputs from the optimization phase and creates an object code. This phase’s purpose is allocating storage and generating relocatable machine code.
Información
- Descripción
- Mapa Mental sobre Program compilation process, creado por Rich Hernandez el 22/05/2021.
- Creado por
- Rich Hernandez
- Visitas
- 0
- Valoración