Re: Symbol tables and scopes

Carl Barron <cbarron413@adelphia.net>
12 Feb 2006 10:59:25 -0500

          From comp.compilers

Related articles
[5 earlier articles]
Re: Symbol tables and scopes DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-02-06)
Re: Symbol tables and scopes DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-02-06)
Re: Symbol tables and scopes gah@ugcs.caltech.edu (glen herrmannsfeldt) (2006-02-06)
Re: Symbol tables and scopes Peter_Flass@Yahoo.com (Peter Flass) (2006-02-07)
Re: Symbol tables and scopes alexc@TheWorld.com (Alex Colvin) (2006-02-11)
Re: Symbol tables and scopes cfc@shell01.TheWorld.com (Chris F Clark) (2006-02-11)
Re: Symbol tables and scopes cbarron413@adelphia.net (Carl Barron) (2006-02-12)
Re: Symbol tables and scopes DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-02-14)
Re: Symbol tables and scopes DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2006-02-14)
Re: Symbol tables and scopes david.thompson1@worldnet.att.net (Dave Thompson) (2006-02-14)
Re: Symbol tables and scopes alexc@TheWorld.com (Alex Colvin) (2006-02-14)
Re: Symbol tables and scopes nathan.moore@cox.net (Nathan Moore) (2006-02-17)
Re: Symbol tables and scopes alexc@TheWorld.com (Alex Colvin) (2006-02-17)
[6 later articles]
| List of all articles for this month |
From: Carl Barron <cbarron413@adelphia.net>
Newsgroups: comp.compilers
Date: 12 Feb 2006 10:59:25 -0500
Organization: Compilers Central
References: 06-01-101 06-02-027 06-02-045 06-02-056 06-02-063
Keywords: symbols
Posted-Date: 12 Feb 2006 10:59:25 EST

Alex Colvin <alexc@TheWorld.com> wrote:
> >> It looks like inefficient to me, when for every currently visible scope
> >> the block id must be compared with the id's of *all* possible blocks?
>
> Figure that a name is declared in very few blocks, but some blocks contain
> very many names. Typically, the outermost scope contains hundreds of
> global names that are never redeclared. I believe this is called the "Big
> Inhale"


      Depends on the language and programming style. It may be true for
C, Pascal and similiar languages, but i question the validity on a
typical C++ program for example. Definitely a reasonably well designed
program will attempt to minimize the # of global variables, if the
language allows it.


      Anyway the poster needs only to search scope form inner most
outward until the variable is found, not all possible blocks.



Post a followup to this message

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