in Compiler Design edited by
2,293 views
3 votes
3 votes

Which of the following are applications of symbol table?

  1. Storage allocation
  2. Checking type compatibility
  3. Suppressing duplicate error messages

Choose the correct answer from the options given below:

  1. $\text{(i)}$ and $\text{(ii)}$ only
  2. $\text{(i)}$ and $\text{(iii)}$ only
  3. $\text{(ii)}$ and $\text{(iii)}$ only
  4. $\text{(i)}$ $\text{(ii)}$ and $\text{(iii)}$

 

in Compiler Design edited by
2.3k views

1 Answer

2 votes
2 votes

optio D all are correct 

https://www.slideshare.net/Tech_MX/symbol-table-design-compiler-construction

https://www.tutorialspoint.com/compiler_design/compiler_design_symbol_table.htm

Symbol table is an important data structure created and maintained by compilers in order to store information about the occurrence of various entities such as variable names, function names, objects, classes, interfaces, etc. Symbol table is used by both the analysis and the synthesis parts of a compiler.

A symbol table may serve the following purposes 

  • To store the names of all entities in a structured form at one place.

  • To verify if a variable has been declared.

  • To implement type checking, by verifying assignments and expressions in the source code are semantically correct.

  • To determine the scope of a name (scope resolution).

Answer:

Related questions