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

  1.  
  2. -------- SIMTEL20 Ada Software Repository Prologue ------------
  3. --                                                           -*
  4. -- Unit name    : HF-GRAMMAR
  5. -- Version      : 1.0
  6. -- Author       : Herman Fischer
  7. --              : Litton Data Systems
  8. --              : 8000 Woodley Ave, ms 44-30
  9. --              : Van Nuys, CA
  10. --              : 818-902-5139
  11. -- Credits      : G Fisher and P Charles
  12. -- DDN Address  : HFischer@ECLB
  13. -- Copyright    : (c) Herm Fischer 1984
  14. -- Date created : 
  15. -- Release date : 15 Dec 84
  16. -- Last update  : 26 Mar 84
  17. -- Machine/System Compiled/Run on : UNIX
  18. --                                                           -*
  19. ---------------------------------------------------------------
  20. --                                                           -*
  21. -- Keywords     :  Ada, Grammar, UNIX, LALR, LALR(1), YACC
  22. ----------------:
  23. --
  24. -- Abstract     :  
  25. ----------------:  
  26. --                                         
  27. --             A LALR(1) grammar for ANSI Ada*             
  28. --                                         
  29. --             Adapted for YACC (UNIX) Inputs              
  30. --                                         
  31. --                                                                           
  32. --                             Herman Fischer                                
  33. --                           Litton Data Systems                             
  34. --                       8000 Woodley Ave., ms 44-30                         
  35. --                              Van Nuys, CA                                 
  36. --                                                                           
  37. --                              818/902-5139                                 
  38. --                           HFischer@eclb.arpa                              
  39. --                        {cepu,trwrb}!litvax!fischer                        
  40. --                                                                           
  41. --                             March 26, 1984                                
  42. --                                         
  43. --                   A Contribution to the Public Domain                     
  44. --                                   for                                     
  45. --            Research, Development, and Training Purposes Only              
  46. --                                                                           
  47. --       Any Corrections or Problems are to be Reported to the Author        
  48. --                                                                           
  49. --                                                                           
  50. --                                                                           
  51. --                              adapted from                                 
  52. --                              the grammar                                  
  53. --                                  by:                                      
  54. --                                         
  55. --            Gerry Fisher                         Philippe Charles          
  56. --                                                                           
  57. --    Computer Sciences Corporation     &             Ada  Project           
  58. --         4045 Hancock Street                     New York University       
  59. --         San Diego, CA 92121                      251 Mercer Street        
  60. --                                               New York, New York 10012    
  61. --                                         
  62. --                                         
  63. --    This grammar is organized in the same order as the syntax summary     
  64. -- in appendix E of the ANSI Ada Reference Manual.   All reserved words     
  65. -- are     written  in  upper  case  letters.    The  lexical  categories     
  66. -- numeric_literal, string_literal, etc, are viewed as terminals.   The     
  67. -- rules  for  pragmas as  stated in  chapter 2,  section 8,  have been     
  68. -- incorporated in the grammar.   Comments are included wherever we had     
  69. -- to deviate from the syntax given in appendix E. Different symbols        
  70. -- used here (to comply with yacc requirements) are of note:            
  71. --    {,something}    is denoted ...something..                 
  72. --    {something}    is denoted ..something..                 
  73. --    [something]    is denoted .something.                    
  74. -- Constructs involving                                                     
  75. -- meta brackets, e.g., ...identifier.. are represented by a nonterminal    
  76. -- formed  by  concatenating  the  construct symbols ( as ...identifier..   
  77. -- in the example)   for  which  the  rules are given at the end.  When     
  78. -- reading  this  grammar,  it    is  important to  note that all symbols     
  79. -- appearing  in the  rules are  separated by  one or  more  blanks.  A     
  80. -- string  such  as   'identifier_type_mark   is  actually  a   single      
  81. -- nonterminal symbol defined at the end of the rules.  The '--' symbol     
  82. -- is used  to indicate that the rest of  the  line is a comment,  just     
  83. -- as in yacc programs.                                                     
  84. --                                                                          
  85. --     This grammar is presented here in a form suitable for input to a     
  86. -- yacc parser generator.  It has  been  processed  by the Bell System      
  87. -- III lex/yacc combination, and tested against over 400 ACVC tests.        
  88. --                                        
  89. -- *Ada is a registered trade mark of the  Department of  Defense  (Ada     
  90. -- Joint Program  Office).                             
  91. --                                         
  92.  
  93.  
  94. --                                                           -*
  95. ------------------ Revision history ---------------------------
  96. --                                                           -*
  97. -- DATE         VERSION    AUTHOR                  HISTORY
  98. -- 12/15/84    1.0    Herman Fischer        Initial Release
  99. --                                                           -*
  100. ------------------ Distribution and Copyright -----------------
  101. --                                                           -*
  102. -- This prologue must be included in all copies of this software.
  103. --
  104. -- This software is copyright by the author.
  105. --
  106. -- This software is released to the Ada community.
  107. -- This software is released to the Public Domain (note:
  108. --   software released to the Public Domain is not subject
  109. --   to copyright protection).
  110. -- Restrictions on use or distribution: See above for the author's
  111. --    requested restrictions; commercial use (ie, sale) prohibited
  112. --                                                           -*
  113. ------------------ Disclaimer ---------------------------------
  114. --                                                           -*
  115. -- This software and its documentation are provided "AS IS" and
  116. -- without any expressed or implied warranties whatsoever.
  117. -- No warranties as to performance, merchantability, or fitness
  118. -- for a particular purpose exist.
  119. --
  120. -- Because of the diversity of conditions and hardware under
  121. -- which this software may be used, no warranty of fitness for
  122. -- a particular purpose is offered.  The user is advised to
  123. -- test the software thoroughly before relying on it.  The user
  124. -- must assume the entire risk and liability of using this
  125. -- software.
  126. --
  127. -- In no event shall any person or organization of people be
  128. -- held responsible for any direct, indirect, consequential
  129. -- or inconsequential damages or lost profits.
  130. --                                                           -*
  131. -------------------END-PROLOGUE--------------------------------
  132.