| 1 |
|
| 2 |
|
| 3 |
While teaching a data structures course at University of California, |
| 4 |
Irvine, I developed a program called GPERF that generates perfect hash |
| 5 |
functions for sets of key words. A perfect hash function is: |
| 6 |
|
| 7 |
A hash function and a data structure that allows |
| 8 |
recognition of a key word in a set of words using |
| 9 |
exactly 1 probe into the data structure. |
| 10 |
|
| 11 |
The ace_gperf.texinfo file explains how the program works, the form of the |
| 12 |
input, what options are available, and hints on choosing the best |
| 13 |
options for particular key word sets. The texinfo file is readable |
| 14 |
both via the GNU emacs `info' command and is also suitable for |
| 15 |
typesetting with TeX. |
| 16 |
|
| 17 |
The enclosed Makefile creates the executable program ``ace_gperf'' and |
| 18 |
also runs the regression tests. |
| 19 |
|
| 20 |
Output from the GPERF program is used to recognize reserved words in |
| 21 |
the GNU C, GNU C++, and GNU Pascal compilers. In addition, it is used |
| 22 |
by TAO'd IDL compiler to generate operation dispatching tables. |
| 23 |
|
| 24 |
For more information on GPERF, please see |
| 25 |
|
| 26 |
http://www.dre.vanderbilt.edu/~schmidt/PDF/gperf.pdf |
| 27 |
|
| 28 |
Happy hacking! |
| 29 |
|
| 30 |
Douglas C. Schmidt |
| 31 |
[email protected] |