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

  1.  
  2. -------- SIMTEL20 Ada Software Repository Prologue ------------
  3. -- 
  4. -- Unit name    : COUNT_OF_ADA_STATEMENTS_3
  5. -- Version      : 1.2
  6. -- Author       : Richard Conn
  7. --              : TI Ada Technology Branch
  8. --              : Box 801, MS 8007
  9. --              : McKinney, TX  75069
  10. -- DDN Address  : RCONN at SIMTEL20
  11. -- Copyright    :
  12. -- Date created : 4 Apr 85
  13. -- Release date : 4 Apr 85
  14. -- Last update  : 24 June 85
  15. -- Machine/System Compiled/Run on: DEC VAX/VMS, DEC Ada
  16. -- 
  17. ---------------------------------------------------------------
  18. -- 
  19. -- Keywords     :  Source analysis, Quantity, Statements
  20. -- 
  21. ----------------:
  22. -- 
  23. -- Abstract     :
  24. --  This procedure calculates the "STATEMENTS" of a valid Ada fragment
  25. --  specified by a FILE_NAME string parameter.  It need not be a complete
  26. --  compilation unit, but it should have closed all open parens and
  27. --  strings.
  28. -- 
  29. --  The Ada statement is defined by a semicolon terminator
  30. --  outside of comments, parentheses, or string or character literals.
  31. --  This definition is insensitive to formatting or layout of the source.
  32. -- 
  33. --  There are exotic cases for which this will misestimate the count
  34. --  but we have never encountered one in real code.
  35. -- 
  36. --  This procedure is derived from Bill Whitaker's original
  37. --  COUNT_OF_ADA_STATEMENTS, and it does not change his original algorithm.
  38. --  It adds a line count and a character-checksum hash (sum of POS values of
  39. --  all non-space characters in the file mod 256).  It also adds a count
  40. --  of the comment lines (over CAS2, which does not).
  41. -- 
  42. ------------------ Revision history ---------------------------
  43. -- 
  44. -- Derivation   : COUNT_OF_ADA_STATEMENTS_2 by Richard Conn
  45. -- Derivation   : COUNT_OF_ADA_STATEMENTS by Bill Whitaker
  46. --
  47. -- DATE         VERSION         AUTHOR          HISTORY
  48. -- 19850215     1.0             R Conn          Initial Release
  49. -- 19850506     1.1             R Conn          Overflow Traps Added
  50. -- 19850624     1.2             R Conn          Bug in Single-Quote Proc Fixed
  51. -- 
  52. ------------------ Distribution and Copyright -----------------
  53. -- 
  54. -- This software is released to the Public Domain (note:
  55. --   software released to the Public Domain is not subject
  56. --   to copyright protection).
  57. -- 
  58. ------------------ Disclaimer ---------------------------------
  59. -- 
  60. -- This software and its documentation are provided "AS IS" and
  61. -- without any expressed or implied warranties whatsoever.
  62. -- No warranties as to performance, merchantability, or fitness
  63. -- for a particular purpose exist.
  64. -- 
  65. -- In no event shall any person or organization of people be
  66. -- held responsible for any direct, indirect, consequential
  67. -- or inconsequential damages or lost profits.
  68. -- 
  69. -------------------END-PROLOGUE--------------------------------
  70.