volume_mute
Compiler Components - Sequence
publish date: 2026/06/11 07:37:11.432264 UTC
volume_mutePlease drag and drop the options to sort them
Arrange the six core components of a programming language compiler in the correct order of processing, from source code input to machine code output.
Code Generator
Lexical Analyzer
Semantic Analyzer
Syntax Tree (internal representation)
Syntax Analyzer
Symbol Table (lookup)
Correct Answer
(1) Lexical Analyzer
(2) Syntax Analyzer
(3) Syntax Tree (internal representation)
(4) Semantic Analyzer
(5) Symbol Table (lookup)
(6) Code Generator
Explanation
The compiler pipeline in order: (1) Lexical Analyzer - tokenizes source code; (2) Syntax Analyzer - parses token stream and builds the Syntax Tree; (3) Syntax Tree - internal program representation used by subsequent stages; (4) Semantic Analyzer - uses the Syntax Tree and Symbol Table to check semantic correctness; (5) Symbol Table - consulted throughout for entity names and types; (6) Code Generator - walks the syntax tree to produce abstract machine code.
Reference
Software Engineering, Ian Sommerville, 10th edition
