home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / MISC / ADA_MET1.ZIP / PARSER_1.ADS < prev    next >
Encoding:
Text File  |  1990-06-21  |  7.2 KB  |  115 lines

  1. --***************************************************************--
  2. --                                                               --
  3. --  TITLE:          AN ADA SOFTWARE METRIC                       --
  4. --                                                               --   
  5. --  MODULE NAME:    PACKAGE SPECIFICATION PARSER_1               --
  6. --  FILE NAME:      PARSER_1.ADS                                 --
  7. --                                                               --
  8. --  LAST MODIFIED:  02 MAR 90                                    --
  9. --                                                               --
  10. --  DESCRIPTION:  This package contains thirty-six functions     --
  11. --       that make up the top level productions for our top-down,--
  12. --       recursive descent parser. Each function is preceded     --
  13. --       by the grammar productions they are implementing.       --
  14. --                                                               --  
  15. --  CHANGE LOG:                                                  --
  16. --              - changed function GENERIC_DECLARATION to check  --
  17. --                for iterations, vice optional choice, of       --
  18. --                GENERIC_PARAMETER_DECLARATION                  --
  19. --                                                               --
  20. --              - changed function FUNCTION_UNIT to allow for    --
  21. --                renaming of functions.  Revised function will  --
  22. --                more closely resemble function PROCEDURE_UNIT. --
  23. --                Functions FUNCTION_BODY, FUNCTION_BODY_TAIL,   --
  24. --                and FUNCTION_UNIT_TAIL have been deleted.      --
  25. --                                                               --
  26. --              - modified the production rules in functions     --
  27. --                PACKAGE_DECLARATION and SUBPROGRAM_BODY to     --
  28. --                make them more regular with other library unit --
  29. --                functions.  Functions PACKAGE_BODY, PACKAGE_   --
  30. --                BODY_TAIL, and PACKAGE_TAIL_END have been      --
  31. --                deleted.                                       --
  32. --                                                               --
  33. --              - modified the production rules in function      --
  34. --                TASK_DECLARATION to make them more regular     --
  35. --                with other library unit functions.  Functions  --
  36. --                TASK_BODY and TASK_BODY_TAIL were deleted.     --
  37. --                                                               --
  38. --              - modified function SELECT_STATEMENT to check    --
  39. --                for optional SELECT_ENTRY_CALL vice required   --
  40. --                SELECT_ENTRY_CALL. Also removed the check for  --
  41. --                the optional name on BLOCK_STATEMENT and LOOP_ --
  42. --                STATEMENT since the name will have been parsed --
  43. --                before these functions could be called.        --
  44. --                                                               --
  45. --  COPYRIGHT:  The Ada source code in this file is Copyright    --
  46. --              1990 by Source Translation & Optimization. There --
  47. --              are no restrictions to the use of this source    --
  48. --              code in any product or system that is released   --
  49. --              in non-source code form. Resale of this source   --
  50. --              code, without permission of STO, is a violation  --
  51. --              of our Copyright.                                --
  52. --                                                               --
  53. --                                                               --
  54. --  HELP:       For more information contact: Gregory Aharonian  --
  55. --              Source Translation & Optimization, P.O. Box 404  --
  56. --              Belmont, MA, 02178-0404            617-489-3727  --
  57. --***************************************************************--
  58.  
  59. package PARSER_1 is
  60.  
  61.   function  GENERIC_DECLARATION   return boolean;
  62.   function  PROCEDURE_UNIT        return boolean;
  63.   function  FUNCTION_UNIT         return boolean;
  64.   function  PACKAGE_DECLARATION   return boolean;
  65.   function  PROPER_BODY           return boolean;
  66.  
  67. --
  68. -- The following procedures are declared locally in the package body
  69. --
  70. --    function  GENERIC_PARAMETER_DECLARATION   return boolean;
  71. --    function  GENERIC_FORMAL_PART             return boolean;
  72. --    function  SUBPROGRAM_BODY                 return boolean;
  73. --    function  TASK_DECLARATION                return boolean;
  74. --    function  PACKAGE_UNIT                    return boolean;
  75. --    function  BASIC_DECLARATIVE_ITEM          return boolean;
  76. --    function  DECLARATIVE_PART                return boolean;
  77. --    function  BASIC_DECLARATION               return boolean;
  78. --    function  LATER_DECLARATIVE_ITEM          return boolean;
  79. --    function  SEQUENCE_OF_STATEMENTS          return boolean;
  80. --    function  STATEMENT                       return boolean;
  81. --    function  COMPOUND_STATEMENT              return boolean;
  82. --    function  BLOCK_STATEMENT                 return boolean;
  83. --    function  IF_STATEMENT                    return boolean;
  84. --    function  CASE_STATEMENT                  return boolean;
  85. --    function  CASE_STATEMENT_ALTERNATIVE      return boolean;
  86. --    function  LOOP_STATEMENT                  return boolean;
  87. --    function  EXCEPTION_HANDLER               return boolean;
  88. --    function  ACCEPT_STATEMENT                return boolean;
  89. --    function  SELECT_STATEMENT                return boolean;
  90. --    function  SELECT_STATEMENT_TAIL           return boolean;
  91. --    function  SELECT_ALTERNATIVE              return boolean;
  92. --    function  SELECT_ENTRY_CALL               return boolean;
  93. --    function  TASK_DECLARATION                return boolean is separate;
  94. --    function  PACKAGE_UNIT                    return boolean is separate;
  95. --    function  BASIC_DECLARATIVE_ITEM          return boolean is separate;
  96. --    function  DECLARATIVE_PART                return boolean is separate;
  97. --    function  BASIC_DECLARATION               return boolean is separate;
  98. --    function  LATER_DECLARATIVE_ITEM          return boolean is separate;
  99. --    function  SEQUENCE_OF_STATEMENTS          return boolean is separate;
  100. --    function  STATEMENT                       return boolean is separate;
  101. --    function  COMPOUND_STATEMENT              return boolean is separate;
  102. --    function  BLOCK_STATEMENT                 return boolean is separate;
  103. --    function  IF_STATEMENT                    return boolean is separate;
  104. --    function  CASE_STATEMENT                  return boolean is separate;
  105. --    function  CASE_STATEMENT_ALTERNATIVE      return boolean is separate;
  106. --    function  LOOP_STATEMENT                  return boolean is separate;
  107. --    function  EXCEPTION_HANDLER               return boolean is separate;
  108. --    function  ACCEPT_STATEMENT                return boolean is separate;
  109. --    function  SELECT_STATEMENT                return boolean is separate;
  110. --    function  SELECT_STATEMENT_TAIL           return boolean is separate;
  111. --    function  SELECT_ALTERNATIVE              return boolean is separate;
  112. --    function  SELECT_ENTRY_CALL               return boolean is separate;
  113.  
  114. end PARSER_1;
  115.