home *** CD-ROM | disk | FTP | other *** search
/ Programmer's ROM - The Computer Language Library / programmersrom.iso / ada / misc / reserve.ad < prev    next >
Encoding:
Text File  |  1988-05-03  |  1.3 KB  |  36 lines

  1.          Ada Reserve Word Identification Function
  2.  
  3.  
  4. Authors:   Mars Gralia and Jerry Kashtan, The Johns Hopkins University
  5. Date:      31 January 1986
  6.  
  7. Keywords:  Ada reserved words, parser, token, tokenizer, syntax, hash
  8.  
  9. Abstract:
  10.     This package contains the single function "is_Ada_reserved_word".
  11. It returns with either a "true" or "false" to the statement "the
  12. input character string is a reserved word in the Ada language".  
  13.     The contribution of the function is that it executes very
  14. quickly, being an implementation of the algorithm defined by David
  15. Wolverton in "A Perfect Hash Function for Ada Reserved Words", as
  16. published in Ada Letter, July-August 1984.  It is much faster than
  17. either linear or binary searches of all the Ada reserved words.
  18.     A test driver is included, as is sample test data.
  19.  
  20. Files:
  21.     reserve.pro        Prologue
  22.     reserve.src        Package, in "pager" format.  Contains:
  23.         reserve_word_hash_pkg_.ada    Package spec
  24.         reserve_word_hash_pkg.ada    Package body
  25.         driver.ada            A test driver; terminal i/o
  26.         test_go.txt            Test data, Ada reserved words
  27.         test_nogo.txt            Test data, non-reserved words
  28.         test_mixed.txt            Test data, some of each
  29.     reserve.ad        This "advertisement"
  30.  
  31. Approximate size (bytes):
  32.     reserve.pro    3,378
  33.     reserve.src    21,551
  34.     reserve.ad    2,000
  35.  
  36.