1.2.2e: Stages of compilation (lexical analysis, syntax analysis, code generation and optimisation).
Keyword | Definition |
---|---|
Code generation | The process of converting the intermediate code or abstract syntax tree of a program into machine code that can be executed by a computer. |
Lexical analysis | The process of scanning the source code of a program, removing whitespace and comments and dividing it into small units called tokens, which represent the basic elements of the language such as keywords, operators, and identifiers. |
Optimization | The process of improving the performance, efficiency, or other characteristics of a program by modifying its code or representation. |
Syntax analysis | The process of examining the source code of a program and checking it for proper structure and adherence to the rules of the programming language. |