Re: Symbol table management

"Ralph Corderoy" <>
4 Jul 2002 23:05:38 -0400

          From comp.compilers

Related articles
Symbol table management (hantheman) (2002-07-02)
Re: Symbol table management (Ralph Corderoy) (2002-07-04)
Re: Symbol table management (George Russell) (2002-07-04)
Symbol table management (1995-10-18)
| List of all articles for this month |

From: "Ralph Corderoy" <>
Newsgroups: comp.compilers
Date: 4 Jul 2002 23:05:38 -0400
Organization: InputPlus Ltd.
References: 02-07-009
Keywords: symbols
Posted-Date: 04 Jul 2002 23:05:38 EDT

Hi hantheman,

> My question is simply: what data structure is typically chosen?
> Hash-tables? Trees? The program lang beeing parsed has syntax and
> semantics pretty close to C++.

Choose a hash-table. It's pretty common. Simple, well-performing
implementations are readily available. There's little reason to deviate
for most uses.

> Also, any suggestions on how to best organize the runtime structure
> for such a language - I understand how to do it for a structural
> language, but I'm a bit unsure about how to handle OO features such as
> MI, overloading and polymorphism.

Have a look at Axel-Tobias Schreiner's _Object-Orientated Programming in
ANSI C_. It shows how an awk pre-processor for C can add OO features.
This shows how polymorphism, etc., can be implemented. The English text
of the book is available for download.



Post a followup to this message

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