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

  1.  
  2. -------- SIMTEL20 Ada Software Repository Prologue ------------
  3. --
  4. -- Unit name    : COUNT_OF_ADA_STATEMENTS
  5. -- Version      : 1.0
  6. -- Author       : W. A. Whitaker, WIS JPMO
  7. -- DDN Address  : WWHITAKER@ECLB
  8. -- Copyright    :
  9. -- Date created :  3 MAR 84
  10. -- Release date : 15 JAN 85
  11. -- Last update  :  3 MAR 84
  12. -- Machine/System Compiled/Run on :
  13. --
  14. ---------------------------------------------------------------
  15. --
  16. -- Keywords     :  Source analysis, Quantity, Statements
  17. --
  18. ----------------:
  19. --
  20. -- Abstract     :
  21. --  This function calculates the "STATEMENTS" of a valid Ada fragment
  22. --  specified by a FILE_NAME string parameter.
  23. --  It need not be a complete compilation unit
  24. --  but it should have closed all open parentheses and string brackets.
  25. --  The number of STATEMENTS of code is returned as an INTEGER.
  26.  
  27. --  The Ada statement is defined by a semicolon terminator
  28. --  outside of comments, parentheses, or string or character literals.
  29. --  This definition is insensitive to formatting or layout of the source.
  30.  
  31. --  There are exotic cases for which this will misestimate the count
  32. --  but we have never encountered one in real code.
  33.  
  34. --  This copy of the function is embedded in a test and driver program.
  35. --  Running the program on its own source file should give
  36. --  The driver has an additional feature of correcting for the common
  37. --  error of leaving out the extension on a file name.
  38. --  The nature of this extension is system dependent and a ".TXT" is used.
  39.  
  40. --
  41. ------------------ Revision history ---------------------------
  42. --
  43. -- DATE         VERSION         AUTHOR          HISTORY
  44. -- 19850115     1.0             W Whitaker      Initial Release
  45. --
  46. ------------------ Distribution and Copyright -----------------
  47. --
  48. -- This software is released to the Public Domain (note:
  49. --   software released to the Public Domain is not subject
  50. --   to copyright protection).
  51. --
  52. ------------------ Disclaimer ---------------------------------
  53. --
  54. -- This software and its documentation are provided "AS IS" and
  55. -- without any expressed or implied warranties whatsoever.
  56. -- No warranties as to performance, merchantability, or fitness
  57. -- for a particular purpose exist.
  58. --
  59. -- In no event shall any person or organization of people be
  60. -- held responsible for any direct, indirect, consequential
  61. -- or inconsequential damages or lost profits.
  62. --
  63. -------------------END-PROLOGUE--------------------------------
  64.