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

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                       FILE_CHECKER, Version 1.1
  9.  
  10.  
  11.               by Richard Conn, TI Ada Technology Branch
  12.  
  13.  
  14.  
  15.  
  16.  
  17.      FILE_CHECKER is a  tool  which  prints  out  the  number  of  Ada
  18. statements,  Ada  comments,  and text lines in a file.  When executed,
  19. FILE_CHECKER prompts for the name of a file.  The user enters  a  file
  20. name,  strikes return, and FILE_CHECKER prompts again.  This continues
  21. until the user has entered the names of  all  the  desired  files,  at
  22. which  point  the  user  simply strikes return in response to the file
  23. name prompt.  FILE_CHECKER then passes through the files in the  order
  24. specified,  generating  a  table  of  the  file  name,  number  of Ada
  25. statements, number of Ada comments, and number of text lines.
  26.  
  27.  
  28.  
  29. 1  FILE_CHECKER INPUTS AND INCLUDE FILES
  30.  
  31.      In response to the file name prompt, FILE_CHECKER recognizes  and
  32. responds to the following types of input:
  33.  
  34.       *  A carriage return (RETURN key), which tells  FILE_CHECKER  to
  35.          terminate input and to print the output table
  36.  
  37.       *  A line beginning with a dash (-), which is a comment line
  38.  
  39.       *  A file name prefixed by an atsign  (@),  which  indicates  an
  40.          include file
  41.  
  42.       *  Any other input, which  indicates  the  name  of  a  file  to
  43.          include
  44.  
  45.  
  46.      If the user prefixes the name of a component file with an  atsign
  47. character (@), the indicated file is processed as an include file.  An
  48. include file is a file which  contains  the  names  of  zero  or  more
  49. component  files,  one  name  per  line  starting in the first column.
  50. Other include files may  be  referenced  within  an  include  file  by
  51. prefixing  their  names  with  the  atsign character.  Comments may be
  52. placed within an include file by placing two dashes in the  first  two
  53. columns of a line.  The following is an example of an include file:
  54.                                                                 Page 2
  55.  
  56.  
  57.  
  58.          Example                      Comments
  59.          =======                      ========
  60. --
  61. -- This is an include file for        Comment at the beginning
  62. --  my favorite tool
  63. --
  64.                                       Blank lines are allowed
  65. --
  66. -- The following include file
  67. --  contains the names of the         Another comment
  68. --  Ada source files in compilation
  69. --  order
  70. --
  71. @mytool.cmp
  72. --
  73. -- The following are the documentation
  74. --  files
  75. --
  76. mytool.ref
  77. mytool.doc
  78. mytool.idx
  79.  
  80.  
  81.      The syntax for an include file used by FILE_CHECKER is  identical
  82. to  the  syntax for an include file used by PAGER, another tool in the
  83. Ada Repository.  Consequently, PAGER include  files  can  be  used  to
  84. generate FILE_CHECKER reports.
  85.  
  86.  
  87.  
  88. 2  SAMPLE SESSION
  89.  
  90.      The following is a sample session which illustrates  the  use  of
  91. FILE_CHECKER.
  92.  
  93.  
  94. $ dir
  95.  
  96. Directory USER4:[CONN.ADA]
  97.  
  98. CAS3.ADA;1               15  (RWE,RWED,RE,RE)
  99. CHARACTER_SET.ADA;1
  100.                          21  (RWE,RWED,RE,RE)
  101. LIB.DIR;1                 3  (RE,RWE,RE,RE)
  102. PAGER.ADA;1              13  (RWE,RWED,RE,RE)
  103. PAGER.DIS;1               1  (RWE,RWED,RE,RE)
  104. PAGER.DOC;1              31  (RWE,RWED,RE,RE)
  105. PAGER.RNO;1              28  (RWE,RWED,RE,RE)
  106. PAGER.SRC;6             154  (RWE,RWED,RE,RE)
  107. PAGER_COMPILE.DIS;1
  108.                           1  (RWE,RWED,RE,RE)
  109. PAGER_DOCUMENTATION.DIS;1
  110.                           1  (RWE,RWED,RE,RE)
  111. PAGER_SUPPORT.ADA;1
  112.                                                                 Page 3
  113.  
  114.  
  115.                          47  (RWE,RWED,RE,RE)
  116.  
  117. Total of 11 files, 315 blocks.
  118. $ type pager.dis
  119. --
  120. -- Distribution files for PAGER
  121. --    PAGER_COMPILE.DIS gives the source files in
  122. --      compilation order
  123. --    PAGER_DOCUMENTATION.DIS gives the documentation files
  124. --
  125. @pager_compile.dis
  126. @pager_documentation.dis
  127. $ type pager_compile.dis
  128. --
  129. -- Compilation order for all files required to create the
  130. --  PAGER program
  131. --
  132. character_set.ada
  133. cas3.ada
  134. pager_support.ada
  135. pager.ada
  136. $ fcheck
  137. FILE CHECKER, Version 1.1
  138. File Name > pager.ada
  139. File Name > pager_support.ada
  140. File Name > 
  141.  
  142. File Name                       Statements    Comments       Lines
  143. pager.ada                               74           8         150
  144. pager_support.ada                      324         172         714
  145. $ fcheck
  146. FILE CHECKER, Version 1.1
  147. File Name > @pager_compile.dis
  148.     Processing Include File: pager_compile.dis
  149.       --
  150.       -- Compilation order for all files required to create the
  151.       --  PAGER program
  152.       --
  153.       character_set.ada
  154.       cas3.ada
  155.       pager_support.ada
  156.       pager.ada
  157.     End of Include File: pager_compile.dis
  158. File Name > 
  159.  
  160. File Name                       Statements    Comments       Lines
  161. character_set.ada                      174          30         321
  162. cas3.ada                                56          95         194
  163. pager_support.ada                      324         172         714
  164. pager.ada                               74           8         150
  165. p