Machine-translated by Google. Questions are authored in English.
Top

Discussion

Arrange the classical phases of a compiler in the order a source program passes through them.
1. semantic analysis
2. lexical analysis
3. intermediate code generation
4. syntax analysis

  • A.3 - 1 - 4 - 2
  • B.4 - 2 - 1 - 3
  • C.2 - 1 - 4 - 3
  • D.2 - 4 - 1 - 3

Answer: D

Characters become tokens in lexical analysis, tokens become a parse tree in syntax analysis, the tree is checked for meaning in semantic analysis, and only then is an intermediate representation emitted for the back end.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.