Question: BCSE 3 0 7 P - COMPILER DESIGN LAB Date: 2 3 . 0 1 . 2 0 2 4 Aim : To write a
BCSEP COMPILER DESIGN LAB
Date:
Aim : To write a CProgram to create symbol table
Detailed Description of Exercise
A Symbol table is a data structure used by the compiler, where each identifier in program's soure code is stored along with information associated with it relating to its declaration. It stores identifier as well as it's associated attributes like scope, type, linenumber of occurrence, etc. Write a program to construct symbol table for an input program.
Test case
Sample Input:
Enter Program $ for termination:
void main
i
int ;
printfa a;
Sample Output:
tableNameType,Size,Addressaint,
Test case
Sample Input:
Enter Program $ for termination:
void main
int numnumsum;
scanfdd&num&num
sumnumnum;
printf dsum;
is
Sample Output:
tableNameType,Size,Address
tablenumint,numint,sumint,
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
