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

  1.  
  2. -------- SIMTEL20 Ada Software Repository Prologue ------------
  3. --
  4. -- Unit name    : COUNT_OF_ADA_STATEMENTS_2
  5. -- Version      : 1.0
  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 : 14 Feb 85
  13. -- Release date : 15 Feb 85
  14. -- Last update  : 15 Feb 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).
  40. --
  41. ------------------ Revision history ---------------------------
  42. --
  43. -- Derivation   : COUNT_OF_ADA_STATEMENTS by Bill Whitaker
  44. --
  45. -- DATE         VERSION         AUTHOR          HISTORY
  46. -- 19850215     1.0             R Conn          Initial Release
  47. --
  48. ------------------ Distribution and Copyright -----------------
  49. --
  50. -- This software is released to the Public Domain (note:
  51. --   software released to the Public Domain is not subject
  52. --   to copyright protection).
  53. --
  54. ------------------ Disclaimer ---------------------------------
  55. --
  56. -- This software and its documentation are provided "AS IS" and
  57. -- without any expressed or implied warranties whatsoever.
  58. -- No warranties as to performance, merchantability, or fitness
  59. -- for a particular purpose exist.
  60. --
  61. -- In no event shall any person or organization of people be
  62. -- held responsible for any direct, indirect, consequential
  63. -- or inconsequential damages or lost profits.
  64. --
  65. -------------------END-PROLOGUE--------------------------------
  66.