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,510 of 2,753   
   Alex L.K to Tony   
   Re: How is the concept of scope implemen   
   15 Nov 08 00:48:08   
   
   From: liangkun1983@gmail.com   
      
   Basically, you can implemente it with a tree. Each node in this tree   
   corresponds to a scope and contains the declarations in this scope.   
   When you search for a declaration, you begin with current node in the   
   tree, if you do not find it, you continue in the parent and so on.   
   In practice, nobody would like accturally maintain this tree, they use   
   a stack to keep a path from the root to current node of this tree.   
      
   On Nov 14, 3:40 pm, "Tony"  wrote:   
   > In C++, there is many kinds of scope: global, translation unit, function,   
      
   --- 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