Questions tagged [symbol-table]

A `symbol table` is a data structure that maps each identifier in a program's source code to information relating to its declaration or appearance in the source.

A symbol table is used by a language translator (compiler, interpreter...) for associating each identifier in a program's source code with information relating to its declaration or appearance in the source (type, scope level, sometimes location...).

A common implementation technique is to use a hash table implementation. A compiler may use one large symbol table for all symbols or use separated, hierarchical symbol tables for different scopes.

202 questions
-1
votes
3 answers

why python can't access global variable value with function parameter name change?

in these two pieces of code, why the second one gives error about local variable assignment? two codes are similar just function parameters is different, in the second one it's able to read the global variable why not in the first one what changes…
-1
votes
1 answer

i hope access the symbol table in python

First of all, since the writing is long, I say the apology first. I'm studying symbol table in Python and trying to extract the memory address of symbols by directly accessing the symbol table (without id()). So I referenced Eli bendersky's blog. I…
-1
votes
1 answer

Eventhough i have defined a function inside my code, still it's showing "Nameerror: not defined" in PYTHON

t=int(input("enter no of test cases")) global mylist1,mylist2 for a in range(t): n = int(input("number of cubes")) while True: list_inp = input("enter list").split() if len(list_inp)== n: break print("no…
Enji
  • 83
  • 1
  • 10
-1
votes
1 answer

Symbol Table and line number population in compiler phases

We know compiler saves line numbers in symbol table during lexical analysis. I had been wondering if it is possible to save line numbers in any other phases of analysis of source code? If possible then when and how?
-1
votes
2 answers

Linkers and Loaders for Objective-C

I recently came across John Levine's book "Linkers and Loaders." This book was written in the year 2000. If anyone has read his book, is everything the author says still relevant for Objective-C in the year 2013? I am asking, because it looks…
-3
votes
2 answers

How to simulate a symbol table in Common Lisp

i am learning Common LISP at the moment and i encountered a huge roadblock. I've had an assignment that we were to learn how to create a parser in Common LISP. I have managed to implement everything from the grammar rules to the lexer with alot of…
Joo223
  • 1
  • 1
-5
votes
1 answer

how does a symbol table be in case of method overloading in c#

How is a symbol table represented in method overloading?
1 2 3
13
14