
Explore tens of thousands of sets crafted by our community.
Phases of Compilation
10
Flashcards
0/10
Code Optimization
This phase attempts to improve the intermediate code so it runs faster and/or takes up less space.
Intermediate Code Generation
This phase translates parse tree into an intermediate code that is abstract and independent of machine specifics.
Lexical Analysis
This phase involves scanning the code to identify tokens.
Code Generation
This phase converts the optimized intermediate code into target machine code, specific to the hardware architecture.
Symbol Table Management
Throughout various phases, compiler maintains a symbol table which stores information about scope and binding of names.
Linking
After code generation, this phase combines all the separately compiled modules of a program into a single, executable file.
Error Handling
This phase involves reporting syntax, semantic, or other compilation errors back to the developer.
Syntax Analysis
This phase parses tokens into grammatical structures, typically represented as a parse tree.
Semantic Analysis
This phase checks the parse tree for semantic consistency with the language definitions.
Lexical Preprocessing
This optional phase handles tasks before lexical analysis like file inclusion, macro processing, and conditional compilation.
© Hypatia.Tech. 2024 All rights reserved.