Question

In: Computer Science

7. What role does the symbol table play in a compiler? When is it created?


7. What role does the symbol table play in a compiler? When is it created? 

8. What are two unique advantages of implementing a language with a runtime interpreter i.e. scheme, python) versus a standalone executable file (i.e. C, C++)? 

Solutions

Expert Solution

Answer 7

Symbol tables are mainly data structure used to store information about source program. Basically it maintains the occurrence of various program fields like variables, functions, objects and classes etc. It is also used to store binding and scoping of names.

Symbol table can also be used for type checking It is created during lexical and syntax analysis phases of compilation.

During lexical analysis compiler creates new entries in table and during syntax analysis compiler adds information for that entry like scoping etc.

Answer 8

Main advantage is Less error prone to crashing as mostly they will not access source computer directly instead will be run by some kind of virtual machine. So first program will be run in virtual machine and if anything wrong virtual machine will crash but nothing will happen to main system.

Second, This kind of language needs less memory to run as only line which needs to be execute must be in memory.


Related Solutions

what role does the symbol table play in compiler when it is created
what role does the symbol table play in compiler when it is created
How is the apoptosome created and what role does it play in Apoptosis?
How is the apoptosome created and what role does it play in Apoptosis?
7) What is the intertemporal substitution effect and what role does it play in the real...
7) What is the intertemporal substitution effect and what role does it play in the real business cycle model?
Does social media play a role in advertising? If so, what role does it play?
Does social media play a role in advertising? If so, what role does it play?
What role does communication play when establishing the project context?
What role does communication play when establishing the project context?
What role does price play when negotiating and communicating value?
What role does price play when negotiating and communicating value?
what role does consumption play in shaping your sense of self? what role does it play...
what role does consumption play in shaping your sense of self? what role does it play in our society?
Q1. What role does the accounting department play (or what role should it play) in the...
Q1. What role does the accounting department play (or what role should it play) in the budgeting process? In the end, who is ultimately responsible for the budget, anyway? Instead of the president of the company, would it be more effective if the budgeting committee as a whole was responsible for the budget? Q2. Who should represent the various departments in the budget committee? What are the roles of these individuals?
What role does phosphorus play?
What role does phosphorus play?
What role does antibody play in Trypanosoma brucei infections? What role does VSG play in T....
What role does antibody play in Trypanosoma brucei infections? What role does VSG play in T. brucei infections? Using your knowledge of antibodies explain how the trypanosome survive within the host to ensure transmission to new hosts? How does the parasite evade the host immune system?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT