The symbol table is used throughout the compiler to store information about program entities like classes, instances, methods and variables. It has two main components - a name table to uniquely identify names, and an entity table with an entry for each program entity. The main symbol table operations are insert to add a new name, and lookup to find a name. Other functions initialize and finalize scopes when entering or exiting blocks. The symbol table incrementally collects information and transforms the entire program into a table that is used by various compiler phases.
Translation of a program written in a source language into a semantically equivalent program written in a target language
It also reports to its users the presence of errors in the source program
Translation of a program written in a source language into a semantically equivalent program written in a target language
It also reports to its users the presence of errors in the source program
Run-Time Environments: Storage organization, Stack Allocation of Space, Access to Nonlocal Data on the Stack, Heap Management, Introduction to Garbage Collection, Introduction to Trace-Based Collection. Code Generation: Issues in the Design of a Code Generator, The Target Language, Addresses in the Target Code, Basic Blocks and Flow Graphs, Optimization of Basic Blocks, A Simple Code Generator, Peephole Optimization, Register Allocation and Assignment, Dynamic Programming Code-Generation
This slide is prepared By these following Students of Dept. of CSE JnU, Dhaka. Thanks To: Nusrat Jahan, Arifatun Nesa, Fatema Akter, Maleka Khatun, Tamanna Tabassum.
Run-Time Environments: Storage organization, Stack Allocation of Space, Access to Nonlocal Data on the Stack, Heap Management, Introduction to Garbage Collection, Introduction to Trace-Based Collection. Code Generation: Issues in the Design of a Code Generator, The Target Language, Addresses in the Target Code, Basic Blocks and Flow Graphs, Optimization of Basic Blocks, A Simple Code Generator, Peephole Optimization, Register Allocation and Assignment, Dynamic Programming Code-Generation
This slide is prepared By these following Students of Dept. of CSE JnU, Dhaka. Thanks To: Nusrat Jahan, Arifatun Nesa, Fatema Akter, Maleka Khatun, Tamanna Tabassum.
Using Rational Publishing Engine to generate documents from Rational RhapsodyGEBS Reporting
The goal of this tutorial is to introduce to the user the basics of using Rational Publishing Engine to extract data from Rational Rhapsody and create output documents to present in a friendly way the extracted data.
At the end of this tutorial the user will know how to create an RPE template for Rhapsody, how to obtain a valid Rhapsody schema and how to run a document specification to extract data from Rational Rhapsody.
2. Symbol table
The symbol table is used throughout the compiler
to hold information about the various entities in the
source program .
(classes, instances, methods, variables etc.) and their
properties (types, arguments, visibility, memory
requirement etc.).
This information is collected incrementally and used
by various phases of the compiler.
3. Components of Symbol Table
The symbol table you will build will have two main
components
The Name Table
The Entity Table
each entity in the
The name table ,
program is represented
is used to
uniquely by a unique entry in
the entity table.
identify
different names
that occur in the
program.
4. Symbol Table Operations
The two main operations are
insert (name) makes an entry for this name
lookup (name) finds the relevant occurrence of
the name by searching the table
Lookups occur a lot more often than insert
5. More Symbol Table Functions
In addition to lookup and insert, the symbol table
will also need
initializeScope (level) , when a block is entered to
create a new hash table entry in the symbol table list
finializeScope (level), on block exit put the current
hash table into a background list