From c4b3453ac315891fd9809c58eaea71e98247195b Mon Sep 17 00:00:00 2001
From: Bruno Haible
@@ -504,15 +511,13 @@ Public License instead of this License.
The GNU
The perfect hash function generator
-In general,
-Unlike
+It is possible to omit the declaration section entirely, if the `-t'
+option is not given. In this case the input file begins directly with the
+first keyword line, e.g.:
+
+
+The keyword input file optionally contains a section for including
+arbitrary C declarations and definitions,
-The keyword input file optionally contains a section for including
-arbitrary C declarations and definitions, as well as provisions for
-providing a user-supplied
@@ -752,9 +787,260 @@ appearing left justified in the first column, as in the UNIX utility
+The declaration section can contain
+When a declaration is given both in the input file and as a command line
+option, the command-line option's value prevails.
+
+
+The following
+
+
Using a syntax similar to GNU utilities
-It is possible to omit the declaration section entirely. In this case
-the keyfile begins directly with the first keyword line, e.g.:
-
-
-The second keyfile format section contains lines of keywords and any
+The second input file format section contains lines of keywords and any
associated attributes you might supply. A line beginning with `#'
in the first column is considered a comment. Everything following the
-`#' is ignored, up to and including the following newline.
+`#' is ignored, up to and including the following newline. A line
+beginning with `%' in the first column is an option declaration and
+must not occur within the keywords section.
-The first field of each non-comment line is always the key itself. It
+The first field of each non-comment line is always the keyword itself. It
can be given in two ways: as a simple name, i.e., without surrounding
string quotation marks, or as a string enclosed in double-quotes, in
C syntax, possibly with backslash escapes like
The optional third section also corresponds closely with conventions
@@ -860,9 +1135,57 @@ section is valid C.
-
+If you want to invoke GNU
+you would insert `*INDENT-OFF*' and `*INDENT-ON*' comments
+as follows:
+
+
@@ -877,34 +1200,36 @@ function prototypes are as follows:
User's Guide to
+gperf 2.7.2User's Guide to
gperf 3.0The GNU Perfect Hash Function Generator
-Edition 2.7.2, 26 September 2000
+Edition 3.0, 7 May 2003
Douglas C. Schmidt
+Bruno Haible
Table of Contents
@@ -26,26 +27,32 @@
-gperf
-gperf
-gperf
+
-
-gperf
-struct
+gperf
-gperf
-indent.
+
+gperf
+gperf
+
+
+gperf
+gperf
+gperf perfect hash function generator utility was
-originally written in GNU C++ by Douglas C. Schmidt. It is now also
-available in a highly-portable "old-style" C version. The general
+written in GNU C++ by Douglas C. Schmidt. The general
idea for the perfect hash function generator was inspired by Keith
Bostic's algorithm written in C, and distributed to net.sources around
1984. The current program is a heavily modified, enhanced, and extended
implementation of Keith's basic idea, created at the University of
California, Irvine. Bugs, patches, and suggestions should be reported
-to both <bug-gnu-utils@gnu.org> and
-<gperf-bugs@lists.sourceforge.net>.
+to <bug-gnu-gperf@gnu.org>.
gperf.
gperf is a perfect hash function generator written in C++. It
transforms an n element user-specified keyword set W into a
perfect hash function F. F uniquely maps keywords in
-W onto the range 0..k, where k >= n. If k
-= n then F is a minimal perfect hash function.
+W onto the range 0..k, where k >= n-1. If k
+= n-1 then F is a minimal perfect hash function.
gperf generates a 0..k element static lookup table and a
pair of C functions. These functions determine whether a given
character string s occurs in W, using at most one probe into
@@ -548,11 +554,12 @@ the lookup table.
gperf 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 gperf is
-available via anonymous ftp from ftp://ftp.gnu.org/pub/gnu/gperf/.
+language processing tools, including GNU C, GNU C++, GNU Java, GNU Pascal,
+GNU Modula 3, and GNU indent. Complete C++ source code for gperf is
+available from http://ftp.gnu.org/pub/gnu/gperf/.
A paper describing gperf's design and implementation in greater
-detail is available in the Second USENIX C++ Conference proceedings.
+detail is available in the Second USENIX C++ Conference proceedings
+or from http://www.cs.wustl.edu/~schmidt/resume.html.
gperf generates a static array
+retrievals. In practice, gperf generates a static array
containing search set keywords and any associated attributes specified
by the user. Thus, there is essentially no execution-time cost for the
insertions. It is a useful data structure for representing static
@@ -633,8 +640,8 @@ the drudgery associated with constructing time- and space-efficient
search structures by hand. It has proven a useful and practical tool
for serious programming projects. Output from gperf is currently
used in several production and research compilers, including GNU C, GNU
-C++, GNU Pascal, and GNU Modula 3. The latter two compilers are not yet
-part of the official GNU distribution. Each compiler utilizes
+C++, GNU Java, GNU Pascal, and GNU Modula 3. The latter two compilers are
+not yet part of the official GNU distribution. Each compiler utilizes
gperf to automatically generate static search structures that
efficiently identify their respective reserved keywords.
@@ -645,7 +652,7 @@ efficiently identify their respective reserved keywords.
gperf reads a set of
-"keywords" from a keyfile (or from the standard input by
+"keywords" from an input file (or from the standard input by
default). It attempts to derive a perfect hashing function that
recognizes a member of the static keyword set with at most a
single probe into the lookup table. If gperf succeeds in
@@ -668,7 +675,7 @@ somewhat. Actual results depend on your C compiler, of course.
gperf assigns values to the characters it is using
+In general, gperf assigns values to the bytes it is using
for hashing until some set of values gives each keyword a unique value.
A helpful heuristic is that the larger the hash value range, the easier
it is for gperf to find and generate a perfect hash function.
@@ -683,7 +690,7 @@ Experimentation is the key to getting the most from gperf.
-You can control the input keyfile format by varying certain command-line
+You can control the input file format by varying certain command-line
arguments, in particular the `-t' option. The input's appearance
is similar to GNU utilities flex and bison (or UNIX
utilities lex and yacc). Here's an outline of the general
@@ -700,25 +707,53 @@ functions
flex or bison, all sections of
-gperf's input are optional. The following sections describe the
+Unlike flex or bison, the declarations section and
+the functions section are optional. The following sections describe the
input format for each section.
+january
+february
+march
+april
+...
+
+
+
+
+3.1.1 Declarations
+
+gperf declarations that
+act like command-line options, as well as for providing a user-supplied
+struct.
+
+3.1.1
+struct Declarations and C Code Inclusion3.1.1.1 User-supplied
structstruct. If the `-t' option
+If the `-t' option (or, equivalently, the `%struct-type' declaration)
is enabled, you must provide a C struct as the last
-component in the declaration section from the keyfile file. The first
-field in this struct must be a char * or const char *
-identifier called `name', although it is possible to modify this
-field's name with the `-K' option described below.
+component in the declaration section from the input file. The first
+field in this struct must be of type char * or const char *
+if the `-P' option is not given, or of type int if the option
+`-P' (or, equivalently, the `%pic' declaration) is enabled.
+This first field must be called `name', although it is possible to modify
+its name with the `-K' option (or, equivalently, the
+`%define slot-name' declaration) described below.
lex.
3.1.1.2 Gperf Declarations
+
gperf declarations. They
+influence the way gperf works, like command line options do.
+In fact, every such declaration is equivalent to a command line option.
+There are three forms of declarations:
+
+
+
+
+gperf declarations are available.
+
+
+
+
+
+
+
+struct type declaration for generated
+code; see above for an example.
+
+gperf to generate code in the language specified by the
+option's argument. Languages handled are currently:
+
+
+
+
+
+The default is C.
+
+#define const to empty
+for compilers which don't know about this keyword.
+
+struct.
+
+Perfect_Hash.
+
+isalnum and isgraph do
+not guarantee that a byte is in this range. Only an explicit
+test like `c >= 'A' && c <= 'Z'' guarantees this.)
+
+strcmp.
+However, using `%compare-lengths' might greatly increase the size of the
+generated C code if the lookup table range is large (which implies that
+the switch option `-S' or `%switch' is not enabled), since the length
+table contains as many elements as there are entries in the lookup table.
+
+strncmp function to perform
+string comparisons. The default action is to use strcmp.
+
+<jjc@ai.mit.edu>.
+
+<string.h>, at the
+beginning of the code. By default, this is not done; the user must
+include this header file himself to allow compilation of the code.
+
+switch statement scheme,
+rather than an array lookup table. This can lead to a reduction in both
+time and space requirements for some input files. The argument to this
+option determines how many switch statements are generated. A
+value of 1 generates 1 switch containing all the elements, a
+value of 2 generates 2 tables with 1/2 the elements in each
+switch, etc. This is useful since many C compilers cannot
+correctly generate code for large switch statements. This option
+was inspired in part by Keith Bostic's original C program.
+
+3.1.1.3 C Code Inclusion
+
+flex and bison, it
is possible to directly include C source text and comments verbatim into
the generated output file. This is accomplished by enclosing the region
@@ -778,37 +1064,25 @@ march, 3, 31, 31
...
-
-january, 1, 31, 31
-february, 2, 28, 29
-march, 3, 31, 31
-april, 4, 30, 30
-...
-
-
-3.1.2 Format for Keyword Entries
+3.1.2 Format for Keyword Entries
\" or \234
-or \xa8. In either case, it must start right at the beginning
+or \xa8. In either case, it must start right at the beginning
of the line, without leading whitespace.
In this context, a "field" is considered to extend up to, but
not include, the first blank, comma, or newline. Here is a simple
@@ -840,14 +1114,15 @@ Additional fields may optionally follow the leading keyword. Fields
should be separated by commas, and terminate at the end of line. What
these fields mean is entirely up to you; they are used to initialize the
elements of the user-defined struct provided by you in the
-declaration section. If the `-t' option is not enabled
+declaration section. If the `-t' option (or, equivalently, the
+`%struct-type' declaration) is not enabled
these fields are simply ignored. All previous examples except the last
one contain keyword attributes.
3.1.3 Including Additional C Functions
+3.1.3 Including Additional C Functions
3.2 Output Format for Generated C Code with
+gperf3.1.4 Where to place directives for GNU
+
indent.indent on a gperf input file,
+you will see that GNU indent doesn't understand the `%%',
+`%{' and `%}' directives that control gperf's
+interpretation of the input file. Therefore you have to insert some
+directives for GNU indent. More precisely, assuming the most
+general input file structure
+
+
+declarations part 1
+%{
+verbatim code
+%}
+declarations part 2
+%%
+keywords
+%%
+functions
+
+
+
+/* *INDENT-OFF* */
+declarations part 1
+%{
+/* *INDENT-ON* */
+verbatim code
+/* *INDENT-OFF* */
+%}
+declarations part 2
+%%
+keywords
+%%
+/* *INDENT-ON* */
+functions
+
+
+
+
+3.2 Output Format for Generated C Code with
+
gperf
hash function returns an integer value
-created by adding len to several user-specified str key
+created by adding len to several user-specified str byte
positions indexed into an associated values table stored in a
local static array. The associated values table is constructed
internally by gperf and later output as a static local C array
-called `hash_table'; its meaning and properties are described below
-(see section 7 Implementation Details of GNU gperf). The relevant key positions are specified via
-the `-k' option when running gperf, as detailed in the
-Options section below(see section 4 Invoking gperf).
+called `hash_table'. The relevant selected positions (i.e. indices
+into str) are specified via the `-k' option when running
+gperf, as detailed in the Options section below (see section 4 Invoking gperf).
NULL.
-If the option `-c' is not used, str must be a NUL terminated -string of exactly length len. If `-c' is used, str must -simply be an array of len characters and does not need to be NUL +If the option `-c' (or, equivalently, the `%compare-strncmp' +declaration) is not used, str must be a NUL terminated +string of exactly length len. If `-c' (or, equivalently, the +`%compare-strncmp' declaration) is used, str must +simply be an array of len bytes and does not need to be NUL terminated.
@@ -925,7 +1250,7 @@ Make use of the user-definedstruct.
switch statement rather than use a large,
(and potentially sparse) static array. Although the exact time and
space savings of this approach vary according to your C compiler's
@@ -934,9 +1259,11 @@ code.
-If the `-t' and `-S' options are omitted, the default action
-is to generate a char * array containing the keys, together with
-additional null strings used for padding the array. By experimenting
+If the `-t' and `-S' options (or, equivalently, the
+`%struct-type' and `%switch' declarations) are omitted, the default
+action
+is to generate a char * array containing the keywords, together with
+additional empty strings used for padding the array. By experimenting
with the various input and output options, and timing the resulting C
code, you can determine the best option choices for different keyword
set characteristics.
@@ -944,60 +1271,84 @@ set characteristics.
By default, the code generated by gperf operates on zero
-terminated strings, the usual representation of strings in C. This means
-that the keywords in the input file must not contain NUL characters,
+terminated strings, the usual representation of strings in C. This means
+that the keywords in the input file must not contain NUL bytes,
and the str argument passed to hash or in_word_set
must be NUL terminated and have exactly length len.
-If option `-c' is used, then the str argument does not need
-to be NUL terminated. The code generated by gperf will only
+If option `-c' (or, equivalently, the `%compare-strncmp'
+declaration) is used, then the str argument does not need
+to be NUL terminated. The code generated by gperf will only
access the first len, not len+1, bytes starting at str.
However, the keywords in the input file still must not contain NUL
-characters.
+bytes.
-If option `-l' is used, then the hash table performs binary
-comparison. The keywords in the input file may contain NUL characters,
+If option `-l' (or, equivalently, the `%compare-lengths'
+declaration) is used, then the hash table performs binary
+comparison. The keywords in the input file may contain NUL bytes,
written in string syntax as \000 or \x00, and the code
-generated by gperf will treat NUL like any other character.
-Also, in this case the `-c' option is ignored.
+generated by gperf will treat NUL like any other byte.
+Also, in this case the `-c' option (or, equivalently, the
+`%compare-strncmp' declaration) is ignored.
gperfgperf
There are many options to gperf. They were added to make
the program more convenient for use with real applications. "On-line"
-help is readily available via the `-h' option. Here is the
+help is readily available via the `--help' option. Here is the
complete list of options.
+The results are written to standard output if no output file is specified +or if it is `-'. + +
+ + ++These options are also available as declarations in the input file +(see section 3.1.1.2 Gperf Declarations). + +
+gperf generated function.
+These options are also available as declarations in the input file +(see section 3.1.1.2 Gperf Declarations). + +
#define const to empty
for compilers which don't know about this keyword.
gperf. It does not do anything.
+gperf. It does not do anything.
gperf. It does not do anything.
+gperf. It does not do anything.
-+Most of these options are also available as declarations in the input file +(see section 3.1.1.2 Gperf Declarations). + +
struct.
Perfect_Hash.
@@ -1123,12 +1498,25 @@ allows you to specify the name of generated C++ class. Default name is
isalnum and isgraph do
-not guarantee that a character is in this range. Only an explicit
+not guarantee that a byte is in this range. Only an explicit
test like `c >= 'A' && c <= 'Z'' guarantees this.) This was the
default in versions of gperf earlier than 2.7; now the default is
-to assume 8-bit characters.
+to support 8-bit and multibyte characters.
+
+strcmp.
+However, using `-l' might greatly increase the size of the
+generated C code if the lookup table range is large (which implies that
+the switch option `-S' or `%switch' is not enabled), since the length
+table contains as many elements as there are entries in the lookup table.
switch statement scheme,
rather than an array lookup table. This can lead to a reduction in both
-time and space requirements for some keyfiles. The argument to this
-option determines how many switch statements are generated. A
+time and space requirements for some input files. The argument to this
+option determines how many switch statements are generated. A
value of 1 generates 1 switch containing all the elements, a
value of 2 generates 2 tables with 1/2 the elements in each
switch, etc. This is useful since many C compilers cannot
-correctly generate code for large switch statements. This option
+correctly generate code for large switch statements. This option
was inspired in part by Keith Bostic's original C program.
gperf. It does not do anything.
+gperf. It does not do anything.
gperfgperfstrcmp.
-However, using `-l' might greatly increase the size of the
-generated C code if the lookup table range is large (which implies that
-the switch option `-S' is not enabled), since the length table
-contains as many elements as there are entries in the lookup table.
-This option is mandatory for binary comparisons (see section 3.3 Use of NUL characters).
+This option is not normally needed since version 2.8 of gperf;
+the default byte positions are computed depending on the keyword set,
+through a search that minimizes the number of byte positions.
gperf does not backtrack it is possible for it to process
-all your input keywords without finding a unique mapping for each word.
-However, frequently only a very small number of duplicates occur, and
-the majority of keys still require one probe into the table.
-
-gperf treats all these keys as
+
+Handle keywords whose selected byte sets hash to duplicate values.
+Duplicate hash values can occur if a set of keywords has the same names, but
+possesses different attributes, or if the selected byte positions are not well
+chosen. With the -D option gperf treats all these keywords as
part of an equivalence class and generates a perfect hash function with
-multiple comparisons for duplicate keys. It is up to you to completely
+multiple comparisons for duplicate keywords. It is up to you to completely
disambiguate the keywords by modifying the generated C code. However,
gperf helps you out by organizing the output.
-gperf to work on
keyword sets that it otherwise could not handle.
-gperf's running time at the cost of minimizing generated
-table-size. The iteration amount represents the number of times to
-iterate when resolving a collision. `0' means iterate by the number of
-keywords. This option is probably most useful when used in conjunction
-with options `-D' and/or `-S' for large keyword sets.
+Perform multiple choices of the `-i' and `-j' values, and
+choose the best results. This increases the running time by a factor of
+iterations but does a good job minimizing the generated table size.
gperf
jumps by random amounts.
@@ -1319,24 +1713,6 @@ Instructs the generator not to include the length of a keyword when
computing its hash value. This may save a few assembly instructions in
the generated lookup table.
-gperf's execution time, since collisions will
-begin earlier and continue throughout the remainder of keyword
-processing. See Cichelli's paper from the January 1980 Communications
-of the ACM for details.
-
gperf has difficultly with a certain keyword set try using
-`-r' or `-D'.
+table.
gperf has difficultly with a certain keyword set try usi
gperf's runtime, since it must search through a much larger range
-of values. Judicious use of the `-f' option helps alleviate this
-overhead, however.
+heuristic.
gperfgperf
The following are some limitations with the current release of
@@ -1433,16 +1803,6 @@ work efficiently on much larger keyword sets (over 15,000 keywords).
When processing large keyword sets it helps greatly to have over 8 megs
of RAM.
-However, since gperf does not backtrack no guaranteed solution
-occurs on every run. On the other hand, it is usually easy to obtain a
-solution by varying the option parameters. In particular, try the
-`-r' option, and also try changing the default arguments to the
-`-s' and `-j' options. To guarantee a solution, use
-the `-D' and `-S' options, although the final results are not
-likely to be a perfect hash function anymore! Finally, use the
-`-f' option if you want gperf to generate the perfect hash
-function fast, with less emphasis on making it minimal.
-
It should be "relatively" easy to replace the current perfect hash @@ -1479,19 +1839,10 @@ worthwhile improvements include:
switch
option can minimize the data size, at the expense of slightly longer
lookups (note that the gcc compiler generally produces good code for
@@ -1500,40 +1851,30 @@ lookups (note that the gcc compiler generally produces good code for
gperf
-A paper describing the high-level description of the data structures and
-algorithms used to implement gperf will soon be available. This
-paper is useful not only from a maintenance and enhancement perspective,
-but also because they demonstrate several clever and useful programming
-techniques, e.g., `Iteration Number' boolean arrays, double
-hashing, a "safe" and efficient method for reading arbitrarily long
-input from a file, and a provably optimal algorithm for simultaneously
-determining both the minimum and maximum elements in a list.
-
-
[1] Chang, C.C.: A Scheme for Constructing Ordered Minimal Perfect Hashing Functions Information Sciences 39(1986), 187-195. - + +
+[2] Cichelli, Richard J. Author's Response to "On Cichelli's Minimal Perfect Hash Functions Method" Communications of the ACM, 23, 12(December 1980), 729. - + +
+[3] Cichelli, Richard J. Minimal Perfect Hash Functions Made Simple Communications of the ACM, 23, 1(January 1980), 17-19. - + +
+[4] Cook, C. R. and Oldehoeft, R.R. A Letter Oriented Minimal Perfect Hashing Function SIGPLAN Notices, 17, 9(September 1982), 18-27. @@ -1541,7 +1882,9 @@ Perfect Hashing Function SIGPLAN Notices, 17, 9(September 1982), 18-27.
[5] Cormack, G. V. and Horspool, R. N. S. and Kaiserwerth, M. Practical Perfect Hashing Computer Journal, 28, 1(January 1985), 54-58. - + +
+[6] Jaeschke, G. Reciprocal Hashing: A Method for Generating Minimal Perfect Hashing Functions Communications of the ACM, 24, 12(December 1981), 829-833. @@ -1564,44 +1907,71 @@ Second USENIX C++ Conference Proceedings, April 1990.
-[10] Sebesta, R.W. and Taylor, M.A. Minimal Perfect Hash Functions +[10] Schmidt, Douglas C. GPERF: A Perfect Hash Function Generator +C++ Report, SIGS 10 10 (November/December 1998). + +
++[11] Sebesta, R.W. and Taylor, M.A. Minimal Perfect Hash Functions for Reserved Word Lists SIGPLAN Notices, 20, 12(September 1985), 47-53.
-[11] Sprugnoli, R. Perfect Hashing Functions: A Single Probe +[12] Sprugnoli, R. Perfect Hashing Functions: A Single Probe Retrieving Method for Static Sets Communications of the ACM, 20 11(November 1977), 841-850.
-[12] Stallman, Richard M. Using and Porting GNU CC Free Software Foundation, +[13] Stallman, Richard M. Using and Porting GNU CC Free Software Foundation, 1988.
-[13] Stroustrup, Bjarne The C++ Programming Language. Addison-Wesley, 1986. +[14] Stroustrup, Bjarne The C++ Programming Language. Addison-Wesley, 1986.
-[14] Tiemann, Michael D. User's Guide to GNU C++ Free Software +[15] Tiemann, Michael D. User's Guide to GNU C++ Free Software Foundation, 1989.
-
switch, switch
+switch, switch
-This document was generated on 26 September 2000 using the +This document was generated on 7 May 2003 using the texi2html translator version 1.51.
diff --git a/doc/gperf.info b/doc/gperf.info index 526cacc..fda381f 100644 --- a/doc/gperf.info +++ b/doc/gperf.info @@ -1,4 +1,4 @@ -This is gperf.info, produced by makeinfo version 4.0 from gperf.texi. +This is gperf.info, produced by makeinfo version 4.3 from gperf.texi. INFO-DIR-SECTION Programming Tools START-INFO-DIR-ENTRY @@ -6,9 +6,9 @@ START-INFO-DIR-ENTRY END-INFO-DIR-ENTRY This file documents the features of the GNU Perfect Hash Function -Generator 2.7.2. +Generator 3.0. - Copyright (C) 1989-2000 Free Software Foundation, Inc. + Copyright (C) 1989-2003 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -42,13 +42,12 @@ bugs. * Copying:: GNU `gperf' General Public License says how you can copy and share `gperf'. * Contributors:: People who have contributed to `gperf'. -* Motivation:: Static search structures and GNU GPERF. +* Motivation:: The purpose of `gperf'. * Search Structures:: Static search structures and GNU `gperf' * Description:: High-level discussion of how GPERF functions. * Options:: A description of options to the program. * Bugs:: Known bugs and limitations with GPERF. * Projects:: Things still left to do. -* Implementation:: Implementation Details for GNU GPERF. * Bibliography:: Material Referenced in this Report. * Concept Index:: @@ -58,13 +57,20 @@ High-Level Description of GNU `gperf' * Input Format:: Input Format to `gperf' * Output Format:: Output Format for Generated C Code with `gperf' -* Binary Strings:: Use of NUL characters +* Binary Strings:: Use of NUL bytes Input Format to `gperf' -* Declarations:: `struct' Declarations and C Code Inclusion. +* Declarations:: Declarations. * Keywords:: Format for Keyword Entries. * Functions:: Including Additional C Functions. +* Controls for GNU indent:: Where to place directives for GNU `indent'. + +Declarations + +* User-supplied Struct:: Specifying keywords with attributes. +* Gperf Declarations:: Embedding command line options in the input. +* C Code Inclusion:: Including C declarations and definitions. Invoking `gperf' @@ -81,7 +87,6 @@ GNU GENERAL PUBLIC LICENSE ************************** Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. @@ -140,7 +145,6 @@ patent must be licensed for everyone's free use or not licensed at all. modification follow. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", @@ -445,15 +449,13 @@ Contributors to GNU `gperf' Utility *********************************** * The GNU `gperf' perfect hash function generator utility was - originally written in GNU C++ by Douglas C. Schmidt. It is now - also available in a highly-portable "old-style" C version. The - general idea for the perfect hash function generator was inspired - by Keith Bostic's algorithm written in C, and distributed to - net.sources around 1984. The current program is a heavily - modified, enhanced, and extended implementation of Keith's basic - idea, created at the University of California, Irvine. Bugs, - patches, and suggestions should be reported to both - `@@ -455,6 +455,6 @@ Public License instead of this License.
-Go to the first, previous, next, last section, table of contents. +Go to the first, previous, next, last section, table of contents. diff --git a/doc/gperf_10.html b/doc/gperf_10.html index 8f72c16..0590625 100644 --- a/doc/gperf_10.html +++ b/doc/gperf_10.html @@ -1,82 +1,104 @@
+ from gperf.texi on 7 May 2003 --> --
-[1] Chang, C.C.: A Scheme for Constructing Ordered Minimal Perfect -Hashing Functions Information Sciences 39(1986), 187-195. - -[2] Cichelli, Richard J. Author's Response to "On Cichelli's Minimal Perfect Hash -Functions Method" Communications of the ACM, 23, 12(December 1980), 729. - -[3] Cichelli, Richard J. Minimal Perfect Hash Functions Made Simple -Communications of the ACM, 23, 1(January 1980), 17-19. - -[4] Cook, C. R. and Oldehoeft, R.R. A Letter Oriented Minimal -Perfect Hashing Function SIGPLAN Notices, 17, 9(September 1982), 18-27. - -
--[5] Cormack, G. V. and Horspool, R. N. S. and Kaiserwerth, M. -Practical Perfect Hashing Computer Journal, 28, 1(January 1985), 54-58. - -[6] Jaeschke, G. Reciprocal Hashing: A Method for Generating Minimal -Perfect Hashing Functions Communications of the ACM, 24, 12(December -1981), 829-833. - -
--[7] Jaeschke, G. and Osterburg, G. On Cichelli's Minimal Perfect -Hash Functions Method Communications of the ACM, 23, 12(December 1980), -728-729. - -
--[8] Sager, Thomas J. A Polynomial Time Generator for Minimal Perfect -Hash Functions Communications of the ACM, 28, 5(December 1985), 523-532 - -
--[9] Schmidt, Douglas C. GPERF: A Perfect Hash Function Generator -Second USENIX C++ Conference Proceedings, April 1990. - -
--[10] Sebesta, R.W. and Taylor, M.A. Minimal Perfect Hash Functions -for Reserved Word Lists SIGPLAN Notices, 20, 12(September 1985), 47-53. - -
--[11] Sprugnoli, R. Perfect Hashing Functions: A Single Probe -Retrieving Method for Static Sets Communications of the ACM, 20 -11(November 1977), 841-850. - -
--[12] Stallman, Richard M. Using and Porting GNU CC Free Software Foundation, -1988. - -
--[13] Stroustrup, Bjarne The C++ Programming Language. Addison-Wesley, 1986. - -
--[14] Tiemann, Michael D. User's Guide to GNU C++ Free Software -Foundation, 1989. +
switch, switch
+-Go to the first, previous, next, last section, table of contents. +Go to the first, previous, next, last section, table of contents. diff --git a/doc/gperf_2.html b/doc/gperf_2.html index b3c3c57..3611e41 100644 --- a/doc/gperf_2.html +++ b/doc/gperf_2.html @@ -1,12 +1,12 @@
+ from gperf.texi on 7 May 2003 -->
@@ -18,15 +18,13 @@ Go to the first, previous,
The GNU gperf perfect hash function generator utility was
-originally written in GNU C++ by Douglas C. Schmidt. It is now also
-available in a highly-portable "old-style" C version. The general
+written in GNU C++ by Douglas C. Schmidt. The general
idea for the perfect hash function generator was inspired by Keith
Bostic's algorithm written in C, and distributed to net.sources around
1984. The current program is a heavily modified, enhanced, and extended
implementation of Keith's basic idea, created at the University of
California, Irvine. Bugs, patches, and suggestions should be reported
-to both <bug-gnu-utils@gnu.org> and
-<gperf-bugs@lists.sourceforge.net>.
+to <bug-gnu-gperf@gnu.org>.
gperf.
-Go to the first, previous, next, last section, table of contents. +Go to the first, previous, next, last section, table of contents. diff --git a/doc/gperf_3.html b/doc/gperf_3.html index 529b1c7..dda84ab 100644 --- a/doc/gperf_3.html +++ b/doc/gperf_3.html @@ -1,12 +1,12 @@
+ from gperf.texi on 7 May 2003 -->
@@ -16,8 +16,8 @@ Go to the first, previous,
gperf is a perfect hash function generator written in C++. It
transforms an n element user-specified keyword set W into a
perfect hash function F. F uniquely maps keywords in
-W onto the range 0..k, where k >= n. If k
-= n then F is a minimal perfect hash function.
+W onto the range 0..k, where k >= n-1. If k
+= n-1 then F is a minimal perfect hash function.
gperf generates a 0..k element static lookup table and a
pair of C functions. These functions determine whether a given
character string s occurs in W, using at most one probe into
@@ -27,14 +27,15 @@ the lookup table.
gperf 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 gperf is
-available via anonymous ftp from ftp://ftp.gnu.org/pub/gnu/gperf/.
+language processing tools, including GNU C, GNU C++, GNU Java, GNU Pascal,
+GNU Modula 3, and GNU indent. Complete C++ source code for gperf is
+available from http://ftp.gnu.org/pub/gnu/gperf/.
A paper describing gperf's design and implementation in greater
-detail is available in the Second USENIX C++ Conference proceedings.
+detail is available in the Second USENIX C++ Conference proceedings
+or from http://www.cs.wustl.edu/~schmidt/resume.html.
-Go to the first, previous, next, last section, table of contents. +Go to the first, previous, next, last section, table of contents. diff --git a/doc/gperf_4.html b/doc/gperf_4.html index 1658d3b..cdd063d 100644 --- a/doc/gperf_4.html +++ b/doc/gperf_4.html @@ -1,12 +1,12 @@
+ from gperf.texi on 7 May 2003 -->
@@ -19,7 +19,7 @@ Go to the first, previous,
A static search structure is an Abstract Data Type with certain
fundamental operations, e.g., initialize, insert,
and retrieve. Conceptually, all insertions occur before any
-retrievals. In practice, gperf generates a static array
+retrievals. In practice, gperf generates a static array
containing search set keywords and any associated attributes specified
by the user. Thus, there is essentially no execution-time cost for the
insertions. It is a useful data structure for representing static
@@ -86,13 +86,13 @@ the drudgery associated with constructing time- and space-efficient
search structures by hand. It has proven a useful and practical tool
for serious programming projects. Output from gperf is currently
used in several production and research compilers, including GNU C, GNU
-C++, GNU Pascal, and GNU Modula 3. The latter two compilers are not yet
-part of the official GNU distribution. Each compiler utilizes
+C++, GNU Java, GNU Pascal, and GNU Modula 3. The latter two compilers are
+not yet part of the official GNU distribution. Each compiler utilizes
gperf to automatically generate static search structures that
efficiently identify their respective reserved keywords.
-Go to the first, previous, next, last section, table of contents. +Go to the first, previous, next, last section, table of contents. diff --git a/doc/gperf_5.html b/doc/gperf_5.html index 010ad4e..af6dbe9 100644 --- a/doc/gperf_5.html +++ b/doc/gperf_5.html @@ -1,12 +1,12 @@
+ from gperf.texi on 7 May 2003 -->@@ -14,7 +14,7 @@ Go to the first, previous,
The perfect hash function generator gperf reads a set of
-"keywords" from a keyfile (or from the standard input by
+"keywords" from an input file (or from the standard input by
default). It attempts to derive a perfect hashing function that
recognizes a member of the static keyword set with at most a
single probe into the lookup table. If gperf succeeds in
@@ -37,7 +37,7 @@ somewhat. Actual results depend on your C compiler, of course.
-In general, gperf assigns values to the characters it is using
+In general, gperf assigns values to the bytes it is using
for hashing until some set of values gives each keyword a unique value.
A helpful heuristic is that the larger the hash value range, the easier
it is for gperf to find and generate a perfect hash function.
@@ -52,7 +52,7 @@ Experimentation is the key to getting the most from gperf.
-You can control the input keyfile format by varying certain command-line
+You can control the input file format by varying certain command-line
arguments, in particular the `-t' option. The input's appearance
is similar to GNU utilities flex and bison (or UNIX
utilities lex and yacc). Here's an outline of the general
@@ -69,25 +69,53 @@ functions
-Unlike flex or bison, all sections of
-gperf's input are optional. The following sections describe the
+Unlike flex or bison, the declarations section and
+the functions section are optional. The following sections describe the
input format for each section.
+It is possible to omit the declaration section entirely, if the `-t' +option is not given. In this case the input file begins directly with the +first keyword line, e.g.: + +
+ ++january +february +march +april +... ++ + + +
+The keyword input file optionally contains a section for including
+arbitrary C declarations and definitions, gperf declarations that
+act like command-line options, as well as for providing a user-supplied
+struct.
+
+
struct Declarations and C Code Inclusionstruct
-The keyword input file optionally contains a section for including
-arbitrary C declarations and definitions, as well as provisions for
-providing a user-supplied struct. If the `-t' option
+If the `-t' option (or, equivalently, the `%struct-type' declaration)
is enabled, you must provide a C struct as the last
-component in the declaration section from the keyfile file. The first
-field in this struct must be a char * or const char *
-identifier called `name', although it is possible to modify this
-field's name with the `-K' option described below.
+component in the declaration section from the input file. The first
+field in this struct must be of type char * or const char *
+if the `-P' option is not given, or of type int if the option
+`-P' (or, equivalently, the `%pic' declaration) is enabled.
+This first field must be called `name', although it is possible to modify
+its name with the `-K' option (or, equivalently, the
+`%define slot-name' declaration) described below.
@@ -121,9 +149,260 @@ appearing left justified in the first column, as in the UNIX utility
lex.
+The declaration section can contain gperf declarations. They
+influence the way gperf works, like command line options do.
+In fact, every such declaration is equivalent to a command line option.
+There are three forms of declarations:
+
+
+When a declaration is given both in the input file and as a command line +option, the command-line option's value prevails. + +
+
+The following gperf declarations are available.
+
+
struct type declaration for generated
+code; see above for an example.
+
+gperf to generate code in the language specified by the
+option's argument. Languages handled are currently:
+
+#define const to empty
+for compilers which don't know about this keyword.
+
+struct.
+
+Perfect_Hash.
+
+isalnum and isgraph do
+not guarantee that a byte is in this range. Only an explicit
+test like `c >= 'A' && c <= 'Z'' guarantees this.)
+
+strcmp.
+However, using `%compare-lengths' might greatly increase the size of the
+generated C code if the lookup table range is large (which implies that
+the switch option `-S' or `%switch' is not enabled), since the length
+table contains as many elements as there are entries in the lookup table.
+
+strncmp function to perform
+string comparisons. The default action is to use strcmp.
+
+<jjc@ai.mit.edu>.
+
+<string.h>, at the
+beginning of the code. By default, this is not done; the user must
+include this header file himself to allow compilation of the code.
+
+switch statement scheme,
+rather than an array lookup table. This can lead to a reduction in both
+time and space requirements for some input files. The argument to this
+option determines how many switch statements are generated. A
+value of 1 generates 1 switch containing all the elements, a
+value of 2 generates 2 tables with 1/2 the elements in each
+switch, etc. This is useful since many C compilers cannot
+correctly generate code for large switch statements. This option
+was inspired in part by Keith Bostic's original C program.
+
+
+
+
Using a syntax similar to GNU utilities flex and bison, it
is possible to directly include C source text and comments verbatim into
the generated output file. This is accomplished by enclosing the region
@@ -147,37 +426,25 @@ march, 3, 31, 31
...
-
-It is possible to omit the declaration section entirely. In this case -the keyfile begins directly with the first keyword line, e.g.: - -
- --january, 1, 31, 31 -february, 2, 28, 29 -march, 3, 31, 31 -april, 4, 30, 30 -... -- -
-The second keyfile format section contains lines of keywords and any +The second input file format section contains lines of keywords and any associated attributes you might supply. A line beginning with `#' in the first column is considered a comment. Everything following the -`#' is ignored, up to and including the following newline. +`#' is ignored, up to and including the following newline. A line +beginning with `%' in the first column is an option declaration and +must not occur within the keywords section.
-The first field of each non-comment line is always the key itself. It
+The first field of each non-comment line is always the keyword itself. It
can be given in two ways: as a simple name, i.e., without surrounding
string quotation marks, or as a string enclosed in double-quotes, in
C syntax, possibly with backslash escapes like \" or \234
-or \xa8. In either case, it must start right at the beginning
+or \xa8. In either case, it must start right at the beginning
of the line, without leading whitespace.
In this context, a "field" is considered to extend up to, but
not include, the first blank, comma, or newline. Here is a simple
@@ -209,14 +476,15 @@ Additional fields may optionally follow the leading keyword. Fields
should be separated by commas, and terminate at the end of line. What
these fields mean is entirely up to you; they are used to initialize the
elements of the user-defined struct provided by you in the
-declaration section. If the `-t' option is not enabled
+declaration section. If the `-t' option (or, equivalently, the
+`%struct-type' declaration) is not enabled
these fields are simply ignored. All previous examples except the last
one contain keyword attributes.
The optional third section also corresponds closely with conventions @@ -229,9 +497,57 @@ section is valid C.
-gperfindent.
-
+If you want to invoke GNU indent on a gperf input file,
+you will see that GNU indent doesn't understand the `%%',
+`%{' and `%}' directives that control gperf's
+interpretation of the input file. Therefore you have to insert some
+directives for GNU indent. More precisely, assuming the most
+general input file structure
+
+
+declarations part 1
+%{
+verbatim code
+%}
+declarations part 2
+%%
+keywords
+%%
+functions
+
+
++you would insert `*INDENT-OFF*' and `*INDENT-ON*' comments +as follows: + +
+ +
+/* *INDENT-OFF* */
+declarations part 1
+%{
+/* *INDENT-ON* */
+verbatim code
+/* *INDENT-OFF* */
+%}
+declarations part 2
+%%
+keywords
+%%
+/* *INDENT-ON* */
+functions
+
+
+
+
+gperf@@ -246,34 +562,36 @@ function prototypes are as follows:
hash function returns an integer value
-created by adding len to several user-specified str key
+created by adding len to several user-specified str byte
positions indexed into an associated values table stored in a
local static array. The associated values table is constructed
internally by gperf and later output as a static local C array
-called `hash_table'; its meaning and properties are described below
-(see section 7 Implementation Details of GNU gperf). The relevant key positions are specified via
-the `-k' option when running gperf, as detailed in the
-Options section below(see section 4 Invoking gperf).
+called `hash_table'. The relevant selected positions (i.e. indices
+into str) are specified via the `-k' option when running
+gperf, as detailed in the Options section below (see section 4 Invoking gperf).
NULL.
-If the option `-c' is not used, str must be a NUL terminated -string of exactly length len. If `-c' is used, str must -simply be an array of len characters and does not need to be NUL +If the option `-c' (or, equivalently, the `%compare-strncmp' +declaration) is not used, str must be a NUL terminated +string of exactly length len. If `-c' (or, equivalently, the +`%compare-strncmp' declaration) is used, str must +simply be an array of len bytes and does not need to be NUL terminated.
@@ -294,7 +612,7 @@ Make use of the user-definedstruct.
switch statement rather than use a large,
(and potentially sparse) static array. Although the exact time and
space savings of this approach vary according to your C compiler's
@@ -303,9 +621,11 @@ code.
-If the `-t' and `-S' options are omitted, the default action
-is to generate a char * array containing the keys, together with
-additional null strings used for padding the array. By experimenting
+If the `-t' and `-S' options (or, equivalently, the
+`%struct-type' and `%switch' declarations) are omitted, the default
+action
+is to generate a char * array containing the keywords, together with
+additional empty strings used for padding the array. By experimenting
with the various input and output options, and timing the resulting C
code, you can determine the best option choices for different keyword
set characteristics.
@@ -313,36 +633,39 @@ set characteristics.
By default, the code generated by gperf operates on zero
-terminated strings, the usual representation of strings in C. This means
-that the keywords in the input file must not contain NUL characters,
+terminated strings, the usual representation of strings in C. This means
+that the keywords in the input file must not contain NUL bytes,
and the str argument passed to hash or in_word_set
must be NUL terminated and have exactly length len.
-If option `-c' is used, then the str argument does not need
-to be NUL terminated. The code generated by gperf will only
+If option `-c' (or, equivalently, the `%compare-strncmp'
+declaration) is used, then the str argument does not need
+to be NUL terminated. The code generated by gperf will only
access the first len, not len+1, bytes starting at str.
However, the keywords in the input file still must not contain NUL
-characters.
+bytes.
-If option `-l' is used, then the hash table performs binary
-comparison. The keywords in the input file may contain NUL characters,
+If option `-l' (or, equivalently, the `%compare-lengths'
+declaration) is used, then the hash table performs binary
+comparison. The keywords in the input file may contain NUL bytes,
written in string syntax as \000 or \x00, and the code
-generated by gperf will treat NUL like any other character.
-Also, in this case the `-c' option is ignored.
+generated by gperf will treat NUL like any other byte.
+Also, in this case the `-c' option (or, equivalently, the
+`%compare-strncmp' declaration) is ignored.
-Go to the first, previous, next, last section, table of contents. +Go to the first, previous, next, last section, table of contents. diff --git a/doc/gperf_6.html b/doc/gperf_6.html index a9cbacc..599910d 100644 --- a/doc/gperf_6.html +++ b/doc/gperf_6.html @@ -1,38 +1,59 @@
+ from gperf.texi on 7 May 2003 -->-
gperfgperf
There are many options to gperf. They were added to make
the program more convenient for use with real applications. "On-line"
-help is readily available via the `-h' option. Here is the
+help is readily available via the `--help' option. Here is the
complete list of options.
+The results are written to standard output if no output file is specified +or if it is `-'. + +
+ + ++These options are also available as declarations in the input file +(see section 3.1.1.2 Gperf Declarations). + +
+gperf generated function.
+These options are also available as declarations in the input file +(see section 3.1.1.2 Gperf Declarations). + +
#define const to empty
for compilers which don't know about this keyword.
gperf. It does not do anything.
+gperf. It does not do anything.
gperf. It does not do anything.
+gperf. It does not do anything.
-+Most of these options are also available as declarations in the input file +(see section 3.1.1.2 Gperf Declarations). + +
struct.
Perfect_Hash.
@@ -158,12 +203,25 @@ allows you to specify the name of generated C++ class. Default name is
isalnum and isgraph do
-not guarantee that a character is in this range. Only an explicit
+not guarantee that a byte is in this range. Only an explicit
test like `c >= 'A' && c <= 'Z'' guarantees this.) This was the
default in versions of gperf earlier than 2.7; now the default is
-to assume 8-bit characters.
+to support 8-bit and multibyte characters.
+
+strcmp.
+However, using `-l' might greatly increase the size of the
+generated C code if the lookup table range is large (which implies that
+the switch option `-S' or `%switch' is not enabled), since the length
+table contains as many elements as there are entries in the lookup table.
switch statement scheme,
rather than an array lookup table. This can lead to a reduction in both
-time and space requirements for some keyfiles. The argument to this
-option determines how many switch statements are generated. A
+time and space requirements for some input files. The argument to this
+option determines how many switch statements are generated. A
value of 1 generates 1 switch containing all the elements, a
value of 2 generates 2 tables with 1/2 the elements in each
switch, etc. This is useful since many C compilers cannot
-correctly generate code for large switch statements. This option
+correctly generate code for large switch statements. This option
was inspired in part by Keith Bostic's original C program.
gperf. It does not do anything.
+gperf. It does not do anything.
gperfgperfstrcmp.
-However, using `-l' might greatly increase the size of the
-generated C code if the lookup table range is large (which implies that
-the switch option `-S' is not enabled), since the length table
-contains as many elements as there are entries in the lookup table.
-This option is mandatory for binary comparisons (see section 3.3 Use of NUL characters).
+This option is not normally needed since version 2.8 of gperf;
+the default byte positions are computed depending on the keyword set,
+through a search that minimizes the number of byte positions.
gperf does not backtrack it is possible for it to process
-all your input keywords without finding a unique mapping for each word.
-However, frequently only a very small number of duplicates occur, and
-the majority of keys still require one probe into the table.
-
-gperf treats all these keys as
+
+Handle keywords whose selected byte sets hash to duplicate values.
+Duplicate hash values can occur if a set of keywords has the same names, but
+possesses different attributes, or if the selected byte positions are not well
+chosen. With the -D option gperf treats all these keywords as
part of an equivalence class and generates a perfect hash function with
-multiple comparisons for duplicate keys. It is up to you to completely
+multiple comparisons for duplicate keywords. It is up to you to completely
disambiguate the keywords by modifying the generated C code. However,
gperf helps you out by organizing the output.
-gperf to work on
keyword sets that it otherwise could not handle.
-gperf's running time at the cost of minimizing generated
-table-size. The iteration amount represents the number of times to
-iterate when resolving a collision. `0' means iterate by the number of
-keywords. This option is probably most useful when used in conjunction
-with options `-D' and/or `-S' for large keyword sets.
+Perform multiple choices of the `-i' and `-j' values, and
+choose the best results. This increases the running time by a factor of
+iterations but does a good job minimizing the generated table size.
gperf
jumps by random amounts.
@@ -354,24 +418,6 @@ Instructs the generator not to include the length of a keyword when
computing its hash value. This may save a few assembly instructions in
the generated lookup table.
-gperf's execution time, since collisions will
-begin earlier and continue throughout the remainder of keyword
-processing. See Cichelli's paper from the January 1980 Communications
-of the ACM for details.
-
gperf has difficultly with a certain keyword set try using
-`-r' or `-D'.
+table.
gperf has difficultly with a certain keyword set try usi
gperf's runtime, since it must search through a much larger range
-of values. Judicious use of the `-f' option helps alleviate this
-overhead, however.
+heuristic.
-Go to the first, previous, next, last section, table of contents. +Go to the first, previous, next, last section, table of contents. diff --git a/doc/gperf_7.html b/doc/gperf_7.html index 263bff2..084f646 100644 --- a/doc/gperf_7.html +++ b/doc/gperf_7.html @@ -1,16 +1,16 @@
+ from gperf.texi on 7 May 2003 -->-
gperfgperf
The following are some limitations with the current release of
@@ -29,16 +29,6 @@ work efficiently on much larger keyword sets (over 15,000 keywords).
When processing large keyword sets it helps greatly to have over 8 megs
of RAM.
-However, since gperf does not backtrack no guaranteed solution
-occurs on every run. On the other hand, it is usually easy to obtain a
-solution by varying the option parameters. In particular, try the
-`-r' option, and also try changing the default arguments to the
-`-s' and `-j' options. To guarantee a solution, use
-the `-D' and `-S' options, although the final results are not
-likely to be a perfect hash function anymore! Finally, use the
-`-f' option if you want gperf to generate the perfect hash
-function fast, with less emphasis on making it minimal.
-
-Go to the first, previous, next, last section, table of contents. +Go to the first, previous, next, last section, table of contents. diff --git a/doc/gperf_8.html b/doc/gperf_8.html index a016c5d..58460aa 100644 --- a/doc/gperf_8.html +++ b/doc/gperf_8.html @@ -1,16 +1,16 @@
+ from gperf.texi on 7 May 2003 -->-
It should be "relatively" easy to replace the current perfect hash @@ -23,19 +23,10 @@ worthwhile improvements include:
switch
option can minimize the data size, at the expense of slightly longer
lookups (note that the gcc compiler generally produces good code for
@@ -44,11 +35,11 @@ lookups (note that the gcc compiler generally produces good code for
-Go to the first, previous, next, last section, table of contents. +Go to the first, previous, next, last section, table of contents. diff --git a/doc/gperf_9.html b/doc/gperf_9.html index e9c933d..4bc59ce 100644 --- a/doc/gperf_9.html +++ b/doc/gperf_9.html @@ -1,30 +1,95 @@
+ from gperf.texi on 7 May 2003 --> --
gperf
-A paper describing the high-level description of the data structures and
-algorithms used to implement gperf will soon be available. This
-paper is useful not only from a maintenance and enhancement perspective,
-but also because they demonstrate several clever and useful programming
-techniques, e.g., `Iteration Number' boolean arrays, double
-hashing, a "safe" and efficient method for reading arbitrarily long
-input from a file, and a provably optimal algorithm for simultaneously
-determining both the minimum and maximum elements in a list.
+[1] Chang, C.C.: A Scheme for Constructing Ordered Minimal Perfect
+Hashing Functions Information Sciences 39(1986), 187-195.
+[2] Cichelli, Richard J. Author's Response to "On Cichelli's Minimal Perfect Hash +Functions Method" Communications of the ACM, 23, 12(December 1980), 729. +
++[3] Cichelli, Richard J. Minimal Perfect Hash Functions Made Simple +Communications of the ACM, 23, 1(January 1980), 17-19. + +
++[4] Cook, C. R. and Oldehoeft, R.R. A Letter Oriented Minimal +Perfect Hashing Function SIGPLAN Notices, 17, 9(September 1982), 18-27. + +
++[5] Cormack, G. V. and Horspool, R. N. S. and Kaiserwerth, M. +Practical Perfect Hashing Computer Journal, 28, 1(January 1985), 54-58. + +
++[6] Jaeschke, G. Reciprocal Hashing: A Method for Generating Minimal +Perfect Hashing Functions Communications of the ACM, 24, 12(December +1981), 829-833. + +
++[7] Jaeschke, G. and Osterburg, G. On Cichelli's Minimal Perfect +Hash Functions Method Communications of the ACM, 23, 12(December 1980), +728-729. + +
++[8] Sager, Thomas J. A Polynomial Time Generator for Minimal Perfect +Hash Functions Communications of the ACM, 28, 5(December 1985), 523-532 + +
++[9] Schmidt, Douglas C. GPERF: A Perfect Hash Function Generator +Second USENIX C++ Conference Proceedings, April 1990. + +
++[10] Schmidt, Douglas C. GPERF: A Perfect Hash Function Generator +C++ Report, SIGS 10 10 (November/December 1998). + +
++[11] Sebesta, R.W. and Taylor, M.A. Minimal Perfect Hash Functions +for Reserved Word Lists SIGPLAN Notices, 20, 12(September 1985), 47-53. + +
++[12] Sprugnoli, R. Perfect Hashing Functions: A Single Probe +Retrieving Method for Static Sets Communications of the ACM, 20 +11(November 1977), 841-850. + +
++[13] Stallman, Richard M. Using and Porting GNU CC Free Software Foundation, +1988. + +
++[14] Stroustrup, Bjarne The C++ Programming Language. Addison-Wesley, 1986. + +
++[15] Tiemann, Michael D. User's Guide to GNU C++ Free Software +Foundation, 1989. + +
-Go to the first, previous, next, last section, table of contents. +Go to the first, previous, next, last section, table of contents. diff --git a/doc/gperf_toc.html b/doc/gperf_toc.html index 0ece534..3541fbb 100644 --- a/doc/gperf_toc.html +++ b/doc/gperf_toc.html @@ -1,15 +1,16 @@
+ from gperf.texi on 7 May 2003 -->gperf 2.7.2gperf 3.0
gperf
-gperf
-gperf
+gperf
-struct
+gperf
-gperf
-indent.
+gperf
+gperf
+gperf
+gperf
+-This document was generated on 26 September 2000 using the +This document was generated on 7 May 2003 using the texi2html translator version 1.51.