Arrange the following phases of a compiler as per their order of execution (start to end)
(a) Target code generation
(b) Syntax Analysis
(c) Code optimization
(d) Semantic Analysis
(e) Lexical Analysis
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: C. (e), (b), (d), (c), (a)
Explanation
Lexical analysis → syntax analysis → semantic analysis → code optimization → target code generation.
More Theory of Computation and Compilers questions
- Consider the following finite automata F1 that accepts a language L Let F2 be a finite automata which is obtained by reversal of F1. Then w…
- Which phase of compiler checks the grammar of programming?
- A. The set of turning machine codes for TM's that accept all inputs that are palindromes (possible along with some other inputs) is decidab…
- Which of the following parser is most powerful parser?
- Which of the following statement is correct?
- The compiler for high level language that runs on one machine and produces code for other machine is called-