1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
  
     | 
    
      <HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.51
     from gperf.texi on 15 April 1998 -->
<TITLE>User's Guide to gperf - 1  Introduction</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="gperf_1.html">first</A>, <A HREF="gperf_3.html">previous</A>, <A HREF="gperf_5.html">next</A>, <A HREF="gperf_11.html">last</A> section, <A HREF="gperf_toc.html">table of contents</A>.
<P><HR><P>
<H1><A NAME="SEC6" HREF="gperf_toc.html#TOC6">1  Introduction</A></H1>
<P>
<CODE>gperf</CODE> is a perfect hash function generator written in C++.  It
transforms an <VAR>n</VAR> element user-specified keyword set <VAR>W</VAR> into
a perfect hash function <VAR>F</VAR>.  <VAR>F</VAR> uniquely maps keywords in
<VAR>W</VAR> onto the range 0..<VAR>k</VAR>, where <VAR>k >= n</VAR>.  If
<VAR>k = n</VAR> then <VAR>F</VAR> is a <EM>minimal</EM> perfect hash function.
<CODE>gperf</CODE> generates a 0..<VAR>k</VAR> element static lookup table and a
pair of C functions.  These functions determine whether a given
character string <VAR>s</VAR> occurs in <VAR>W</VAR>, using at most one probe
into the lookup table.
</P>
<P>
<CODE>gperf</CODE> currently generates the reserved keyword recognizer for
lexical analyzers in several production and research compilers and
language processing tools, including GNU C, GNU C++, GNU Pascal, GNU
Modula 3, and GNU indent.  Complete C++ source code for <CODE>gperf</CODE> is
available via anonymous ftp from <CODE>ics.uci.edu</CODE> and
<CODE>ftp.santafe.edu</CODE>.  <CODE>gperf</CODE> was also distributed along with
the GNU libg++ library for several years.  A highly portable,
functionally equivalent K&R C version of <CODE>gperf</CODE> is archived in
comp.sources.unix, volume 20.  Finally, a paper describing
<CODE>gperf</CODE>'s design and implementation in greater detail is available
in the Second USENIX C++ Conference proceedings.
</P>
<P><HR><P>
Go to the <A HREF="gperf_1.html">first</A>, <A HREF="gperf_3.html">previous</A>, <A HREF="gperf_5.html">next</A>, <A HREF="gperf_11.html">last</A> section, <A HREF="gperf_toc.html">table of contents</A>.
</BODY>
</HTML>
 
     |