home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d154 / ada.lha / Ada / Ada.y < prev    next >
Text File  |  1987-06-15  |  33KB  |  1,493 lines

  1.  
  2. /*---------------------------------------------------------------------------*/
  3. /*                                                                           */
  4. /*                       A LALR(1) grammar for ANSI Ada*                     */
  5. /*                                                                           */
  6. /*                       Adapted for YACC (UNIX) Inputs                      */
  7. /*                                                                           */
  8. /*                                                                           */
  9. /*                             Herman Fischer                                */
  10. /*                           Litton Data Systems                             */
  11. /*                       8000 Woodley Ave., ms 44-30                         */
  12. /*                              Van Nuys, CA                                 */
  13. /*                                                                           */
  14. /*                              818/902-5139                                 */
  15. /*                           HFischer@eclb.arpa                              */
  16. /*                        {cepu,trwrb}!litvax!fischer                        */
  17. /*                                                                           */
  18. /*                             March 26, 1984                                */
  19. /*                                                                           */
  20. /*                   A Contribution to the Public Domain                     */
  21. /*                                   for                                     */
  22. /*            Research, Development, and Training Purposes Only              */
  23. /*                                                                           */
  24. /*       Any Corrections or Problems are to be Reported to the Author        */
  25. /*                                                                           */
  26. /*                                                                           */
  27. /*                                                                           */
  28. /*                              adapted from                                 */
  29. /*                              the grammar                                  */
  30. /*                                  by:                                      */
  31. /*                                                                           */
  32. /*            Gerry Fisher                         Philippe Charles          */
  33. /*                                                                           */
  34. /*    Computer Sciences Corporation     &             Ada  Project           */
  35. /*         4045 Hancock Street                     New York University       */
  36. /*         San Diego, CA 92121                      251 Mercer Street        */
  37. /*                                               New York, New York 10012    */
  38. /*                                                                           */
  39. /*                                                                           */
  40. /*    This grammar is organized in the same order as the syntax summary     */
  41. /* in appendix E of the ANSI Ada Reference Manual.   All reserved words     */
  42. /* are   written  in  upper  case  letters.    The  lexical  categories     */
  43. /* numeric_literal, string_literal, etc, are viewed as terminals.   The     */
  44. /* rules  for  pragmas as  stated in  chapter 2,  section 8,  have been     */
  45. /* incorporated in the grammar.   Comments are included wherever we had     */
  46. /* to deviate from the syntax given in appendix E. Different symbols        */
  47. /* used here (to comply with yacc requirements) are of note:                */
  48. /*      {,something}    is denoted ...something..                            */
  49. /*      {something}     is denoted ..something..                             */
  50. /*      [something]     is denoted .something.                              */
  51. /* Constructs involving                                                     */
  52. /* meta brackets, e.g., ...identifier.. are represented by a nonterminal    */
  53. /* formed  by  concatenating  the  construct symbols ( as ...identifier..   */
  54. /* in the example)   for  which  the  rules are given at the end.  When     */
  55. /* reading  this  grammar,  it  is  important to  note that all symbols     */
  56. /* appearing  in the  rules are  separated by  one or  more  blanks.  A     */
  57. /* string  such  as   'identifier_type_mark   is  actually  a   single      */
  58. /* nonterminal symbol defined at the end of the rules.  The '/*' symbol     */
  59. /* is used  to indicate that the rest of  the  line is a comment,  just     */
  60. /* as in yacc programs.                                                     */
  61. /*                                                                          */
  62. /*     This grammar is presented here in a form suitable for input to a     */
  63. /* yacc parser generator.  It has  been  processed  by the Bell System      */
  64. /* III lex/yacc combination, and tested against over 400 ACVC tests.        */
  65. /*                                                                          */
  66. /* *Ada is a registered trade mark of the  Department of  Defense  (Ada     */
  67. /* Joint Program  Office).                                                   */
  68. /*                                                                           */
  69. /*---------------------------------------------------------------------------*/
  70.  
  71.  
  72. /*%terminals -----------------------------------------------------------     */
  73.  
  74. %token ABORT_ ABS_ ACCEPT_  ACCESS_ ALL_  AND_ ARRAY_
  75. %token AT_ BEGIN_  BODY_ CASE_  CONSTANT_
  76. %token DECLARE_ DELAY_ DELTA_ DIGITS_ DO_ ELSE_ ELSIF_
  77. %token END_  ENTRY_ EXCEPTION_ EXIT_ FOR_
  78. %token FUNCTION_ GENERIC_  GOTO_ IF_ IN_  IS_ LIMITED_
  79. %token LOOP_ MOD_  NEW_ NOT_  NULL_ OF_ OR_
  80. %token OTHERS_ OUT_  PACKAGE_ PRAGMA_  PRIVATE_
  81. %token PROCEDURE_  RAISE_  RANGE_ RECORD_ REM_
  82. %token RENAMES_ RETURN_ REVERSE_  SELECT_  SEPARATE_
  83. %token SUBTYPE_ TASK_ TERMINATE_        THEN_
  84. %token TYPE_ USE_ WHEN_ WHILE_ WITH_ XOR_
  85.  
  86. %token identifier numeric_literal string_literal character_literal
  87. %token ARROW_ DBLDOT_ EXP_ ASSIGN_ NOTEQL_ GTEQL_ LTEQ_ L_LBL_ R_LBL_ BOX_
  88.  
  89. %start compilation
  90.  
  91. %%
  92.  
  93.  
  94. /* 2.8 */
  95.  
  96. prag    :
  97.         PRAGMA_ identifier .arg_ascs ';' ;
  98.  
  99. arg_asc       :
  100.         expr
  101.    |    identifier ARROW_ expr  ;
  102.  
  103.  
  104.  
  105. /* 3.1 */
  106.  
  107. basic_d  :
  108.         object_d
  109.    |    ty_d           |  subty_d
  110.    |    subprg_d       |  pkg_d
  111.    |    task_d         |  gen_d
  112.    |    excptn_d       |  gen_inst
  113.    |    renaming_d     |  number_d
  114.    |    error ';' ;
  115.  
  116.  
  117. /* 3.2 */
  118.  
  119. object_d  :
  120.       idents ':'           subty_ind ._ASN_expr. ';'
  121.  |    idents ':'  CONSTANT_ subty_ind ._ASN_expr. ';'
  122.  |    idents ':'           c_arr_def ._ASN_expr. ';'
  123.  |    idents ':'  CONSTANT_ c_arr_def ._ASN_expr. ';' ;
  124.  
  125.  
  126. number_d  :
  127.         idents ':' CONSTANT_ ASSIGN_ expr ';' ;
  128.  
  129.  
  130. idents   :  identifier ...ident..       ;
  131.  
  132.  
  133. /* 3.3.1 */
  134.  
  135. ty_d  :
  136.         full_ty_d
  137.    |    incomplete_ty_d
  138.    |    priv_ty_d  ;
  139.  
  140. full_ty_d  :
  141.         TYPE_ identifier            IS_ ty_def ';'
  142.    |    TYPE_ identifier discr_part IS_ ty_def ';' ;
  143.  
  144.  
  145. ty_def   :
  146.         enum_ty_def             |  integer_ty_def
  147.    |    real_ty_def                     |  array_ty_def
  148.    |    rec_ty_def              |  access_ty_def
  149.    |    derived_ty_def ;
  150.  
  151.  
  152. /* 3.3.2 */
  153.  
  154. subty_d  :
  155.         SUBTYPE_ identifier IS_ subty_ind ';' ;
  156.  
  157.  
  158. subty_ind  :    ty_mk .constrt. ;
  159.  
  160.  
  161. ty_mk  :  expanded_n ;
  162.  
  163.  
  164. constrt  :
  165.         rng_c
  166.    |    fltg_point_c  |  fixed_point_c
  167.    |    aggr ;
  168.  
  169.  
  170.  
  171. /* 3.4 */
  172.  
  173. derived_ty_def   :  NEW_ subty_ind ;
  174.  
  175.  
  176. /* 3.5 */
  177.  
  178. rng_c  :  RANGE_ rng ;
  179.  
  180. rng  :
  181.         name
  182.    |    sim_expr DBLDOT_ sim_expr       ;
  183.  
  184.  
  185. /* 3.5.1 */
  186.  
  187. enum_ty_def           :
  188.         '(' enum_lit_spec
  189.                         ...enum_lit_spec.. ')' ;
  190.  
  191.  
  192. enum_lit_spec  :  enum_lit ;
  193.  
  194. enum_lit  : identifier  |  character_literal ;
  195.  
  196.  
  197. /* 3.5.4 */
  198.  
  199. integer_ty_def   :  rng_c ;
  200.  
  201.  
  202. /* 3.5.6 */
  203.  
  204. real_ty_def           :
  205.         fltg_point_c  |  fixed_point_c ;
  206.  
  207.  
  208. /* 3.5.7 */
  209.  
  210. fltg_point_c  :
  211.         fltg_accuracy_def .rng_c. ;
  212.  
  213.  
  214. fltg_accuracy_def         :
  215.         DIGITS_ sim_expr ;
  216.  
  217.  
  218. /* 3.5.9 */
  219.  
  220. fixed_point_c   :
  221.         fixed_accuracy_def .rng_c. ;
  222.  
  223.  
  224. fixed_accuracy_def         :
  225.         DELTA_ sim_expr ;
  226.  
  227.  
  228. /* 3.6 */
  229.  
  230. array_ty_def           :
  231.         uncnstrnd_array_def             |  c_arr_def ;
  232.  
  233.  
  234. uncnstrnd_array_def             :
  235.         ARRAY_ '(' idx_subty_def ...idx_subty_def.. ')' OF_
  236.                                          subty_ind ;
  237.  
  238.  
  239. c_arr_def             :
  240.         ARRAY_ idx_c OF_ subty_ind ;
  241.  
  242.  
  243. idx_subty_def     :     name  RANGE_ BOX_ ;
  244.  
  245.  
  246. idx_c  :  '(' dscr_rng ...dscr_rng.. ')' ;
  247.  
  248.  
  249. dscr_rng        :
  250.         rng
  251.    |    name rng_c      ;
  252.  
  253.  
  254.  
  255. /* 3.7 */
  256.  
  257. rec_ty_def      :
  258.         RECORD_
  259.             cmpons
  260.         END_ RECORD_ ;
  261.  
  262.  
  263. cmpons  :
  264.         ..prag.. ..cmpon_d.. cmpon_d ..prag..
  265.    |    ..prag.. ..cmpon_d.. variant_part ..prag..
  266.    |    ..prag.. NULL_ ';' ..prag.. ;
  267.  
  268.  
  269. cmpon_d  :
  270.      idents ':' cmpon_subty_def ._ASN_expr. ';'  ;
  271.  
  272.  
  273. cmpon_subty_def       :  subty_ind ;
  274.  
  275.  
  276.  
  277. /* 3.7.1 */
  278.  
  279. discr_part  :
  280.         '(' discr_spec ...discr_spec.. ')' ;
  281.  
  282.  
  283. discr_spec  :
  284.         idents ':' ty_mk ._ASN_expr. ;
  285.  
  286.  
  287. /* 3.7.2 */
  288.  
  289. /*discr_c       :                                                    */
  290. /*      '(' discr_asc ... discr_asc.. ')' ;                */
  291. /*                                                                           */
  292. /*discr_asc         :                                                */
  293. /*  .discr_sim_n ..or_discrim_sim_n.. ARROW. expressi */
  294. /*       ;                                                                   */
  295. /*"discr_c" is included under "aggr"                 */
  296.  
  297.  
  298. /* 3.7.3 */
  299.  
  300. variant_part  :
  301.         CASE_ sim_n IS_
  302.               ..prag.. variant ..variant..
  303.         END_ CASE_ ';' ;
  304.  
  305.  
  306. variant  :
  307.         WHEN_ choice ..or_choice.. ARROW_
  308.             cmpons ;
  309.  
  310.  
  311. choice  :
  312.         sim_expr
  313.    |    name rng_c
  314.    |    sim_expr DBLDOT_ sim_expr
  315.    |    OTHERS_ ;
  316.  
  317.  
  318.  
  319. /* 3.8 */
  320.  
  321. access_ty_def   :  ACCESS_ subty_ind ;
  322.  
  323.  
  324. /* 3.8.1 */
  325.  
  326. incomplete_ty_d  :
  327.         TYPE_ identifier ';'
  328.    |    TYPE_ identifier discr_part ';'  ;
  329.  
  330. /* 3.9 */
  331.  
  332. decl_part         :
  333.         ..basic_decl_item..
  334.    |    ..basic_decl_item.. body ..later_decl_item.. ;
  335.  
  336. basic_decl_item         :
  337.         basic_d
  338.    |    rep_cl  |  use_cl       ;
  339.  
  340.  
  341. later_decl_item         :  body
  342.    |    subprg_d        |  pkg_d
  343.    |    task_d  |  gen_d
  344.    |    use_cl          |  gen_inst   ;
  345.  
  346. body  :  proper_body  |  body_stub  ;
  347.  
  348. proper_body  :
  349.         subprg_body  |  pkg_body  |  task_body   ;
  350.  
  351.  
  352.  
  353. /* 4.1 */
  354.  
  355. name  :  sim_n
  356.    |    character_literal  |  op_symbol
  357.    |    idxed_cmpon
  358.    |    selected_cmpon |  attribute ;
  359.  
  360.  
  361. sim_n  :        identifier  ;
  362.  
  363.  
  364. prefix  :  name  ;
  365.  
  366.  
  367.  
  368. /* 4.1.1 */
  369.  
  370. idxed_cmpon  :
  371.         prefix aggr  ;
  372.  
  373.  
  374. /* 4.1.2 */
  375.  
  376. /* slice  :  prefix '(' dscr_rng ')' ;       */
  377. /*                                                 */
  378. /* included under "idxed_cmpon".                   */
  379.  
  380.  
  381. /* 4.1.3 */
  382.  
  383. selected_cmpon  :  prefix '.' selector  ;
  384.  
  385. selector  :  sim_n
  386.    |    character_literal  |  op_symbol  |  ALL_  ;
  387.  
  388.  
  389.  
  390. /* 4.1.4 */
  391.  
  392. attribute  :  prefix '\'' attribute_designator ;
  393.  
  394.  
  395. /*  This can be an attribute, idxed cmpon, slice, or subprg call. */
  396. attribute_designator :
  397.         sim_n
  398.    |    DIGITS_
  399.    |    DELTA_
  400.    |    RANGE_    ;
  401.  
  402.  
  403.  
  404.  
  405. /* 4.3 */
  406.  
  407. aggr  :
  408.         '(' cmpon_asc ...cmpon_asc.. ')' ;
  409.  
  410.  
  411. cmpon_asc        :
  412.         expr
  413.    |    choice ..or_choice.. ARROW_ expr
  414.    |    sim_expr DBLDOT_ sim_expr
  415.    |    name rng_c ;
  416.  
  417.  
  418.  
  419. /* 4.4 */
  420.  
  421. expr  :
  422.         rel..AND__rel..  |  rel..AND__THEN__rel..
  423.    |    rel..OR__rel.. |  rel..OR__ELSE__rel..
  424.    |    rel..XOR__rel..  ;
  425.  
  426.  
  427. rel  :
  428.         sim_expr .relal_op__sim_expr.
  429.    |    sim_expr.NOT.IN__rng_or_sim_expr.NOT.IN__ty_mk ;
  430.  
  431.  
  432. sim_expr  :
  433.         .unary_add_op.term..binary_add_op__term.. ;
  434.  
  435.  
  436. term  :  factor..mult_op__factor..  ;
  437.  
  438.  
  439. factor  :  pri ._EXP___pri.  |  ABS_ pri  |     NOT_ pri  ;
  440.  
  441.  
  442. pri  :
  443.         numeric_literal    |  NULL_
  444.    |    allocator  |  qualified_expr
  445.    |    name
  446.    |    aggr ;
  447.  
  448. /* "'(' expr ')'" is included under "aggr".  */
  449.  
  450.  
  451. /* 4.5 */
  452.  
  453. /* logical_op  :        AND_  | OR_  |  XOR_  ; */
  454. /*                                              */
  455. /* This is an unused syntactic class.           */
  456.  
  457.  
  458. relal_op  :  '='  |  NOTEQL_  |  '<'  |  LTEQ_  |  '>'  |  GTEQL_  ;
  459.  
  460.  
  461. binary_add_op  :  '+'  |  '-'  |  '&' ;
  462.  
  463.  
  464. unary_add_op  :  '+'  |  '-'  ;
  465.  
  466.  
  467. mult_op  :  '*'  |  '/'  |  MOD_  |  REM_  ;
  468.  
  469.  
  470. /* highest_precedence_op        :  EXP_  |   ABS_   |   NOT_   ;         */
  471. /*                                                                */
  472. /* This is an unused syntactic class.                             */
  473.  
  474.  
  475.  
  476. /* 4.6 */
  477.  
  478. /* ty_cnvr  :  ty_mk '(' expr ')' ;     */
  479. /*                                                        */
  480. /* The class "ty_cnvr" is included under "name".  */
  481.  
  482.  
  483. /* 4.7  */
  484.  
  485. qualified_expr  :
  486.         ty_mkaggr_or_ty_mkPexprP_ ;
  487.  
  488.  
  489.  
  490. /* 4.8 */
  491.  
  492. allocator  :
  493.         NEW_ ty_mk
  494.    |    NEW_ ty_mk aggr
  495.    |    NEW_ ty_mk '\'' aggr  ;
  496.  
  497.  
  498.  
  499. /* 5.1 */
  500.  
  501. seq_of_stmts    :
  502.          ..prag.. stmt ..stmt..  ;
  503.  
  504.  
  505. stmt  :
  506.         ..label.. sim_stmt  |  ..label.. compound_stmt
  507.    |    error    ';'  ;
  508.  
  509. sim_stmt  :     null_stmt
  510.    |    assignment_stmt   |  exit_stmt
  511.    |    return_stmt       |  goto_stmt
  512.    |    delay_stmt        |  abort_stmt
  513.    |    raise_stmt        |  code_stmt
  514.    |    name ';' ;
  515.  
  516. /* Procedure and ent call stmts are included under "name".   */
  517.  
  518.  
  519. compound_stmt  :
  520.         if_stmt   |  case_stmt
  521.    |    loop_stmt         |  block_stmt
  522.    |    accept_stmt  |  select_stmt  ;
  523.  
  524.  
  525. label  :  L_LBL_ sim_n R_LBL_  ;
  526.  
  527.  
  528. null_stmt  :  NULL_ ';'  ;
  529.  
  530.  
  531. /* 5.2 */
  532.  
  533. assignment_stmt  :  name ASSIGN_ expr ';' ;
  534.  
  535.  
  536. /* 5.3 */
  537.  
  538. if_stmt  :
  539.         IF_ cond THEN_
  540.             seq_of_stmts
  541.         ..ELSIF__cond__THEN__seq_of_stmts..
  542.         .ELSE__seq_of_stmts.
  543.         END_ IF_ ';' ;
  544.  
  545.  
  546. cond  :  expr ;
  547.  
  548.  
  549. /* 5.4 */
  550.  
  551. case_stmt       :
  552.         CASE_ expr IS_
  553.             case_stmt_alt..case_stmt_alt..
  554.         END_ CASE_ ';' ;
  555.  
  556.  
  557. case_stmt_alt  :
  558.         WHEN_ choice ..or_choice.. ARROW_
  559.             seq_of_stmts ;
  560.  
  561.  
  562. /* 5.5  */
  563.  
  564. loop_stmt       :
  565.         .sim_nC.  /*simple name colon */
  566.             .iteration_scheme. LOOP_
  567.                 seq_of_stmts
  568.             END_ LOOP_ .sim_n. ';' ;
  569.  
  570.  
  571.  
  572. iteration_scheme  :
  573.         WHILE_ cond
  574.    |    FOR_ loop_prm_spec ;
  575.  
  576.  
  577. loop_prm_spec  :
  578.         identifier IN_ .REVERSE. dscr_rng ;
  579.  
  580.  
  581. /* 5.6 */
  582.  
  583. block_stmt  :
  584.         .sim_nC.
  585.             .DECLARE__decl_part.
  586.             BEGIN_
  587.                 seq_of_stmts
  588.             .EXCEPTION__excptn_handler..excptn_handler...
  589.             END_ .sim_n. ';' ;
  590.  
  591.  
  592. /* 5.7 */
  593.  
  594. exit_stmt       :
  595.         EXIT_ .expanded_n. .WHEN__cond. ';' ;
  596.  
  597.  
  598. /* 5.8 */
  599.  
  600. return_stmt  :  RETURN_ .expr. ';' ;
  601.  
  602.  
  603. /* 5.9 */
  604.  
  605. goto_stmt  :  GOTO_ expanded_n ';' ;
  606.  
  607.  
  608.  
  609. /* 6.1 */
  610.  
  611. subprg_d  :  subprg_spec ';'  ;
  612.  
  613.  
  614. subprg_spec  :
  615.         PROCEDURE_ identifier .fml_part.
  616.    |    FUNCTION_  designator .fml_part. RETURN_ ty_mk  ;
  617.  
  618.  
  619. designator  :  identifier  |  op_symbol  ;
  620.  
  621.  
  622. op_symbol  :  string_literal  ;
  623.  
  624.  
  625. fml_part  :
  626.         '(' prm_spec .._.prm_spec.. ')' ;
  627.  
  628.  
  629. prm_spec  :
  630.         idents ':' mode ty_mk ._ASN_expr.  ;
  631.  
  632.  
  633. mode  :  .IN.  |  IN_ OUT_  |  OUT_   ;
  634.  
  635.  
  636.  
  637. /* 6.3 */
  638.  
  639. subprg_body  :
  640.         subprg_spec IS_
  641.             .decl_part.
  642.         BEGIN_
  643.             seq_of_stmts
  644.         .EXCEPTION__excptn_handler..excptn_handler...
  645.         END_ .designator. ';' ;
  646.  
  647.  
  648. /* 6.4 */
  649.  
  650. /* procedure_call_stmt  :                                                   */
  651. /*      procedure_n .act_prm_part. ';' ;                        */
  652. /*                                                                          */
  653. /* func_call  :                                                     */
  654. /*      func_n .act_prm.  ;                                 */
  655. /*                                                                          */
  656. /* act_prm_part  :                                                  */
  657. /*      '(' prm_asc ... prm_asc .._paren ;                  */
  658. /*                                                                          */
  659. /* prm_asc        :                                                 */
  660. /*      .fml_prm ARROW. act_prm ;                   */
  661. /*                                                                          */
  662. /* fml_prm  : sim_n  ;                      */
  663. /*                                                                          */
  664. /* act_prm  :                                                       */
  665. /*      expr  |  name  |  ty_mk '(' name ')';   */
  666. /*                                                                          */
  667. /* "procedure_call_stmt" and "func_call" are included under "name".*/
  668.  
  669.  
  670.  
  671. /* 7.1 */
  672.  
  673. pkg_d  :  pkg_spec ';'  ;
  674.  
  675. pkg_spec  :
  676.         PACKAGE_ identifier IS_
  677.             ..basic_decl_item..
  678.         .PRIVATE..basic_decl_item...
  679.         END_ .sim_n.   ;
  680.  
  681.  
  682. pkg_body  :
  683.         PACKAGE_ BODY_ sim_n IS_
  684.             .decl_part.
  685.             .BEGIN__seq_of_stmts.EXCEPTION__excptn_handler..excptn_handler...
  686.         END_ .sim_n. ';'   ;
  687.  
  688.  
  689.  
  690. /* 7.4  */
  691.  
  692. priv_ty_d  :
  693.         TYPE_ identifier            IS_ .LIMITED. PRIVATE_ ';'
  694.       | TYPE_ identifier discr_part IS_ .LIMITED. PRIVATE_ ';' ;
  695.  
  696. /* defer_const_d          :                  */
  697. /*      idents : CONSTANT_ ty_mk ';'       ;  */
  698. /*                                                   */
  699. /* Included under "object_d".        */
  700.  
  701.  
  702.  
  703. /* 8.4 */
  704.  
  705. use_cl  :  USE_ expanded_n ...expanded_n.. ';'  ;
  706.  
  707.  
  708.  
  709. /* 8.5 */
  710.  
  711. renaming_d  :
  712.         idents ':' ty_mk      RENAMES_ name ';'
  713.    |    idents ':' EXCEPTION_      RENAMES_ expanded_n ';'
  714.    |    PACKAGE_ identifier        RENAMES_ expanded_n ';'
  715.    |    subprg_spec  RENAMES_ name ';'   ;
  716.  
  717. /* idents in the two above rule must contain only one */
  718. /* identifier.                                                 */
  719.  
  720.  
  721. /* 9.1 */
  722.  
  723. task_d  :  task_spec ';'  ;
  724.  
  725. task_spec  :
  726.         TASK_ .TYPE. identifier
  727.             .IS..ent_d_..rep_cl_END.sim_n.
  728.             ;
  729.  
  730. task_body  :
  731.         TASK_ BODY_ sim_n IS_
  732.             .decl_part.
  733.         BEGIN_
  734.             seq_of_stmts
  735.         .EXCEPTION__excptn_handler..excptn_handler...
  736.         END_ .sim_n. ';' ;
  737.  
  738.  
  739. /* 9.5 */
  740.  
  741. ent_d  :
  742.         ENTRY_ identifier .fml_part. ';'
  743.    |    ENTRY_ identifier '(' dscr_rng ')' .fml_part. ';'  ;
  744.  
  745.  
  746. ent_call_stmt  :
  747.         ..prag.. name ';' ;
  748.  
  749.  
  750. accept_stmt  :
  751.         ACCEPT_ sim_n .Pent_idx_P..fml_part.
  752.             .DO__seq_of_stmts__END.sim_n.. ';' ;
  753.  
  754.  
  755. ent_idx  :      expr   ;
  756.  
  757.  
  758. /* 9.6 */
  759.  
  760. delay_stmt  :  DELAY_ sim_expr ';' ;
  761.  
  762.  
  763. /* 9.7 */
  764.  
  765. select_stmt  :  selec_wait
  766.    |    condal_ent_call |  timed_ent_call  ;
  767.  
  768.  
  769. /* 9.7.1 */
  770.  
  771. selec_wait      :
  772.         SELECT_
  773.             select_alt
  774.             ..OR__select_alt..
  775.             .ELSE__seq_of_stmts.
  776.         END_ SELECT_ ';' ;
  777.  
  778.  
  779. select_alt  :
  780.         .WHEN__condARROW.selec_wait_alt  ;
  781.  
  782.  
  783. selec_wait_alt  :  accept_alt
  784.    |    delay_alt  |  terminate_alt  ;
  785.  
  786.  
  787. accept_alt  :
  788.         accept_stmt.seq_of_stmts.  ;
  789.  
  790.  
  791. delay_alt  :
  792.         delay_stmt.seq_of_stmts.  ;
  793.  
  794.  
  795. terminate_alt  :  TERM_stmt   ;
  796.  
  797.  
  798. /* 9.7.2 */
  799.  
  800. condal_ent_call :
  801.         SELECT_
  802.             ent_call_stmt
  803.             .seq_of_stmts.
  804.         ELSE_
  805.             seq_of_stmts
  806.         END_ SELECT_ ';' ;
  807.  
  808.  
  809.  
  810. /* 9.7.3 */
  811.  
  812. timed_ent_call  :
  813.         SELECT_
  814.             ent_call_stmt
  815.             .seq_of_stmts.
  816.         OR_
  817.             delay_alt
  818.         END_ SELECT_ ';' ;
  819.  
  820.  
  821. /* 9.10  */
  822.  
  823. abort_stmt  :  ABORT_ name ...name.. ';'  ;
  824.  
  825.  
  826. /* 10.1 */
  827.  
  828. compilation  :  ..compilation_unit..   ;
  829.  
  830.  
  831. compilation_unit  :
  832.         context_cl library_unit
  833.    |    context_cl secondary_unit ;
  834.  
  835. library_unit  :
  836.         subprg_d        |  pkg_d
  837.    |    gen_d   |  gen_inst
  838.    |    subprg_body     ;
  839.  
  840.  
  841. secondary_unit  :
  842.         library_unit_body  |  subunit   ;
  843.  
  844.  
  845. library_unit_body  :
  846.         pkg_body_or_subprg_body  ;
  847.  
  848.  
  849.  
  850. /* 10.1.1  */
  851.  
  852. context_cl      : ..with_cl..use_cl.... ;
  853.  
  854.  
  855. with_cl  :  WITH_ sim_n ...sim_n.. ';'  ;
  856.  
  857.  
  858. /* 10.2 */
  859.  
  860. body_stub  :
  861.         subprg_spec IS_ SEPARATE_ ';'
  862.    |    PACKAGE_ BODY_ sim_n IS_ SEPARATE_ ';'
  863.    |    TASK_ BODY_ sim_n    IS_ SEPARATE_ ';'   ;
  864.  
  865.  
  866. subunit  :  SEPARATE_ '(' expanded_n ')' proper_body  ;
  867.  
  868.  
  869.  
  870. /* 11.1 */
  871.  
  872. excptn_d  :  idents ':' EXCEPTION_ ';' ;
  873.  
  874.  
  875. /* 11.2 */
  876.  
  877. excptn_handler  :
  878.         WHEN_ excptn_choice ..or_excptn_choice.. ARROW_
  879.             seq_of_stmts  ;
  880.  
  881.  
  882. excptn_choice  :  expanded_n  | OTHERS_ ;
  883.  
  884.  
  885. /* 11.3 */
  886.  
  887. raise_stmt  :  RAISE_ .expanded_n. ';' ;
  888.  
  889.  
  890.  
  891. /* 12.1 */
  892.  
  893. gen_d  :  gen_spec ';'  ;
  894.  
  895. gen_spec  :
  896.         gen_fml_part subprg_spec
  897.    |    gen_fml_part pkg_spec  ;
  898.  
  899.  
  900. gen_fml_part  : GENERIC_ ..gen_prm_d..  ;
  901.  
  902.  
  903. gen_prm_d  :
  904.         idents ':' .IN.OUT.. ty_mk ._ASN_expr. ';'
  905.    |    TYPE_ identifier IS_ gen_ty_def ';'
  906.    |    priv_ty_d
  907.    |    WITH_ subprg_spec .IS_BOX_. ';' ;
  908. /* |    WITH_ subprg_spec .IS_ name. ';'  */
  909. /*                                                   */
  910. /* This rule is included in the previous one.        */
  911.  
  912.  
  913. gen_ty_def       :
  914.         '(' BOX_ ')'  |  RANGE_ BOX_  |  DIGITS_ BOX_  |  DELTA_ BOX_
  915.    |    array_ty_def           |  access_ty_def    ;
  916.  
  917.  
  918. /* 12.3  */
  919.  
  920. gen_inst  :
  921.         PACKAGE_ identifier IS_
  922.             NEW_ expanded_n .gen_act_part. ';'
  923.    |    PROCEDURE__ident__IS_
  924.             NEW_ expanded_n .gen_act_part. ';'
  925.    |    FUNCTION_  designator IS_
  926.             NEW_ expanded_n .gen_act_part. ';'  ;
  927.  
  928.  
  929. gen_act_part  :
  930.         '(' gen_asc ...gen_asc.. ')'              ;
  931.  
  932.  
  933. gen_asc      :
  934.         .gen_fml_prmARROW.gen_act_prm ;
  935.  
  936.  
  937. gen_fml_prm  :
  938.         sim_n  |  op_symbol  ;
  939.  
  940. gen_act_prm  :
  941.   expr_or_name_or_subprg_n_or_ent_n_or_ty_mk
  942.          ;
  943.  
  944.  
  945. /* 13.1 */
  946.  
  947. rep_cl  :
  948.         ty_rep_cl  |  address_cl  ;
  949.  
  950. ty_rep_cl  :  length_cl
  951.    |    enum_rep_cl
  952.    |    rec_rep_cl          ;
  953.  
  954.  
  955. /* 13.2 */
  956.  
  957. length_cl  :  FOR_ attribute USE_ sim_expr ';' ;
  958.  
  959.  
  960.  
  961. /* 13.3 */
  962.  
  963. enum_rep_cl  :
  964.         FOR__ty_sim_n__USE_ aggr ';' ;
  965.  
  966.  
  967.  
  968. /* 13.4  */
  969.  
  970. rec_rep_cl      :
  971.         FOR__ty_sim_n__USE_
  972.             RECORD_ .algt_cl.
  973.                 ..cmpon_cl..
  974.             END_ RECORD_ ';'   ;
  975.  
  976.  
  977. algt_cl  :     AT_ MOD_ sim_expr ';' ;
  978.  
  979.  
  980. cmpon_cl  :
  981.         name AT_ sim_expr RANGE_ rng ';' ;
  982.  
  983.  
  984.  
  985. /* 13.5 */
  986.  
  987. address_cl  :  FOR_ sim_n USE_ AT_ sim_expr ';'  ;
  988.  
  989.  
  990. /* 13.8 */
  991.  
  992. code_stmt  :  ty_mk_rec_aggr ';' ;
  993.  
  994.  
  995. /*----------------------------------------------------------------------*/
  996.  
  997. /* The following rules define semantically qualified symbols under more
  998. /* general categories.
  999.  
  1000. ty_n_or_subty_n  :  expanded_n ;
  1001. /*                                                                    */
  1002. /* An "expanded_n" is used for names that can be written using only*/
  1003. /* selectors.                                                         */
  1004.  
  1005. /*     ... these have been replaced logically to reduce the number    */
  1006. /*         of YACC_ nonterminal "rules"                                */
  1007.  
  1008. /* The following rules expand the concatenated constructs and define the */
  1009. /* specially added syntactical classes.                                  */
  1010.  
  1011.  
  1012. /* 2.1 */
  1013.  
  1014. ..prag..  :
  1015.        /* empty */
  1016.    |    ..prag.. prag  ;
  1017.  
  1018. .arg_ascs :
  1019.        /* empty */
  1020.    |    '(' arg_ascs ')' ;
  1021.  
  1022. arg_ascs :
  1023.         arg_asc
  1024.    |    arg_ascs ',' arg_asc ;
  1025.  
  1026. /*                                      */
  1027. /* "name" is included under "expr"      */
  1028.  
  1029.  
  1030. /* 3.1 */
  1031.  
  1032. /*                                                                         */
  1033. /*  "defer_const_d" is included under "object_d".*/
  1034.  
  1035. ._ASN_expr.     :
  1036.        /* empty */
  1037.    |    ASSIGN_ expr  ;
  1038.  
  1039. ...ident..  :
  1040.        /* empty */
  1041.    |    ...ident.. ',' identifier   ;
  1042.  
  1043. .constrt.  :
  1044.        /* empty */
  1045.    |    constrt   ;
  1046.  
  1047. /*                                                                       */
  1048. /* "idx_c" and "discr_c" are included under      */
  1049. /* the class "aggr".                                             */
  1050.  
  1051. expanded_n  :
  1052.         identifier
  1053.    |    expanded_n '.' identifier   ;
  1054.  
  1055. /*                                                                     */
  1056. /*  This expansion generalizes "rng" so that it may include ty and */
  1057. /*  subty names.                                                       */
  1058.  
  1059. ...enum_lit_spec.. :
  1060.        /* empty */
  1061.    |    ...enum_lit_spec.. ','
  1062.                 enum_lit_spec ;
  1063.  
  1064. .rng_c.  :
  1065.        /* empty */
  1066.    |    rng_c   ;
  1067.  
  1068. ...idx_subty_def..             :
  1069.        /* empty */
  1070.    |    ...idx_subty_def.. ',' idx_subty_def                ;
  1071.  
  1072. /*                                                                 */
  1073. /* To avoid conflicts, the more general class "name" is used.      */
  1074.  
  1075. ...dscr_rng.. :
  1076.        /* empty */
  1077.    |    ...dscr_rng.. ',' dscr_rng  ;
  1078.  
  1079.  
  1080. /* A_ dscr subty ind given as a ty mk is included under rng*/
  1081.  
  1082.  
  1083. ..cmpon_d.. :
  1084.        /* empty */
  1085.    |    ..cmpon_d.. cmpon_d ..prag..    ;
  1086.  
  1087. ...discr_spec.. :
  1088.        /* empty */
  1089.    |    ...discr_spec.. ';' discr_spec  ;
  1090.  
  1091.  
  1092. /* Pragmas that can appear between two consecutive variants are picked  */
  1093. /* up in the cmpons part of the variants themselves.            */
  1094.  
  1095. ..variant..  :
  1096.        /* empty */
  1097.    |    ..variant.. variant  ;
  1098.  
  1099. ..or_choice.. :
  1100.        /* empty */
  1101.    |    ..or_choice.. '|' choice  ;
  1102.  
  1103. /* The "sim_expr" by itself may be a "dscr_rng" or a  */
  1104. /* "cmpon_sim_n".                                            */
  1105.  
  1106. /* A_ body is the only later_decl_item that is not also a          */
  1107. /* basic_decl_item.         It is therefore used as the dividing   */
  1108. /* point between the two lists of decl items.                      */
  1109.  
  1110. ..basic_decl_item..         :
  1111.         ..prag..
  1112.    |    ..basic_decl_item.. basic_decl_item ..prag.. ;
  1113.  
  1114. ..later_decl_item..      :
  1115.         ..prag..
  1116.    |    ..later_decl_item.. later_decl_item ..prag..  ;
  1117.  
  1118.  
  1119. /* 4.1 */
  1120.  
  1121.  
  1122. /* "slice" is included under "idxed_cmpon".  */
  1123.  
  1124. /* The def of "name" includes "func_call".                              */
  1125. /* A_ prmless func call is recognized as a sim name or a        */
  1126. /* selected cmpon.      A_ func call with prms is recognized    */
  1127. /* as an idxed cmpon.                                           */
  1128.  
  1129.  
  1130. /* Reserved word attribute designators are included in the rules as a        */
  1131. /* convenience.  Alternativly, since an attribute designator is always preced*/
  1132. /* by an apostrophe, as noted in the RR_ 4.1.4, such usage may be detected    */
  1133. /* during lexical analysis thus obviating the need for special rules.        */
  1134. /*                                                                           */
  1135. /* The univ static expr of an attribute designator is reduced     */
  1136. /* as an "idxed_cmpon".                                              */
  1137.  
  1138. ...cmpon_asc..      :
  1139.        /* empty */
  1140.    |    ...cmpon_asc.. ',' cmpon_asc ;
  1141.  
  1142.  
  1143.  
  1144. /* Component ascs are generalized to include dscr rngs.            */
  1145. /* Thus, an "aggr" can be used for slices and idx and discr  */
  1146. /* constrts.                                                       */
  1147.  
  1148. rel..AND__rel..  :
  1149.         rel AND_ rel
  1150.    |    rel..AND__rel.. AND_ rel         ;
  1151.  
  1152. rel..OR__rel.. :
  1153.         rel OR_ rel
  1154.    |    rel..OR__rel.. OR_ rel ;
  1155.  
  1156. rel..XOR__rel..  :
  1157.         rel
  1158.    |    ..XOR__rel..  ;
  1159.  
  1160. ..XOR__rel..  :
  1161.         rel XOR_ rel
  1162.    |    ..XOR__rel.. XOR_ rel   ;
  1163.  
  1164. rel..AND__THEN__rel..  :
  1165.         rel AND_ THEN_ rel
  1166.    |    rel..AND__THEN__rel.. AND_ THEN_ rel  ;
  1167.  
  1168. rel..OR__ELSE__rel..    :
  1169.         rel OR_ ELSE_ rel
  1170.    |    rel..OR__ELSE__rel.. OR_ ELSE_ rel  ;
  1171.  
  1172. .relal_op__sim_expr.  :
  1173.        /* empty */
  1174.    |    relal_op sim_expr  ;
  1175.  
  1176. sim_expr.NOT.IN__rng_or_sim_expr.NOT.IN__ty_mk  :
  1177.         sim_expr .NOT. IN_ rng ;
  1178.  
  1179. /* The "ty_mk" is included under "rng"  */
  1180.  
  1181. .NOT.  :
  1182.        /* empty */
  1183.    |    NOT_    ;
  1184.  
  1185. .unary_add_op.term..binary_add_op__term..  :
  1186.         term
  1187.    |    unary_add_op term
  1188.    |    .unary_add_op.term..binary_add_op__term..
  1189.         binary_add_op term  ;
  1190.  
  1191. factor..mult_op__factor..       :
  1192.         factor
  1193.    |    factor..mult_op__factor.. mult_op factor ;
  1194.  
  1195. ._EXP___pri.  :
  1196.        /* empty */
  1197.    |    EXP_ pri ;
  1198.  
  1199. /* "stringsit" is included under "name" as "op_symbol".  */
  1200. /* "func_call" is included under "name".                            */
  1201. /* "ty_cnvr" is included under "name".                      */
  1202.  
  1203.  
  1204. ty_mkaggr_or_ty_mkPexprP_  :
  1205.         prefix '\'' aggr ;
  1206.  
  1207. /* The "prefix must be a "ty_mk".  The "PexprP_" is an "aggr". */
  1208.  
  1209.  
  1210. /* Here the "qualified_expr" can be given exactly  */
  1211.  
  1212.  
  1213. /* We use the fact that the constrt must be an idx or discr  */
  1214. /* constrt.                                                              */
  1215.  
  1216.  
  1217. /* 5.1 */
  1218.  
  1219.  
  1220. ..stmt..  :
  1221.         ..prag..
  1222.    |    ..stmt.. stmt ..prag.. ;
  1223.  
  1224.  
  1225. ..label..   :
  1226.        /* empty */
  1227.    |    ..label.. label  ;
  1228.  
  1229.  
  1230.  
  1231. ..ELSIF__cond__THEN__seq_of_stmts..  :
  1232.        /* empty */
  1233.    |    ..ELSIF__cond__THEN__seq_of_stmts..
  1234.                 ELSIF_ cond THEN_
  1235.                     seq_of_stmts   ;
  1236.  
  1237. .ELSE__seq_of_stmts.    :
  1238.        /* empty */
  1239.    |    ELSE_
  1240.             seq_of_stmts    ;
  1241.  
  1242. case_stmt_alt..case_stmt_alt.. :
  1243.             ..prag..
  1244.             case_stmt_alt
  1245.             ..case_stmt_alt..  ;
  1246.  
  1247. ..case_stmt_alt..       :
  1248.        /* empty */
  1249.    |    ..case_stmt_alt.. case_stmt_alt ;
  1250.  
  1251. .sim_nC.        :
  1252.        /* empty */
  1253.    |    sim_n ':' ;
  1254.  
  1255. .sim_n. :
  1256.        /* empty */
  1257.    |    sim_n  ;
  1258.  
  1259. .iteration_scheme.  :
  1260.        /* empty */
  1261.    |    iteration_scheme  ;
  1262.  
  1263. .REVERSE. :
  1264.        /* empty */
  1265.    |    REVERSE_   ;
  1266.  
  1267. .DECLARE__decl_part.         :
  1268.        /* empty */
  1269.    |    DECLARE_
  1270.             decl_part           ;
  1271.  
  1272. .EXCEPTION__excptn_handler..excptn_handler... :
  1273.        /* empty */
  1274.    |    EXCEPTION_
  1275.             ..prag.. excptn_handlers     ;
  1276.  
  1277. excptn_handlers :
  1278.         excptn_handler
  1279.    |    excptn_handlers excptn_handler   ;
  1280.  
  1281. .expanded_n.  :
  1282.        /* empty */
  1283.    |    expanded_n  ;
  1284.  
  1285. .WHEN__cond.  :
  1286.        /* empty */
  1287.    |    WHEN_ cond      ;
  1288.  
  1289. .expr.  :
  1290.        /* empty */
  1291.    |    expr   ;
  1292.  
  1293.  
  1294. /* 6.1 */
  1295.  
  1296. .fml_part.  :
  1297.        /* empty */
  1298.    |    fml_part  ;
  1299.  
  1300. .._.prm_spec..  :
  1301.        /* empty */
  1302.    |    .._.prm_spec.. ';' prm_spec  ;
  1303.  
  1304. .IN.  :
  1305.        /* empty */
  1306.    |    IN_       ;
  1307.  
  1308. .decl_part.         :  decl_part         ;
  1309.  
  1310. /* A_ "decl_part" may be empty.         */
  1311.  
  1312. .designator.  :
  1313.        /* empty */
  1314.    |    designator    ;
  1315.  
  1316.  
  1317. /* 7.1  */
  1318.  
  1319. .PRIVATE..basic_decl_item... :
  1320.        /* empty */
  1321.    |    PRIVATE_
  1322.             ..basic_decl_item.. ;
  1323.  
  1324. .BEGIN__seq_of_stmts.EXCEPTION__excptn_handler..excptn_handler...
  1325.                                 :
  1326.        /* empty */
  1327.    |    BEGIN_
  1328.             seq_of_stmts
  1329.         .EXCEPTION__excptn_handler..excptn_handler...  ;
  1330.  
  1331. .LIMITED.  :
  1332.        /* empty */
  1333.    |    LIMITED_    ;
  1334.  
  1335. ...expanded_n.. :
  1336.        /* empty */
  1337.    |    ...expanded_n.. ',' expanded_n  ;
  1338.  
  1339.  
  1340. /* 9.1 */
  1341.  
  1342. .TYPE.  :
  1343.        /* empty */
  1344.    |    TYPE_   ;
  1345.  
  1346. .IS..ent_d_..rep_cl_END.sim_n.  :
  1347.        /* empty */
  1348.    |    IS_
  1349.             ..ent_d..
  1350.             ..rep_cl..
  1351.         END_ .sim_n.          ;
  1352.  
  1353.  
  1354. ..ent_d..  :
  1355.         ..prag..
  1356.    |    ..ent_d.. ent_d ..prag..        ;
  1357.  
  1358. ..rep_cl..  :
  1359.        /* empty */
  1360.    |    ..rep_cl.. rep_cl ..prag..      ;
  1361.  
  1362.  
  1363. .Pent_idx_P..fml_part.  :
  1364.         .fml_part.
  1365.    |    '(' ent_idx ')' .fml_part.  ;
  1366.  
  1367. .DO__seq_of_stmts__END.sim_n..  :
  1368.        /* empty */
  1369.    |    DO_
  1370.           seq_of_stmts
  1371.         END_ .sim_n.  ;
  1372.  
  1373. ..OR__select_alt..  :
  1374.        /* empty */
  1375.    |    ..OR__select_alt.. OR_ select_alt       ;
  1376.  
  1377. .WHEN__condARROW.selec_wait_alt  :
  1378.         selec_wait_alt
  1379.    |    WHEN_ cond ARROW_ selec_wait_alt  ;
  1380.  
  1381. accept_stmt.seq_of_stmts.  :
  1382.         ..prag.. accept_stmt .seq_of_stmts.  ;
  1383.  
  1384. delay_stmt.seq_of_stmts.  :
  1385.         ..prag.. delay_stmt .seq_of_stmts. ;
  1386.  
  1387. TERM_stmt   :  ..prag.. TERMINATE_ ';' ..prag..  ;
  1388.  
  1389. .seq_of_stmts.  :
  1390.         ..prag..
  1391.    |    seq_of_stmts    ;
  1392.  
  1393. ...name..       :
  1394.        /* empty */
  1395.    |    ...name.. ',' name  ;
  1396.  
  1397.  
  1398.  
  1399. /* 10.1 */
  1400.  
  1401. ..compilation_unit..  :
  1402.         ..prag..
  1403.    |    ..compilation_unit.. compilation_unit ..prag.. ;
  1404.  
  1405. pkg_body_or_subprg_body   :  pkg_body  ;
  1406.  
  1407. /* "subprg_body" is already contained in the class "library_unit". */
  1408.  
  1409. ..with_cl..use_cl.... :
  1410.        /* empty */
  1411.    |    ..with_cl..use_cl.... with_cl use_cls ;
  1412.  
  1413.  
  1414. use_cls  :
  1415.         ..prag..
  1416.    |    use_cls use_cl ..prag..  ;
  1417.  
  1418. ...sim_n..  :
  1419.        /* empty */
  1420.    |    ...sim_n.. ',' sim_n  ;
  1421.  
  1422.  
  1423.  
  1424. /* 11.1  */
  1425.  
  1426. ..or_excptn_choice.. :
  1427.        /* empty */
  1428.    |    ..or_excptn_choice.. '|' excptn_choice ;
  1429.  
  1430.  
  1431.  
  1432. /* 12.1 */
  1433.  
  1434. ..gen_prm_d..  :
  1435.        /* empty */
  1436.    |    ..gen_prm_d.. gen_prm_d ;
  1437.  
  1438. .IN.OUT..  :
  1439.         .IN.
  1440.    |    IN_ OUT_         ;
  1441.  
  1442. .IS_BOX_.       :
  1443.        /* empty */
  1444.    |    IS_ name
  1445.    |    IS_ BOX_ ;
  1446.  
  1447. PROCEDURE__ident__IS_      :  subprg_spec IS_ ;
  1448.  
  1449. /* To avoid conflicts, the more general "subprg_spec" is used.  */
  1450.  
  1451. .gen_act_part.  :
  1452.        /* empty */
  1453.    |    gen_act_part ;
  1454.  
  1455. ...gen_asc.. :
  1456.        /* empty */
  1457.    |    ...gen_asc.. ',' gen_asc ;
  1458.  
  1459. .gen_fml_prmARROW.gen_act_prm  :
  1460.         gen_act_prm
  1461.    |    gen_fml_prm ARROW_ gen_act_prm  ;
  1462.  
  1463. expr_or_name_or_subprg_n_or_ent_n_or_ty_mk
  1464.                                 :  expr  ;
  1465.  
  1466. /* The above alts are included under "expr". */
  1467.  
  1468.  
  1469. /* 13.1 */
  1470.  
  1471. FOR__ty_sim_n__USE_  :
  1472.         FOR_ sim_n USE_ ;
  1473.  
  1474. /* The "sim_n" must be a "ty_sim_n". */
  1475.  
  1476. .algt_cl.  :
  1477.         ..prag..
  1478.    |    ..prag.. algt_cl ..prag..   ;
  1479.  
  1480. ..cmpon_cl..  :
  1481.        /* empty */
  1482.    |    ..cmpon_cl.. cmpon_cl ..prag..  ;
  1483.  
  1484. ty_mk_rec_aggr  :  qualified_expr      ;
  1485.  
  1486. /* The qualified expr must contain a rec aggr. */
  1487.  
  1488. %%
  1489.  
  1490. #include "lex_yy.c"
  1491. #include "main.h"
  1492.  
  1493.