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