Re: How is the concept of scope implemented?

Louis Krupp <lkrupp@pssw.com>
Sat, 15 Nov 2008 14:27:38 -0700

          From comp.compilers

Related articles
How is the concept of scope implemented? tony@my.net (Tony) (2008-11-14)
Re: How is the concept of scope implemented? bear@sonic.net (Ray Dillinger) (2008-11-14)
Re: How is the concept of scope implemented? m.helvensteijn@gmail.com (2008-11-14)
Re: How is the concept of scope implemented? tony@my.net (Tony) (2008-11-14)
Re: How is the concept of scope implemented? liangkun1983@gmail.com (Alex L.K) (2008-11-15)
Re: How is the concept of scope implemented? lkrupp@pssw.com (Louis Krupp) (2008-11-15)
Re: How is the concept of scope implemented? tony@my.net (Tony) (2008-11-18)
Re: How is the concept of scope implemented? tony@my.net (Tony) (2008-11-18)
Re: How is the concept of scope implemented? tony@my.net (Tony) (2008-11-18)
Re: How is the concept of scope implemented? kamalpr@hp.com (kamal) (2008-11-18)
Re: How is the concept of scope implemented? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2008-11-19)
Re: How is the concept of scope implemented? yangjunpro@gmail.com (yangjunpro: Target locked-->Ruby++) (2008-11-18)
[5 later articles]
| List of all articles for this month |

From: Louis Krupp <lkrupp@pssw.com>
Newsgroups: comp.compilers
Date: Sat, 15 Nov 2008 14:27:38 -0700
Organization: Compilers Central
References: 08-11-054
Keywords: C++, symbols
Posted-Date: 15 Nov 2008 18:36:30 EST

Tony wrote:
> In C++, there is many kinds of scope: global, translation unit, function,
> local (between the curly brackets within a function), class and probably
> more. How is the concept of scope implemented by a compiler for a program?


The last time I looked at a (Burroughs Extended) ALGOL compiler, it used
a linked list of symbol tables. When it entered a scope, it linked its
symbol table to the head of the list; when it left a scope, it removed
its table and pointed the list head at the previous scope.


Louis



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.