home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,512 of 2,753   
   Louis Krupp to Tony   
   Re: How is the concept of scope implemen   
   15 Nov 08 14:27:38   
   
   From: lkrupp@pssw.com   
      
   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   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca