Re: Common ADT for a identifier table ?

"Bill Fahle" <>
15 Feb 1999 23:36:49 -0500

          From comp.compilers

Related articles
Common ADT for a identifier table ? (1999-02-05)
Re: Common ADT for a identifier table ? (Bill Fahle) (1999-02-15)
| List of all articles for this month |

From: "Bill Fahle" <>
Newsgroups: comp.compilers
Date: 15 Feb 1999 23:36:49 -0500
Organization: OnRamp,
References: 99-02-028
Keywords: design, symbols

Stefan Wils wrote in message 99-02-028...
>What kind of Abstract Data Type would you suggest for an identifier
>table, that has to hold all identifier names and their types (not

Hi, I usually write in C++, so I usually end up using one of the
Standard Template Library collection classes, like multimap. This is
usually implemented as a red-black or AVL tree, but the standard
interface doesn't specify implementation details. Of course, scoping
is a whole other matter. If that is a concern, I build a custom
symbol tree via child-sibling (and often parent) pointers, and then I
make each multimap the value of the declarator associated with it (for
example, in parsing C++, each class defines a multimap symbol table,
and so does each block, although you can't necessarily get to the
blocks by scope operator ::).

Post a followup to this message

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