SYMBOL TABLE MANAGEMENT
DIKSHANT ACHARYA​
INTRODUCTION
PRESENTATION
TITLE
2
 Symbol tables are data structure that are used by compiler to hold
information about source program construct.
 It is use to store information about the occurrence various entities
such as object, classes, variable names, function etc .It is used by both
analysis phase & synthesis phases .
3
The symbol table use for various propose are:
 It is use to store the name of all entities in a structure form at one place.
 It is use to verify if the variable is declared or not.
 It is used to determine the scope of a name.
4
Data structure is used for the implementation of Symbol Table
• Linear list
• Self organizing list
• Binary search tree
• Hash Table
6
Explanation of test cases
• Global Scope : We insert two symbols (x & y) in the global scope.
• Enter a New Scope : This simulates entering a new function or block
scope, where a new Symbol Table is pushed on to the stack.
• Inset Local Symbol : Insert a symbol with the same name as a global
symbol is not found locally.
• Lookup Operations : Verify the lookup for first check the current
scope then the global scope if the symbol is not found locally.
THANK YOU
DXXXNT@GMAIL.COM

Symbol table Management Compiler Design.pptx

  • 1.
  • 2.
    INTRODUCTION PRESENTATION TITLE 2  Symbol tablesare data structure that are used by compiler to hold information about source program construct.  It is use to store information about the occurrence various entities such as object, classes, variable names, function etc .It is used by both analysis phase & synthesis phases .
  • 3.
    3 The symbol tableuse for various propose are:  It is use to store the name of all entities in a structure form at one place.  It is use to verify if the variable is declared or not.  It is used to determine the scope of a name.
  • 4.
    4 Data structure isused for the implementation of Symbol Table • Linear list • Self organizing list • Binary search tree • Hash Table
  • 6.
    6 Explanation of testcases • Global Scope : We insert two symbols (x & y) in the global scope. • Enter a New Scope : This simulates entering a new function or block scope, where a new Symbol Table is pushed on to the stack. • Inset Local Symbol : Insert a symbol with the same name as a global symbol is not found locally. • Lookup Operations : Verify the lookup for first check the current scope then the global scope if the symbol is not found locally.
  • 7.