home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / GCC / GERLIB_DEV08B.LHA / gerlib / libg++ / gperf / gperf.info < prev    next >
Encoding:
GNU Info File  |  1993-12-12  |  50.6 KB  |  1,128 lines

  1. This is Info file gperf.info, produced by Makeinfo-1.52 from the input
  2. file ./gperf.texi.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * Gperf::                       Perfect Hash Function Generator.
  6. END-INFO-DIR-ENTRY
  7.  
  8.    This file documents the features of the GNU Perfect Hash Function
  9. Generator
  10.  
  11.    Copyright (C) 1989 Free Software Foundation, Inc.
  12.  
  13.    Permission is granted to make and distribute verbatim copies of this
  14. manual provided the copyright notice and this permission notice are
  15. preserved on all copies.
  16.  
  17.    Permission is granted to copy and distribute modified versions of
  18. this manual under the conditions for verbatim copying, provided also
  19. that the section entitled "GNU General Public License" is included
  20. exactly as in the original, and provided that the entire resulting
  21. derived work is distributed under the terms of a permission notice
  22. identical to this one.
  23.  
  24.    Permission is granted to copy and distribute translations of this
  25. manual into another language, under the above conditions for modified
  26. versions, except that the section entitled "GNU `gperf' General Public
  27. License" an d this permission notice may be included in translations
  28. approved by the Free Software Foundation instead of in the original
  29. English.
  30.  
  31. 
  32. File: gperf.info,  Node: Top,  Next: Copying,  Prev: (dir),  Up: (dir)
  33.  
  34. Introduction
  35. ************
  36.  
  37.    This manual documents the GNU `gperf' perfect hash function generator
  38. utility, focusing on its features and how to use them, and how to report
  39. bugs.
  40.  
  41. * Menu:
  42.  
  43. * Copying::            GNU `gperf' General Public License says
  44.                     how you can copy and share `gperf'.
  45. * Contributors::        People who have contributed to `gperf'.
  46. * Motivation::            Static search structures and GNU GPERF.
  47. * Search Structures::        Static search structures and GNU `gperf'
  48. * Description::            High-level discussion of how GPERF functions.
  49. * Options::            A description of options to the program.
  50. * Bugs::            Known bugs and limitations with GPERF.
  51. * Projects::            Things still left to do.
  52. * Implementation::        Implementation Details for GNU GPERF.
  53. * Bibliography::        Material Referenced in this Report.
  54.  
  55.  -- The Detailed Node Listing --
  56.  
  57. High-Level Description of GNU `gperf'
  58.  
  59. * Input Format::        Input Format to `gperf'
  60. * Output Format::        Output Format for Generated C Code with `gperf'
  61.  
  62. Input Format to `gperf'
  63.  
  64. * Declarations::        `struct' Declarations and C Code Inclusion.
  65. * Keywords::            Format for Keyword Entries.
  66. * Functions::            Including Additional C Functions.
  67.  
  68. 
  69. File: gperf.info,  Node: Copying,  Next: Contributors,  Prev: Top,  Up: Top
  70.  
  71. GNU GENERAL PUBLIC LICENSE
  72. **************************
  73.  
  74.                        Version 1, February 1989
  75.  
  76.      Copyright (C) 1989 Free Software Foundation, Inc.
  77.      675 Mass Ave, Cambridge, MA 02139, USA
  78.      
  79.      Everyone is permitted to copy and distribute verbatim copies
  80.      of this license document, but changing it is not allowed.
  81.  
  82. Preamble
  83. ========
  84.  
  85.    The license agreements of most software companies try to keep users
  86. at the mercy of those companies.  By contrast, our General Public
  87. License is intended to guarantee your freedom to share and change free
  88. software--to make sure the software is free for all its users.  The
  89. General Public License applies to the Free Software Foundation's
  90. software and to any other program whose authors commit to using it.
  91. You can use it for your programs, too.
  92.  
  93.    When we speak of free software, we are referring to freedom, not
  94. price.  Specifically, the General Public License is designed to make
  95. sure that you have the freedom to give away or sell copies of free
  96. software, that you receive source code or can get it if you want it,
  97. that you can change the software or use pieces of it in new free
  98. programs; and that you know you can do these things.
  99.  
  100.    To protect your rights, we need to make restrictions that forbid
  101. anyone to deny you these rights or to ask you to surrender the rights.
  102. These restrictions translate to certain responsibilities for you if you
  103. distribute copies of the software, or if you modify it.
  104.  
  105.    For example, if you distribute copies of a such a program, whether
  106. gratis or for a fee, you must give the recipients all the rights that
  107. you have.  You must make sure that they, too, receive or can get the
  108. source code.  And you must tell them their rights.
  109.  
  110.    We protect your rights with two steps: (1) copyright the software,
  111. and (2) offer you this license which gives you legal permission to copy,
  112. distribute and/or modify the software.
  113.  
  114.    Also, for each author's protection and ours, we want to make certain
  115. that everyone understands that there is no warranty for this free
  116. software.  If the software is modified by someone else and passed on, we
  117. want its recipients to know that what they have is not the original, so
  118. that any problems introduced by others will not reflect on the original
  119. authors' reputations.
  120.  
  121.    The precise terms and conditions for copying, distribution and
  122. modification follow.
  123.  
  124.                          TERMS AND CONDITIONS
  125.  
  126.   1. This License Agreement applies to any program or other work which
  127.      contains a notice placed by the copyright holder saying it may be
  128.      distributed under the terms of this General Public License.  The
  129.      "Program", below, refers to any such program or work, and a "work
  130.      based on the Program" means either the Program or any work
  131.      containing the Program or a portion of it, either verbatim or with
  132.      modifications.  Each licensee is addressed as "you".
  133.  
  134.   2. You may copy and distribute verbatim copies of the Program's source
  135.      code as you receive it, in any medium, provided that you
  136.      conspicuously and appropriately publish on each copy an
  137.      appropriate copyright notice and disclaimer of warranty; keep
  138.      intact all the notices that refer to this General Public License
  139.      and to the absence of any warranty; and give any other recipients
  140.      of the Program a copy of this General Public License along with
  141.      the Program.  You may charge a fee for the physical act of
  142.      transferring a copy.
  143.  
  144.   3. You may modify your copy or copies of the Program or any portion of
  145.      it, and copy and distribute such modifications under the terms of
  146.      Paragraph 1 above, provided that you also do the following:
  147.  
  148.         * cause the modified files to carry prominent notices stating
  149.           that you changed the files and the date of any change; and
  150.  
  151.         * cause the whole of any work that you distribute or publish,
  152.           that in whole or in part contains the Program or any part
  153.           thereof, either with or without modifications, to be licensed
  154.           at no charge to all third parties under the terms of this
  155.           General Public License (except that you may choose to grant
  156.           warranty protection to some or all third parties, at your
  157.           option).
  158.  
  159.         * If the modified program normally reads commands interactively
  160.           when run, you must cause it, when started running for such
  161.           interactive use in the simplest and most usual way, to print
  162.           or display an announcement including an appropriate copyright
  163.           notice and a notice that there is no warranty (or else,
  164.           saying that you provide a warranty) and that users may
  165.           redistribute the program under these conditions, and telling
  166.           the user how to view a copy of this General Public License.
  167.  
  168.         * You may charge a fee for the physical act of transferring a
  169.           copy, and you may at your option offer warranty protection in
  170.           exchange for a fee.
  171.  
  172.      Mere aggregation of another independent work with the Program (or
  173.      its derivative) on a volume of a storage or distribution medium
  174.      does not bring the other work under the scope of these terms.
  175.  
  176.   4. You may copy and distribute the Program (or a portion or
  177.      derivative of it, under Paragraph 2) in object code or executable
  178.      form under the terms of Paragraphs 1 and 2 above provided that you
  179.      also do one of the following:
  180.  
  181.         * accompany it with the complete corresponding machine-readable
  182.           source code, which must be distributed under the terms of
  183.           Paragraphs 1 and 2 above; or,
  184.  
  185.         * accompany it with a written offer, valid for at least three
  186.           years, to give any third party free (except for a nominal
  187.           charge for the cost of distribution) a complete
  188.           machine-readable copy of the corresponding source code, to be
  189.           distributed under the terms of Paragraphs 1 and 2 above; or,
  190.  
  191.         * accompany it with the information you received as to where the
  192.           corresponding source code may be obtained.  (This alternative
  193.           is allowed only for noncommercial distribution and only if you
  194.           received the program in object code or executable form alone.)
  195.  
  196.      Source code for a work means the preferred form of the work for
  197.      making modifications to it.  For an executable file, complete
  198.      source code means all the source code for all modules it contains;
  199.      but, as a special exception, it need not include source code for
  200.      modules which are standard libraries that accompany the operating
  201.      system on which the executable file runs, or for standard header
  202.      files or definitions files that accompany that operating system.
  203.  
  204.   5. You may not copy, modify, sublicense, distribute or transfer the
  205.      Program except as expressly provided under this General Public
  206.      License.  Any attempt otherwise to copy, modify, sublicense,
  207.      distribute or transfer the Program is void, and will automatically
  208.      terminate your rights to use the Program under this License.
  209.      However, parties who have received copies, or rights to use
  210.      copies, from you under this General Public License will not have
  211.      their licenses terminated so long as such parties remain in full
  212.      compliance.
  213.  
  214.   6. By copying, distributing or modifying the Program (or any work
  215.      based on the Program) you indicate your acceptance of this license
  216.      to do so, and all its terms and conditions.
  217.  
  218.   7. Each time you redistribute the Program (or any work based on the
  219.      Program), the recipient automatically receives a license from the
  220.      original licensor to copy, distribute or modify the Program
  221.      subject to these terms and conditions.  You may not impose any
  222.      further restrictions on the recipients' exercise of the rights
  223.      granted herein.
  224.  
  225.   8. The Free Software Foundation may publish revised and/or new
  226.      versions of the General Public License from time to time.  Such
  227.      new versions will be similar in spirit to the present version, but
  228.      may differ in detail to address new problems or concerns.
  229.  
  230.      Each version is given a distinguishing version number.  If the
  231.      Program specifies a version number of the license which applies to
  232.      it and "any later version", you have the option of following the
  233.      terms and conditions either of that version or of any later
  234.      version published by the Free Software Foundation.  If the Program
  235.      does not specify a version number of the license, you may choose
  236.      any version ever published by the Free Software Foundation.
  237.  
  238.   9. If you wish to incorporate parts of the Program into other free
  239.      programs whose distribution conditions are different, write to the
  240.      author to ask for permission.  For software which is copyrighted
  241.      by the Free Software Foundation, write to the Free Software
  242.      Foundation; we sometimes make exceptions for this.  Our decision
  243.      will be guided by the two goals of preserving the free status of
  244.      all derivatives of our free software and of promoting the sharing
  245.      and reuse of software generally.
  246.  
  247.                                 NO WARRANTY
  248.  
  249.  10. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
  250.      WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
  251.      LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
  252.      HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
  253.      WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
  254.      NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  255.      FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
  256.      QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  257.      PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
  258.      SERVICING, REPAIR OR CORRECTION.
  259.  
  260.  11. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  261.      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
  262.      MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
  263.      LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
  264.      INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
  265.      INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
  266.      DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
  267.      OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
  268.      OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
  269.      ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  270.  
  271.                       END OF TERMS AND CONDITIONS
  272.  
  273. Appendix: How to Apply These Terms to Your New Programs
  274. =======================================================
  275.  
  276.    If you develop a new program, and you want it to be of the greatest
  277. possible use to humanity, the best way to achieve this is to make it
  278. free software which everyone can redistribute and change under these
  279. terms.
  280.  
  281.    To do so, attach the following notices to the program.  It is safest
  282. to attach them to the start of each source file to most effectively
  283. convey the exclusion of warranty; and each file should have at least the
  284. "copyright" line and a pointer to where the full notice is found.
  285.  
  286.      ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
  287.      Copyright (C) 19YY  NAME OF AUTHOR
  288.      
  289.      This program is free software; you can redistribute it and/or modify
  290.      it under the terms of the GNU General Public License as published by
  291.      the Free Software Foundation; either version 1, or (at your option)
  292.      any later version.
  293.      
  294.      This program is distributed in the hope that it will be useful,
  295.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  296.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  297.      GNU General Public License for more details.
  298.      
  299.      You should have received a copy of the GNU General Public License
  300.      along with this program; if not, write to the Free Software
  301.      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  302.  
  303.    Also add information on how to contact you by electronic and paper
  304. mail.
  305.  
  306.    If the program is interactive, make it output a short notice like
  307. this when it starts in an interactive mode:
  308.  
  309.      Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
  310.      Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  311.      This is free software, and you are welcome to redistribute it
  312.      under certain conditions; type `show c' for details.
  313.  
  314.    The hypothetical commands `show w' and `show c' should show the
  315. appropriate parts of the General Public License.  Of course, the
  316. commands you use may be called something other than `show w' and `show
  317. c'; they could even be mouse-clicks or menu items--whatever suits your
  318. program.
  319.  
  320.    You should also get your employer (if you work as a programmer) or
  321. your school, if any, to sign a "copyright disclaimer" for the program,
  322. if necessary.  Here a sample; alter the names:
  323.  
  324.      Yoyodyne, Inc., hereby disclaims all copyright interest in the
  325.      program `Gnomovision' (a program to direct compilers to make passes
  326.      at assemblers) written by James Hacker.
  327.      
  328.      SIGNATURE OF TY COON, 1 April 1989
  329.      Ty Coon, President of Vice
  330.  
  331.    That's all there is to it!
  332.  
  333. 
  334. File: gperf.info,  Node: Contributors,  Next: Motivation,  Prev: Copying,  Up: Top
  335.  
  336. Contributors to GNU `gperf' Utility
  337. ***********************************
  338.  
  339.    * The GNU `gperf' perfect hash function generator utility was
  340.      originally written in GNU C++ by Douglas C. Schmidt.  It is now
  341.      also available in a highly-portable "old-style" C version.  The
  342.      general idea for the perfect hash function generator was inspired
  343.      by Keith Bostic's algorithm written in C, and distributed to
  344.      net.sources around 1984.  The current program is a heavily
  345.      modified, enhanced, and extended implementation of Keith's basic
  346.      idea, created at the University of California, Irvine.  Bugs,
  347.      patches, and suggestions should be reported to schmidt at
  348.      ics.uci.edu.
  349.  
  350.    * Special thanks is extended to Michael Tiemann and Doug Lea, for
  351.      providing a useful compiler, and for giving me a forum to exhibit
  352.      my creation.
  353.  
  354.      In addition, Adam de Boor and Nels Olson provided many tips and
  355.      insights that greatly helped improve the quality and functionality
  356.      of `gperf'.
  357.  
  358. 
  359. File: gperf.info,  Node: Motivation,  Next: Search Structures,  Prev: Contributors,  Up: Top
  360.  
  361. Introduction
  362. ************
  363.  
  364.    `gperf' is a perfect hash function generator written in C++.  It
  365. transforms an *n* element user-specified keyword set *W* into a perfect
  366. hash function *F*.  *F* uniquely maps keywords in *W* onto the range
  367. 0..*k*, where *k* >= *n*.  If *k = n* then *F* is a *minimal* perfect
  368. hash function.  `gperf' generates a 0..*k* element static lookup table
  369. and a pair of C functions.  These functions determine whether a given
  370. character string *s* occurs in *W*, using at most one probe into the
  371. lookup table.
  372.  
  373.    `gperf' currently generates the reserved keyword recognizer for
  374. lexical analyzers in several production and research compilers and
  375. language processing tools, including GNU C, GNU C++, GNU Pascal, GNU
  376. Modula 3, and GNU indent.  Complete C++ source code for `gperf' is
  377. available via anonymous ftp from ics.uci.edu.  `gperf' also is
  378. distributed along with the GNU libg++ library.  A highly portable,
  379. functionally equivalent K&R C version of `gperf' is archived in
  380. comp.sources.unix, volume 20.  Finally, a paper describing `gperf''s
  381. design and implementation in greater detail is available in the Second
  382. USENIX C++ Conference proceedings.
  383.  
  384. 
  385. File: gperf.info,  Node: Search Structures,  Next: Description,  Prev: Motivation,  Up: Top
  386.  
  387. Static search structures and GNU `gperf'
  388. ****************************************
  389.  
  390.    A "static search structure" is an Abstract Data Type with certain
  391. fundamental operations, *e.g.*, *initialize*, *insert*, and *retrieve*.
  392. Conceptually, all insertions occur before any retrievals.  In
  393. practice, `gperf' generates a `static' array containing search set
  394. keywords and any associated attributes specified by the user.  Thus,
  395. there is essentially no execution-time cost for the insertions.  It is
  396. a useful data structure for representing *static search sets*.  Static
  397. search sets occur frequently in software system applications.  Typical
  398. static search sets include compiler reserved words, assembler
  399. instruction opcodes, and built-in shell interpreter commands.  Search
  400. set members, called "keywords", are inserted into the structure only
  401. once, usually during program initialization, and are not generally
  402. modified at run-time.
  403.  
  404.    Numerous static search structure implementations exist, *e.g.*,
  405. arrays, linked lists, binary search trees, digital search tries, and
  406. hash tables.  Different approaches offer trade-offs between space
  407. utilization and search time efficiency.  For example, an *n* element
  408. sorted array is space efficient, though the average-case time
  409. complexity for retrieval operations using binary search is proportional
  410. to log *n*.  Conversely, hash table implementations often locate a
  411. table entry in constant time, but typically impose additional memory
  412. overhead and exhibit poor worst case performance.
  413.  
  414.    *Minimal perfect hash functions* provide an optimal solution for a
  415. particular class of static search sets.  A minimal perfect hash
  416. function is defined by two properties:
  417.  
  418.    * It allows keyword recognition in a static search set using at most
  419.      *one* probe into the hash table.  This represents the "perfect"
  420.      property.
  421.  
  422.    * The actual memory allocated to store the keywords is precisely
  423.      large enough for the keyword set, and *no larger*.  This is the
  424.      "minimal" property.
  425.  
  426.    For most applications it is far easier to generate *perfect* hash
  427. functions than *minimal perfect* hash functions.  Moreover, non-minimal
  428. perfect hash functions frequently execute faster than minimal ones in
  429. practice.  This phenomena occurs since searching a sparse keyword table
  430. increases the probability of locating a "null" entry, thereby reducing
  431. string comparisons.  `gperf''s default behavior generates
  432. *near-minimal* perfect hash functions for keyword sets.  However,
  433. `gperf' provides many options that permit user control over the degree
  434. of minimality and perfection.
  435.  
  436.    Static search sets often exhibit relative stability over time.  For
  437. example, Ada's 63 reserved words have remained constant for nearly a
  438. decade.  It is therefore frequently worthwhile to expend concerted
  439. effort building an optimal search structure *once*, if it subsequently
  440. receives heavy use multiple times.  `gperf' removes the drudgery
  441. associated with constructing time- and space-efficient search
  442. structures by hand.  It has proven a useful and practical tool for
  443. serious programming projects.  Output from `gperf' is currently used in
  444. several production and research compilers, including GNU C, GNU C++,
  445. GNU Pascal, and GNU Modula 3.  The latter two compilers are not yet
  446. part of the official GNU distribution.  Each compiler utilizes `gperf'
  447. to automatically generate static search structures that efficiently
  448. identify their respective reserved keywords.
  449.  
  450. 
  451. File: gperf.info,  Node: Description,  Next: Options,  Prev: Search Structures,  Up: Top
  452.  
  453. High-Level Description of GNU `gperf'
  454. *************************************
  455.  
  456. * Menu:
  457.  
  458. * Input Format::        Input Format to `gperf'
  459. * Output Format::        Output Format for Generated C Code with `gperf'
  460.  
  461.    The perfect hash function generator `gperf' reads a set of
  462. "keywords" from a "keyfile" (or from the standard input by default).
  463. It attempts to derive a perfect hashing function that recognizes a
  464. member of the "static keyword set" with at most a single probe into the
  465. lookup table.  If `gperf' succeeds in generating such a function it
  466. produces a pair of C source code routines that perform hashing and
  467. table lookup recognition.  All generated C code is directed to the
  468. standard output.  Command-line options described below allow you to
  469. modify the input and output format to `gperf'.
  470.  
  471.    By default, `gperf' attempts to produce time-efficient code, with
  472. less emphasis on efficient space utilization.  However, several options
  473. exist that permit trading-off execution time for storage space and vice
  474. versa.  In particular, expanding the generated table size produces a
  475. sparse search structure, generally yielding faster searches.
  476. Conversely, you can direct `gperf' to utilize a C `switch' statement
  477. scheme that minimizes data space storage size.  Furthermore, using a C
  478. `switch' may actually speed up the keyword retrieval time somewhat.
  479. Actual results depend on your C compiler, of course.
  480.  
  481.    In general, `gperf' assigns values to the characters it is using for
  482. hashing until some set of values gives each keyword a unique value.  A
  483. helpful heuristic is that the larger the hash value range, the easier
  484. it is for `gperf' to find and generate a perfect hash function.
  485. Experimentation is the key to getting the most from `gperf'.
  486.  
  487. 
  488. File: gperf.info,  Node: Input Format,  Next: Output Format,  Prev: Description,  Up: Description
  489.  
  490. Input Format to `gperf'
  491. =======================
  492.  
  493.    You can control the input keyfile format by varying certain
  494. command-line arguments, in particular the `-t' option.  The input's
  495. appearance is similar to GNU utilities `flex' and `bison' (or UNIX
  496. utilities `lex' and `yacc').  Here's an outline of the general format:
  497.  
  498.      declarations
  499.      %%
  500.      keywords
  501.      %%
  502.      functions
  503.  
  504.    *Unlike* `flex' or `bison', all sections of `gperf''s input are
  505. optional.  The following sections describe the input format for each
  506. section.
  507.  
  508. * Menu:
  509.  
  510. * Declarations::        `struct' Declarations and C Code Inclusion.
  511. * Keywords::            Format for Keyword Entries.
  512. * Functions::            Including Additional C Functions.
  513.  
  514. 
  515. File: gperf.info,  Node: Declarations,  Next: Keywords,  Prev: Input Format,  Up: Input Format
  516.  
  517. `struct' Declarations and C Code Inclusion
  518. ------------------------------------------
  519.  
  520.    The keyword input file optionally contains a section for including
  521. arbitrary C declarations and definitions, as well as provisions for
  522. providing a user-supplied `struct'.  If the `-t' option *is* enabled,
  523. you *must* provide a C `struct' as the last component in the
  524. declaration section from the keyfile file.  The first field in this
  525. struct must be a `char *' identifier called "name," although it is
  526. possible to modify this field's name with the `-K' option described
  527. below.
  528.  
  529.    Here is simple example, using months of the year and their
  530. attributes as input:
  531.  
  532.      struct months { char *name; int number; int days; int leap_days; };
  533.      %%
  534.      january,   1, 31, 31
  535.      february,  2, 28, 29
  536.      march,     3, 31, 31
  537.      april,     4, 30, 30
  538.      may,       5, 31, 31
  539.      june,      6, 30, 30
  540.      july,      7, 31, 31
  541.      august,    8, 31, 31
  542.      september, 9, 30, 30
  543.      october,  10, 31, 31
  544.      november, 11, 30, 30
  545.      december, 12, 31, 31
  546.  
  547.    Separating the `struct' declaration from the list of key words and
  548. other fields are a pair of consecutive percent signs, `%%', appearing
  549. left justified in the first column, as in the UNIX utility `lex'.
  550.  
  551.    Using a syntax similar to GNU utilities `flex' and `bison', it is
  552. possible to directly include C source text and comments verbatim into
  553. the generated output file.  This is accomplished by enclosing the region
  554. inside left-justified surrounding `%{', `%}' pairs.  Here is an input
  555. fragment based on the previous example that illustrates this feature:
  556.  
  557.      %{
  558.      #include <assert.h>
  559.      /* This section of code is inserted directly into the output. */
  560.      int return_month_days (struct months *months, int is_leap_year);
  561.      %}
  562.      struct months { char *name; int number; int days; int leap_days; };
  563.      %%
  564.      january,   1, 31, 31
  565.      february,  2, 28, 29
  566.      march,     3, 31, 31
  567.      ...
  568.  
  569.    It is possible to omit the declaration section entirely.  In this
  570. case the keyfile begins directly with the first keyword line, *e.g.*:
  571.  
  572.      january,   1, 31, 31
  573.      february,  2, 28, 29
  574.      march,     3, 31, 31
  575.      april,     4, 30, 30
  576.      ...
  577.  
  578. 
  579. File: gperf.info,  Node: Keywords,  Next: Functions,  Prev: Declarations,  Up: Input Format
  580.  
  581. Format for Keyword Entries
  582. --------------------------
  583.  
  584.    The second keyfile format section contains lines of keywords and any
  585. associated attributes you might supply.  A line beginning with `#' in
  586. the first column is considered a comment.  Everything following the `#'
  587. is ignored, up to and including the following newline.
  588.  
  589.    The first field of each non-comment line is always the key itself.
  590. It should be given as a simple name, *i.e.*, without surrounding string
  591. quotation marks, and be left-justified flush against the first column.
  592. In this context, a "field" is considered to extend up to, but not
  593. include, the first blank, comma, or newline.  Here is a simple example
  594. taken from a partial list of C reserved words:
  595.  
  596.      # These are a few C reserved words, see the c.`gperf' file
  597.      # for a complete list of ANSI C reserved words.
  598.      unsigned
  599.      sizeof
  600.      switch
  601.      signed
  602.      if
  603.      default
  604.      for
  605.      while
  606.      return
  607.  
  608.    Note that unlike `flex' or `bison' the first `%%' marker may be
  609. elided if the declaration section is empty.
  610.  
  611.    Additional fields may optionally follow the leading keyword.  Fields
  612. should be separated by commas, and terminate at the end of line.  What
  613. these fields mean is entirely up to you; they are used to initialize the
  614. elements of the user-defined `struct' provided by you in the
  615. declaration section.  If the `-t' option is *not* enabled these fields
  616. are simply ignored.  All previous examples except the last one contain
  617. keyword attributes.
  618.  
  619. 
  620. File: gperf.info,  Node: Functions,  Prev: Keywords,  Up: Input Format
  621.  
  622. Including Additional C Functions
  623. --------------------------------
  624.  
  625.    The optional third section also corresponds closely with conventions
  626. found in `flex' and `bison'.  All text in this section, starting at the
  627. final `%%' and extending to the end of the input file, is included
  628. verbatim into the generated output file.  Naturally, it is your
  629. responsibility to ensure that the code contained in this section is
  630. valid C.
  631.  
  632. 
  633. File: gperf.info,  Node: Output Format,  Prev: Input Format,  Up: Description
  634.  
  635. Output Format for Generated C Code with `gperf'
  636. ===============================================
  637.  
  638.    Several options control how the generated C code appears on the
  639. standard output.  Two C function are generated.  They are called `hash'
  640. and `in_word_set', although you may modify the name for `in_word_set'
  641. with a command-line option.  Both functions require two arguments, a
  642. string, `char *' STR, and a length parameter, `int' LEN.  Their default
  643. function prototypes are as follows:
  644.  
  645.      static int hash (char *str, int len);
  646.      int in_word_set (char *str, int len);
  647.  
  648.    By default, the generated `hash' function returns an integer value
  649. created by adding LEN to several user-specified STR key positions
  650. indexed into an "associated values" table stored in a local static
  651. array.  The associated values table is constructed internally by
  652. `gperf' and later output as a static local C array called HASH_TABLE;
  653. its meaning and properties are described below.  *Note
  654. Implementation::. The relevant key positions are specified via the `-k'
  655. option when running `gperf', as detailed in the *Options* section
  656. below. *Note Options::.
  657.  
  658.    Two options, `-g' (assume you are compiling with GNU C and its
  659. `inline' feature) and `-a' (assume ANSI C-style function prototypes),
  660. alter the content of both the generated `hash' and `in_word_set'
  661. routines.  However, function `in_word_set' may be modified more
  662. extensively, in response to your option settings.  The options that
  663. affect the `in_word_set' structure are:
  664.  
  665.     `-p'
  666.           Have function `in_word_set' return a pointer rather than a
  667.           boolean.
  668.  
  669.     `-t'
  670.           Make use of the user-defined `struct'.
  671.  
  672.     `-S TOTAL SWITCH STATEMENTS'
  673.           Generate 1 or more C `switch' statement rather than use a
  674.           large, (and potentially sparse) static array.  Although the
  675.           exact time and space savings of this approach vary according
  676.           to your C compiler's degree of optimization, this method
  677.           often results in smaller and faster code.
  678.  
  679.    If the `-t', `-S', and `-p' options are omitted the default action
  680. is to generate a `char *' array containing the keys, together with
  681. additional null strings used for padding the array.  By experimenting
  682. with the various input and output options, and timing the resulting C
  683. code, you can determine the best option choices for different keyword
  684. set characteristics.
  685.  
  686. 
  687. File: gperf.info,  Node: Options,  Next: Bugs,  Prev: Description,  Up: Top
  688.  
  689. Options to the `gperf' Utility
  690. ******************************
  691.  
  692.    There are *many* options to `gperf'.  They were added to make the
  693. program more convenient for use with real applications.  "On-line" help
  694. is readily available via the `-h' option.  Other options include:
  695.  
  696.     `-a'
  697.           Generate ANSI Standard C code using function prototypes.  The
  698.           default is to use "classic" K&R C function declaration syntax.
  699.  
  700.     `-c'
  701.           Generates C code that uses the `strncmp' function to perform
  702.           string comparisons.  The default action is to use `strcmp'.
  703.  
  704.     `-C'
  705.           Makes the contents of all generated lookup tables constant,
  706.           *i.e.*, "readonly."  Many compilers can generate more
  707.           efficient code for this by putting the tables in readonly
  708.           memory.
  709.  
  710.     `-d'
  711.           Enables the debugging option.  This produces verbose
  712.           diagnostics to "standard error" when `gperf' is executing.
  713.           It is useful both for maintaining the program and for
  714.           determining whether a given set of options is actually
  715.           speeding up the search for a solution.  Some useful
  716.           information is dumped at the end of the program when the `-d'
  717.           option is enabled.
  718.  
  719.     `-D'
  720.           Handle keywords whose key position sets hash to duplicate
  721.           values.  Duplicate hash values occur for two reasons:
  722.  
  723.              * Since `gperf' does not backtrack it is possible for it
  724.                to process all your input keywords without finding a
  725.                unique mapping for each word.  However, frequently only
  726.                a very small number of duplicates occur, and the
  727.                majority of keys still require one probe into the table.
  728.  
  729.              * Sometimes a set of keys may have the same names, but
  730.                possess different attributes.  With the -D option
  731.                `gperf' treats all these keys as part of an equivalence
  732.                class and generates a perfect hash function with multiple
  733.                comparisons for duplicate keys.  It is up to you to
  734.                completely disambiguate the keywords by modifying the
  735.                generated C code.  However, `gperf' helps you out by
  736.                organizing the output.
  737.  
  738.           Option `-D' is extremely useful for certain large or highly
  739.           redundant keyword sets, *i.e.*, assembler instruction opcodes.
  740.           Using this option usually means that the generated hash
  741.           function is no longer perfect.  On the other hand, it permits
  742.           `gperf' to work on keyword sets that it otherwise could not
  743.           handle.
  744.  
  745.     `-e KEYWORD DELIMITER LIST'
  746.           Allows the user to provide a string containing delimiters
  747.           used to separate keywords from their attributes.  The default
  748.           is ",\n".  This option is essential if you want to use
  749.           keywords that have embedded commas or newlines.  One useful
  750.           trick is to use -e'TAB', where TAB is the literal tab
  751.           character.
  752.  
  753.     `-E'
  754.           Define constant values using an enum local to the lookup
  755.           function rather than with #defines.  This also means that
  756.           different lookup functions can reside in the same file.
  757.           Thanks to James Clark (jjc at ai.mit.edu).
  758.  
  759.     `-f ITERATION AMOUNT'
  760.           Generate the perfect hash function "fast."  This decreases
  761.           `gperf''s running time at the cost of minimizing generated
  762.           table-size.  The iteration amount represents the number of
  763.           times to iterate when resolving a collision.  `0' means
  764.           `iterate by the number of keywords.  This option is probably
  765.           most useful when used in conjunction with options `-D' and/or
  766.           `-S' for *large* keyword sets.
  767.  
  768.     `-g'
  769.           Assume a GNU compiler, *e.g.*, `g++' or `gcc'.  This makes
  770.           all generated routines use the "inline" keyword to remove the
  771.           cost of function calls.  Note that `-g' does *not* imply
  772.           `-a', since other non-ANSI C compilers may have provisions
  773.           for a function `inline' feature.
  774.  
  775.     `-G'
  776.           Generate the static table of keywords as a static global
  777.           variable, rather than hiding it inside of the lookup function
  778.           (which is the default behavior).
  779.  
  780.     `-h'
  781.           Prints a short summary on the meaning of each program option.
  782.           Aborts further program execution.
  783.  
  784.     `-H HASH FUNCTION NAME'
  785.           Allows you to specify the name for the generated hash
  786.           function.  Default name is `hash.'  This option permits the
  787.           use of two hash tables in the same file.
  788.  
  789.     `-i INITIAL VALUE'
  790.           Provides an initial VALUE for the associate values array.
  791.           Default is 0.  Increasing the initial value helps inflate the
  792.           final table size, possibly leading to more time efficient
  793.           keyword lookups.  Note that this option is not particularly
  794.           useful when `-S' is used.  Also, `-i' is overriden when the
  795.           `-r' option is used.
  796.  
  797.     `-j JUMP VALUE'
  798.           Affects the "jump value," *i.e.*, how far to advance the
  799.           associated character value upon collisions.  JUMP VALUE is
  800.           rounded up to an odd number, the default is 5.  If the JUMP
  801.           VALUE is 0 `gper f' jumps by random amounts.
  802.  
  803.     `-k KEYS'
  804.           Allows selection of the character key positions used in the
  805.           keywords' hash function. The allowable choices range between
  806.           1-126, inclusive.  The positions are separated by commas,
  807.           *e.g.*, `-k 9,4,13,14'; ranges may be used, *e.g.*, `-k 2-7';
  808.           and positions may occur in any order.  Furthermore, the
  809.           meta-character '*' causes the generated hash function to
  810.           consider *all* character positions in each key, whereas '$'
  811.           instructs the hash function to use the "final character" of a
  812.           key (this is the only way to use a character position greater
  813.           than 126, incidentally).
  814.  
  815.           For instance, the option `-k 1,2,4,6-10,'$'' generates a hash
  816.           function that considers positions 1,2,4,6,7,8,9,10, plus the
  817.           last character in each key (which may differ for each key,
  818.           obviously).  Keys with length less than the indicated key
  819.           positions work properly, since selected key positions
  820.           exceeding the key length are simply not referenced in the
  821.           hash function.
  822.  
  823.     `-K KEY NAME'
  824.           By default, the program assumes the structure component
  825.           identifier for the keyword is "name."  This option allows an
  826.           arbitrary choice of identifier for this component, although
  827.           it still must occur as the first field in your supplied
  828.           `struct'.
  829.  
  830.     `-l'
  831.           Compare key lengths before trying a string comparison.  This
  832.           might cut down on the number of string comparisons made
  833.           during the lookup, since keys with different lengths are
  834.           never compared via `strcmp'.  However, using `-l' might
  835.           greatly increase the size of the generated C code if the
  836.           lookup table range is large (which implies that the switch
  837.           option `-S' is not enabled), since the length table contains
  838.           as many elements as there are entries in the lookup table.
  839.  
  840.     `-L GENERATED LANGUAGE NAME'
  841.           Instructs `gperf' to generate code in the language specified
  842.           by the option's argument.  Languages handled are currently
  843.           C++ and C.  The default is C.
  844.  
  845.     `-n'
  846.           Instructs the generator not to include the length of a
  847.           keyword when computing its hash value.  This may save a few
  848.           assembly instructions in the generated lookup table.
  849.  
  850.     `-N LOOKUP FUNCTION NAME'
  851.           Allows you to specify the name for the generated lookup
  852.           function.  Default name is `in_word_set.'  This option
  853.           permits completely automatic generation of perfect hash
  854.           functions, especially when multiple generated hash functions
  855.           are used in the same application.
  856.  
  857.     `-o'
  858.           Reorders the keywords by sorting the keywords so that
  859.           frequently occuring key position set components appear first.
  860.           A second reordering pass follows so that keys with "already
  861.           determined values" are placed towards the front of the
  862.           keylist.  This may decrease the time required to generate a
  863.           perfect hash function for many keyword sets, and also produce
  864.           more minimal perfect hash functions.  The reason for this is
  865.           that the reordering helps prune the search time by handling
  866.           inevitable collisions early in the search process.  On the
  867.           other hand, if the number of keywords is *very* large using
  868.           `-o' may *increase* `gperf''s execution time, since
  869.           collisions will begin earlier and continue throughout the
  870.           remainder of keyword processing.  See Cichelli's paper from
  871.           the January 1980 Communications of the ACM for details.
  872.  
  873.     `-p'
  874.           Changes the return value of the generated function
  875.           `in_word_set' from boolean (*i.e.*, 0 or 1), to either type
  876.           "pointer to user-defined struct," (if the `-t' option is
  877.           enabled), or simply to `char *', if `-t' is not enabled.
  878.           This option is most useful when the `-t' option (allowing
  879.           user-defined structs) is used.  For example, it is possible
  880.           to automatically generate the GNU C reserved word lookup
  881.           routine with the options `-p' and `-t'.
  882.  
  883.     `-r'
  884.           Utilizes randomness to initialize the associated values
  885.           table.  This frequently generates solutions faster than using
  886.           deterministic initialization (which starts all associated
  887.           values at 0).  Furthermore, using the randomization option
  888.           generally increases the size of the table.  If `gperf' has
  889.           difficultly with a certain keyword set try using `-r' or `-D'.
  890.  
  891.     `-s SIZE-MULTIPLE'
  892.           Affects the size of the generated hash table.  The numeric
  893.           argument for this option indicates "how many times larger or
  894.           smaller" the maximum associated value range should be, in
  895.           relationship to the number of keys.  If the SIZE-MULTIPLE is
  896.           negative the maximum associated value is calculated by
  897.           *dividing* it into the total number of keys.  For example, a
  898.           value of 3 means "allow the maximum associated value to be
  899.           about 3 times larger than the number of input keys."
  900.  
  901.           Conversely, a value of -3 means "allow the maximum associated
  902.           value to be about 3 times smaller than the number of input
  903.           keys."  Negative values are useful for limiting the overall
  904.           size of the generated hash table, though this usually
  905.           increases the number of duplicate hash values.
  906.  
  907.           If `generate switch' option `-S' is *not* enabled, the maximum
  908.           associated value influences the static array table size, and
  909.           a larger table should decrease the time required for an
  910.           unsuccessful search, at the expense of extra table space.
  911.  
  912.           The default value is 1, thus the default maximum associated
  913.           value about the same size as the number of keys (for
  914.           efficiency, the maximum associated value is always rounded up
  915.           to a power of 2).  The actual table size may vary somewhat,
  916.           since this technique is essentially a heuristic.  In
  917.           particular, setting this value too high slows down `gperf''s
  918.           runtime, since it must search through a much larger range of
  919.           values.  Judicious use of the `-f' option helps alleviate this
  920.           overhead, however.
  921.  
  922.     `-S TOTAL SWITCH STATEMENTS'
  923.           Causes the generated C code to use a `switch' statement
  924.           scheme, rather than an array lookup table.  This can lead to
  925.           a reduction in both time and space requirements for some
  926.           keyfiles.  The argument to this option determines how many
  927.           `switch' statements are generated. A value of 1 generates 1
  928.           `switch' containing all the elements, a value of 2 generates
  929.           2 tables with 1/2 the elements in each `switch', etc.  This
  930.           is useful since many C compilers cannot correctly generate
  931.           code for large `switch' statements. This option was inspired
  932.           in part by Keith Bostic's original C program.
  933.  
  934.     `-t'
  935.           Allows you to include a `struct' type declaration for
  936.           generated code.  Any text before a pair of consecutive %% is
  937.           consider part of the type declaration.  Key words and
  938.           additional fields may follow this, one group of fields per
  939.           line.  A set of examples for generating perfect hash tables
  940.           and functions for Ada, C, and G++, Pascal, and Modula 2 and 3
  941.           reserved words are distributed with this release.
  942.  
  943.     `-T'
  944.           Prevents the transfer of the type declaration to the output
  945.           file.  Use this option if the type is already defined
  946.           elsewhere.
  947.  
  948.     `-v'
  949.           Prints out the current version number.
  950.  
  951.     `-Z CLASS NAME'
  952.           Allow user to specify name of generated C++ class.  Default
  953.           name is `Perfect_Hash'.
  954.  
  955. 
  956. File: gperf.info,  Node: Bugs,  Next: Projects,  Prev: Options,  Up: Top
  957.  
  958. Known Bugs and Limitations with `gperf'
  959. ***************************************
  960.  
  961.    The following are some limitations with the current release of
  962. `gperf':
  963.  
  964.    * The `gperf' utility is tuned to execute quickly, and works quickly
  965.      for small to medium size data sets (around 1000 keywords).  It is
  966.      extremely useful for maintaining perfect hash functions for
  967.      compiler keyword sets.  Several recent enhancements now enable
  968.      `gperf' to work efficiently on much larger keyword sets (over
  969.      15,000 keywords).  When processing large keyword sets it helps
  970.      greatly to have over 8 megs of RAM.
  971.  
  972.      However, since `gperf' does not backtrack no guaranteed solution
  973.      occurs on every run.  On the other hand, it is usually easy to
  974.      obtain a solution by varying the option parameters.  In
  975.      particular, try the `-r' option, and also try changing the default
  976.      arguments to the `-s' and `-j' options.  To *guarantee* a
  977.      solution, use the `-D' and `-S' options, although the final
  978.      results are not likely to be a *perfect* hash function anymore!
  979.      Finally, use the `-f' option if you want `gperf' to generate the
  980.      perfect hash function *fast*, with less emphasis on making it
  981.      minimal.
  982.  
  983.    * The size of the generate static keyword array can get *extremely*
  984.      large if the input keyword file is large or if the keywords are
  985.      quite similar.  This tends to slow down the compilation of the
  986.      generated C code, and *greatly* inflates the object code size.  If
  987.      this situation occurs, consider using the `-S' option to reduce
  988.      data size, potentially increasing keyword recognition time a
  989.      negligible amount.  Since many C compilers cannot correctly
  990.      generated code for large switch statements it is important to
  991.      qualify the -S option with an appropriate numerical argument that
  992.      controls the number of switch statements generated.
  993.  
  994.    * The maximum number of key positions selected for a given key has an
  995.      arbitrary limit of 126.  This restriction should be removed, and if
  996.      anyone considers this a problem write me and let me know so I can
  997.      remove the constraint.
  998.  
  999.    * The C++ source code only compiles correctly with GNU G++, version
  1000.      1.36 (and hopefully later versions).  Porting to AT&T cfront would
  1001.      be tedious, but possible (and desirable).  There is also a K&R C
  1002.      version available now.  This should compile without change on most
  1003.      BSD systems, but may require a bit of work to run on SYSV, since
  1004.      `gperf' uses ALLOCA in several places.  Send mail to schmidt at
  1005.      ics.uci.edu for information.
  1006.  
  1007. 
  1008. File: gperf.info,  Node: Projects,  Next: Implementation,  Prev: Bugs,  Up: Top
  1009.  
  1010. Things Still Left to Do
  1011. ***********************
  1012.  
  1013.    It should be "relatively" easy to replace the current perfect hash
  1014. function algorithm with a more exhaustive approach; the perfect hash
  1015. module is essential independent from other program modules.  Additional
  1016. worthwhile improvements include:
  1017.  
  1018.    * Make the algorithm more robust.  At present, the program halts
  1019.      with an error diagnostic if it can't find a direct solution and
  1020.      the `-D' option is not enabled.  A more comprehensive, albeit
  1021.      computationally expensive, approach would employ backtracking or
  1022.      enable alternative options and retry.  It's not clear how helpful
  1023.      this would be, in general, since most search sets are rather small
  1024.      in practice.
  1025.  
  1026.    * Another useful extension involves modifying the program to generate
  1027.      "minimal" perfect hash functions (under certain circumstances, the
  1028.      current version can be rather extravagant in the generated table
  1029.      size).  Again, this is mostly of theoretical interest, since a
  1030.      sparse table often produces faster lookups, and use of the `-S'
  1031.      `switch' option can minimize the data size, at the expense of
  1032.      slightly longer lookups (note that the gcc compiler generally
  1033.      produces good code for `switch' statements, reducing the need for
  1034.      more complex schemes).
  1035.  
  1036.    * In addition to improving the algorithm, it would also be useful to
  1037.      generate a C++ class or Ada package as the code output, in
  1038.      addition to the current C routines.
  1039.  
  1040. 
  1041. File: gperf.info,  Node: Implementation,  Next: Bibliography,  Prev: Projects,  Up: Top
  1042.  
  1043. Implementation Details of GNU `gperf'
  1044. *************************************
  1045.  
  1046.    A paper describing the high-level description of the data structures
  1047. and algorithms used to implement `gperf' will soon be available.  This
  1048. paper is useful not only from a maintenance and enhancement perspective,
  1049. but also because they demonstrate several clever and useful programming
  1050. techniques, *e.g.*, `Iteration Number' boolean arrays, double hashing,
  1051. a "safe" and efficient method for reading arbitrarily long input from a
  1052. file, and a provably optimal algorithm for simultaneously determining
  1053. both the minimum and maximum elements in a list.
  1054.  
  1055. 
  1056. File: gperf.info,  Node: Bibliography,  Prev: Implementation,  Up: Top
  1057.  
  1058. Bibliography
  1059. ************
  1060.  
  1061.    [1] Chang, C.C.: A Scheme for Constructing Ordered Minimal Perfect
  1062. Hashing Functions Information Sciences 39(1986), 187-195.
  1063.  
  1064.    [2] Cichelli, Richard J. Author's Response to "On Cichelli's Minimal
  1065. Perfec t Hash Functions Method" Communications of the ACM, 23,
  1066. 12(December 1980), 729.
  1067.  
  1068.    [3] Cichelli, Richard J. Minimal Perfect Hash Functions Made Simple
  1069. Communications of the ACM, 23, 1(January 1980), 17-19.
  1070.  
  1071.    [4] Cook, C. R. and Oldehoeft, R.R. A Letter Oriented Minimal
  1072. Perfect Hashing Function SIGPLAN Notices, 17, 9(September 1982), 18-27.
  1073.  
  1074.    [5] Cormack, G. V. and Horspool, R. N. S. and Kaiserwerth, M.
  1075. Practical Perfect Hashing Computer Journal, 28, 1(January 1985), 54-58.
  1076.  
  1077.    [6] Jaeschke, G. Reciprocal Hashing: A Method for Generating Minimal
  1078. Perfect Hashing Functions Communications of the ACM, 24, 12(December
  1079. 1981), 829-833.
  1080.  
  1081.    [7] Jaeschke, G. and Osterburg, G. On Cichelli's Minimal Perfect
  1082. Hash Functions Method Communications of the ACM, 23, 12(December 1980),
  1083. 728-729.
  1084.  
  1085.    [8] Sager, Thomas J. A Polynomial Time Generator for Minimal Perfect
  1086. Hash Functions Communications of the ACM, 28, 5(December 1985), 523-532
  1087.  
  1088.    [9] Schmidt, Douglas C. GPERF: A Perfect Hash Function Generator
  1089. Second USENIX C++ Conference Proceedings, April 1990.
  1090.  
  1091.    [10] Sebesta, R.W. and Taylor, M.A. Minimal Perfect Hash Functions
  1092. for Reserved Word Lists  SIGPLAN Notices, 20, 12(September 1985), 47-53.
  1093.  
  1094.    [11] Sprugnoli, R. Perfect Hashing Functions: A Single Probe
  1095. Retrieving Method for Static Sets Communications of the ACM, 20
  1096. 11(November 1977), 841-850.
  1097.  
  1098.    [12] Stallman, Richard M. Using and Porting GNU CC Free Software
  1099. Foundation, 1988.
  1100.  
  1101.    [13] Stroustrup, Bjarne The C++ Programming Language.
  1102. Addison-Wesley, 1986.
  1103.  
  1104.    [14] Tiemann, Michael D. User's Guide to GNU C++ Free Software
  1105. Foundation, 1989.
  1106.  
  1107.  
  1108. 
  1109. Tag Table:
  1110. Node: Top1217
  1111. Node: Copying2455
  1112. Node: Contributors15741
  1113. Node: Motivation16841
  1114. Node: Search Structures18108
  1115. Node: Description21661
  1116. Node: Input Format23481
  1117. Node: Declarations24276
  1118. Node: Keywords26583
  1119. Node: Functions28174
  1120. Node: Output Format28668
  1121. Node: Options31138
  1122. Node: Bugs44508
  1123. Node: Projects47195
  1124. Node: Implementation48772
  1125. Node: Bibliography49491
  1126. 
  1127. End Tag Table
  1128.