From: | scott@basis.com (Scott Amspoker) |
Newsgroups: | comp.compilers |
Date: | 10 Jul 1998 20:53:24 -0400 |
Organization: | Basis International |
References: | 98-07-030 98-07-056 |
Keywords: | symbols |
eodell@pobox.com (Eric O'Dell) wrote:
>The algorithm Holub proposes in _Compiler Design in C_ is pretty
>workable, and I can't offhand see any reason why you couldn't make a
>C++ class out of it. It uses a hash table with individual table
>entries linked via linked lists to keep track of scope.
I was going to suggest that one too. It's simple to implement and
seems to work pretty well even for moderately large symbol tables
(adjust the hash table size as necessary). I first used it in a
compiler thinking that I could always go back and replace it with
something better if I wasn't happy with it. I never felt the need to
replace it.
Scott Amspoker
scott@basis.com
http://www.rt66.com/sda
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.