I want to generate a symbol table in Python, but I don't know where to start. So, I want someone to explain to me how to program the symbol table and what to use.
unordered symbol table. It seems like I want to make a reference for all my variable that are in my code ex: if i have a code that contain x, y variables, I want to store their type, size, dimension, scope, line of declaration, etc… . I make a simple tokenizer to split my code and define its tokens so it's already will know the variable in my code, so I want it to store the last information about all variable in my code and print it. I tried to use classes but, I didn't get anything.
What I have tried:
I tried to use classes but, I didn't know how to do this.