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

Discussion

Match each phase with what it does to the symbol table.
List I
A. lexical analysis
B. semantic analysis
C. code generation
D. optimisation
List II
1. reads the storage offset assigned
2. installs the name and its lexeme
3. consults attributes to decide on transformations
4. records the type and checks declarations

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

Answer: D

Each phase touches the table for its own purpose, writing what it knows and reading what an earlier phase recorded. Because the one structure is shared across the whole compiler, its design has to satisfy every one of those needs at once rather than being tuned for any single phase.

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

Post your comment

Please log in or register to post a comment.