home *** CD-ROM | disk | FTP | other *** search
/ Programmer's ROM - The Computer Language Library / programmersrom.iso / ada / debug / sdgrammr.grm < prev    next >
Encoding:
Text File  |  1988-05-03  |  80.6 KB  |  3,785 lines

  1.  %options default pliformat actions commb=-- tables 
  2.  
  3.  %define
  4.  
  5.     %action
  6. /. 
  7. -------------------------------------------------------------------
  8.  %rule_text
  9. ./
  10.  
  11.      %case_expression
  12. /. when %rule_num => 
  13. ./
  14.  
  15.     %start_case_expression
  16. /. when %rule_num
  17. ./
  18.     %continue_case_expression
  19. /. | %rule_num
  20. ./
  21.  
  22.     %end_case_expression
  23. /. | %rule_num =>
  24. ./
  25.  
  26.  %terminals ----------------------------------------------------------
  27.  
  28. -- This section also contains comments giving the identifier
  29. -- by which grammar symbols will be known in the generated
  30. -- parse tables package. These comments will be extracted
  31. -- from this file and placed in that package. Please note
  32. -- that some of the users of the parse tables package make
  33. -- use of the order and in some cases the value of the
  34. -- grammar symbols identified below.
  35.  
  36. ----------------------------------------------------------------------
  37. -- EMPTY is always the first grammar symbol
  38. ----------------------------------------------------------------------
  39. --(TK Empty_TokenValue    : constant GrammarSymbolRange :=  1;;
  40.  
  41. ----------------------------------------------------------------------
  42. -- Reserved Words
  43. ----------------------------------------------------------------------
  44. ABORT  --(TK AbortTokenValue     : constant GrammarSymbolRange :=  2;;
  45. ABS    --(TK AbsTokenValue       : constant GrammarSymbolRange :=  3;;
  46. ACCEPT --(TK AcceptTokenValue    : constant GrammarSymbolRange :=  4;;
  47. ACCESS --(TK AccessTokenValue    : constant GrammarSymbolRange :=  5;;
  48. ALL    --(TK AllTokenValue       : constant GrammarSymbolRange :=  6;;
  49. AND    --(TK AndTokenValue       : constant GrammarSymbolRange :=  7;;
  50. ARRAY  --(TK ArrayTokenValue     : constant GrammarSymbolRange :=  8;;
  51. AT     --(TK AtTokenValue        : constant GrammarSymbolRange :=  9;;
  52. BEGIN  --(TK BeginTokenValue     : constant GrammarSymbolRange := 10;;
  53. BODY   --(TK BodyTokenValue      : constant GrammarSymbolRange := 11;;
  54. CASE   --(TK CaseTokenValue      : constant GrammarSymbolRange := 12;;
  55. CONSTANT
  56.        --(TK ConstantTokenValue  : constant GrammarSymbolRange := 13;;
  57. DECLARE
  58.        --(TK DeclareTokenValue   : constant GrammarSymbolRange := 14;;
  59. DELAY  --(TK DelayTokenValue     : constant GrammarSymbolRange := 15;;
  60. DELTA  --(TK DeltaTokenValue     : constant GrammarSymbolRange := 16;;
  61. DIGITS --(TK DigitsTokenValue    : constant GrammarSymbolRange := 17;;
  62. DO     --(TK DoTokenValue        : constant GrammarSymbolRange := 18;;
  63. ELSE   --(TK ElseTokenValue      : constant GrammarSymbolRange := 19;;
  64. ELSIF  --(TK ElsifTokenValue     : constant GrammarSymbolRange := 20;;
  65. END    --(TK EndTokenValue       : constant GrammarSymbolRange := 21;;
  66. ENTRY  --(TK EntryTokenValue     : constant GrammarSymbolRange := 22;;
  67. EXCEPTION
  68.        --(TK ExceptionTokenValue : constant GrammarSymbolRange := 23;;
  69. EXIT   --(TK ExitTokenValue      : constant GrammarSymbolRange := 24;;
  70. FOR    --(TK ForTokenValue       : constant GrammarSymbolRange := 25;;
  71. FUNCTION
  72.        --(TK FunctionTokenValue  : constant GrammarSymbolRange := 26;;
  73. GENERIC
  74.        --(TK GenericTokenValue   : constant GrammarSymbolRange := 27;;
  75. GOTO   --(TK GotoTokenValue      : constant GrammarSymbolRange := 28;;
  76. IF     --(TK IfTokenValue        : constant GrammarSymbolRange := 29;;
  77. IN     --(TK InTokenValue        : constant GrammarSymbolRange := 30;;
  78. IS     --(TK IsTokenValue        : constant GrammarSymbolRange := 31;;
  79. LIMITED
  80.        --(TK LimitedTokenValue   : constant GrammarSymbolRange := 32;;
  81. LOOP   --(TK LoopTokenValue      : constant GrammarSymbolRange := 33;;
  82. MOD    --(TK ModTokenValue       : constant GrammarSymbolRange := 34;;
  83. NEW    --(TK NewTokenValue       : constant GrammarSymbolRange := 35;;
  84. NOT    --(TK NotTokenValue       : constant GrammarSymbolRange := 36;;
  85. NULL   --(TK NullTokenValue      : constant GrammarSymbolRange := 37;;
  86. OF     --(TK OfTokenValue        : constant GrammarSymbolRange := 38;;
  87. OR     --(TK OrTokenValue        : constant GrammarSymbolRange := 39;;
  88. OTHERS --(TK OthersTokenValue    : constant GrammarSymbolRange := 40;;
  89. OUT    --(TK OutTokenValue       : constant GrammarSymbolRange := 41;;
  90. PACKAGE
  91.        --(TK PackageTokenValue   : constant GrammarSymbolRange := 42;;
  92. PRAGMA --(TK PragmaTokenValue    : constant GrammarSymbolRange := 43;;
  93. PRIVATE
  94.        --(TK PrivateTokenValue   : constant GrammarSymbolRange := 44;;
  95. PROCEDURE
  96.        --(TK ProcedureTokenValue : constant GrammarSymbolRange := 45;;
  97. RAISE  --(TK RaiseTokenValue     : constant GrammarSymbolRange := 46;;
  98. RANGE  --(TK RangeTokenValue     : constant GrammarSymbolRange := 47;;
  99. RECORD --(TK RecordTokenValue    : constant GrammarSymbolRange := 48;;
  100. REM    --(TK RemTokenValue       : constant GrammarSymbolRange := 49;;
  101. RENAMES
  102.        --(TK RenamesTokenValue   : constant GrammarSymbolRange := 50;;
  103. RETURN --(TK ReturnTokenValue    : constant GrammarSymbolRange := 51;;
  104. REVERSE
  105.        --(TK ReverseTokenValue   : constant GrammarSymbolRange := 52;;
  106. SELECT --(TK SelectTokenValue    : constant GrammarSymbolRange := 53;;
  107. SEPARATE
  108.        --(TK SeparateTokenValue  : constant GrammarSymbolRange := 54;;
  109. SUBTYPE
  110.        --(TK SubtypeTokenValue   : constant GrammarSymbolRange := 55;;
  111. TASK   --(TK TaskTokenValue      : constant GrammarSymbolRange := 56;;
  112. TERMINATE
  113.        --(TK TerminateTokenValue : constant GrammarSymbolRange := 57;;
  114. THEN   --(TK ThenTokenValue      : constant GrammarSymbolRange := 58;;
  115. TYPE   --(TK TypeTokenValue      : constant GrammarSymbolRange := 59;;
  116. USE    --(TK UseTokenValue       : constant GrammarSymbolRange := 60;;
  117. WHEN   --(TK WhenTokenValue      : constant GrammarSymbolRange := 61;;
  118. WHILE  --(TK WhileTokenValue     : constant GrammarSymbolRange := 62;;
  119. WITH   --(TK WithTokenValue      : constant GrammarSymbolRange := 63;;
  120. XOR    --(TK XorTokenValue       : constant GrammarSymbolRange := 64;;
  121.  
  122. ----------------------------------------------------------------------
  123. -- Identifier and Literals
  124. ----------------------------------------------------------------------
  125. identifier
  126.        --(TK IdentifierTokenValue : constant GrammarSymbolRange := 65;;
  127. numeric_literal
  128.        --(TK NumericTokenValue    : constant GrammarSymbolRange := 66;;
  129. string_literal
  130.        --(TK StringTokenValue     : constant GrammarSymbolRange := 67;;
  131. character_literal
  132.        --(TK CharacterTokenValue  : constant GrammarSymbolRange := 68;;
  133.  
  134. ----------------------------------------------------------------------
  135. -- Single Delimiters
  136. ----------------------------------------------------------------------
  137. &      --(TK Ampersand_TokenValue  : constant GrammarSymbolRange := 69;;
  138. '      --(TK Apostrophe_TokenValue : constant GrammarSymbolRange := 70;;
  139. (      --(TK LeftParen_TokenValue  : constant GrammarSymbolRange := 71;;
  140. )      --(TK RightParen_TokenValue : constant GrammarSymbolRange := 72;;
  141. *      --(TK Star_TokenValue       : constant GrammarSymbolRange := 73;;
  142. +      --(TK Plus_TokenValue       : constant GrammarSymbolRange := 74;;
  143. ,      --(TK Comma_TokenValue      : constant GrammarSymbolRange := 75;;
  144. -      --(TK Minus_TokenValue      : constant GrammarSymbolRange := 76;;
  145. .      --(TK Dot_TokenValue        : constant GrammarSymbolRange := 77;;
  146. /      --(TK Slash_TokenValue      : constant GrammarSymbolRange := 78;;
  147. :      --(TK Colon_TokenValue      : constant GrammarSymbolRange := 79;;
  148. ;      --(TK SemiColon_TokenValue  : constant GrammarSymbolRange := 80;;
  149. <      --(TK LT_TokenValue         : constant GrammarSymbolRange := 81;;
  150. =      --(TK EQ_TokenValue         : constant GrammarSymbolRange := 82;;
  151. >      --(TK GT_TokenValue         : constant GrammarSymbolRange := 83;;
  152. '|'    --(TK Bar_TokenValue        : constant GrammarSymbolRange := 84;;
  153.  
  154. ----------------------------------------------------------------------
  155. -- Double Delimiters
  156. ----------------------------------------------------------------------
  157. =>     --(TK EQGT_TokenValue     : constant GrammarSymbolRange := 85;;
  158. ..     --(TK DotDot_TokenValue   : constant GrammarSymbolRange := 86;;
  159. **     --(TK StarStar_TokenValue : constant GrammarSymbolRange := 87;;
  160. :=     --(TK ColonEQ_TokenValue  : constant GrammarSymbolRange := 88;;
  161. /=     --(TK SlashEQ_TokenValue  : constant GrammarSymbolRange := 89;;
  162. >=     --(TK GTEQ_TokenValue     : constant GrammarSymbolRange := 90;;
  163. <=     --(TK LTEQ_TokenValue     : constant GrammarSymbolRange := 91;;
  164. <<     --(TK LTLT_TokenValue     : constant GrammarSymbolRange := 92;;
  165. >>     --(TK GTGT_TokenValue     : constant GrammarSymbolRange := 93;;
  166. <>     --(TK LTGT_TokenValue     : constant GrammarSymbolRange := 94;;
  167.  
  168. ----------------------------------------------------------------------
  169. -- Comment Terminal
  170. ----------------------------------------------------------------------
  171. comment_literal
  172.         --(TK Comment_TokenValue : constant GrammarSymbolRange := 95;;
  173. ----------------------------------------------------------------------
  174. -- Special Terminals
  175. ----------------------------------------------------------------------
  176. --(TK EOF_TokenValue      : constant GrammarSymbolRange := 96;;
  177.  
  178. ----------------------------------------------------------------------
  179. -- Special Non-Terminals
  180. ----------------------------------------------------------------------
  181. --(TK ACC_TokenValue      : constant GrammarSymbolRange := 97;;
  182.  
  183.  %start --------------------------------------------------------------
  184.  
  185.   compilation 
  186.  
  187.  %rules --------------------------------------------------------------
  188.  
  189.      
  190. /.
  191. with Source_Instrumenter_Declarations;
  192.  
  193. separate (Parser)
  194. procedure Apply_Actions(Rule_Number : in PT.LeftHandSideRange) is
  195.  
  196.    -- all procedure calls in this unit are procedures in package
  197.    -- Source_Instrumenter_Utilities
  198.      
  199.     use Source_Instrumenter_Declarations;
  200.     use Source_Instrumenter_Utilities;
  201.      
  202. begin
  203.      
  204.     case Rule_Number is
  205.      
  206. ./
  207.      
  208. -- LRM 2.8
  209.      
  210.  pragma   ::=
  211.          PRAGMA identifier ( general_component_associations ) ;
  212.      
  213. /. %action %start_case_expression ./
  214.      
  215.      |   PRAGMA identifier ;
  216.      
  217. /. %action %end_case_expression
  218.         New_Line;
  219. ./
  220.      
  221. -- LRM 3.1
  222.      
  223.  basic_declaration   ::=
  224. --c      object_declaration
  225.  
  226. --c  |   number_declaration
  227.      
  228.          type_declaration
  229.      
  230. /. %action %case_expression
  231.         End_Type_Declaration;
  232. ./
  233.      
  234.      |   subtype_declaration
  235.      
  236. -- no action
  237.      
  238.      |   subprogram_declaration
  239.      
  240. -- no action
  241.      
  242.      |   package_declaration
  243.      
  244. -- no action
  245.      
  246.      |   task_specification
  247.      
  248. -- no action
  249.      
  250.      |   generic_specification
  251.      
  252. -- no action
  253.      
  254. --c  |   exception_declaration
  255.      
  256.      |   generic_instantiation
  257.      
  258. -- no action
  259.      
  260.      |   renaming_declaration
  261.      
  262. -- no action
  263.      
  264. --c
  265.  basic_colon_declaration   ::=
  266.          object_declaration
  267.      
  268. /. %action %start_case_expression ./
  269.      
  270.      |   number_declaration
  271.      
  272. /. %action %continue_case_expression ./
  273.      
  274.      |   exception_declaration
  275.      
  276. /. %action %continue_case_expression ./
  277.      
  278.      |   renaming_colon_declaration
  279.      
  280. /. %action %end_case_expression
  281.         New_Line;
  282. ./
  283.      
  284. -- LRM 3.2
  285.      
  286.  object_declaration   ::=
  287.          identifier_list : subtype_indication [:=expression] ;
  288.      
  289.      
  290. /. %action %case_expression
  291.         Set_Identifier_Mode (Read_Write);
  292.         Process_Identifier_List (Object_List);
  293. ./
  294.      
  295.      |   identifier_list : CONSTANT subtype_indication
  296.             [:=expression] ;
  297.      
  298. /. %action %case_expression
  299.         Set_Identifier_Mode (Read_Only);
  300.         Process_Identifier_List (Object_List);
  301. ./
  302.      
  303. --sd |   identifier_list : constrained_array_definition
  304. --sd        [:=expression] ;
  305.  
  306.      |   identifier_list : start_cad constrained_array_definition
  307.             end_cad [:=expression] ;
  308.      
  309. /. %action %case_expression
  310.         Set_Identifier_Mode (Read_Write);
  311.         Process_Identifier_List (Object_List);
  312. ./
  313.      
  314. --sd |   identifier_list : CONSTANT
  315. --sd        constrained_array_definition [:=expression] ;
  316.      
  317.      |   identifier_list : CONSTANT start_cad
  318.             constrained_array_definition end_cad [:=expression] ;
  319.      
  320. /. %action %case_expression
  321.         Set_Identifier_Mode (Read_Only);
  322.         Process_Identifier_List (Object_List);
  323. ./
  324.      
  325. --sd
  326.  start_cad  ::=
  327.          empty
  328.  
  329. /. %action %case_expression
  330.         Start_Anonymous_Array_Definition;
  331. ./
  332.  
  333. --sd
  334.  end_cad  ::=
  335.          empty
  336.  
  337. /. %action %case_expression
  338.         End_Anonymous_Array_Definition;
  339. ./
  340.  
  341.  number_declaration   ::=
  342.          identifier_list : CONSTANT := expression ;
  343.      
  344. /. %action %case_expression
  345.         Set_Identifier_Mode (Const);
  346.         Process_Identifier_List (Object_List);
  347. ./
  348.      
  349.  identifier_list   ::=
  350. --sd     identifier {,identifier}
  351.          save_identifier {,save_identifier}
  352.      
  353. -- no action
  354.  
  355. --sd
  356.  save_identifier  ::=
  357.          identifier
  358.  
  359. /. %action %case_expression
  360.         Add_Identifier_To_List;
  361. ./
  362.  
  363. -- LRM 3.3.1
  364.      
  365.  type_declaration   ::=
  366.          full_type_declaration
  367.      
  368. -- no action
  369.      
  370.      |   incomplete_type_declaration
  371.      
  372. -- no action
  373.      
  374.      |   private_type_declaration
  375.      
  376. -- no action
  377.      
  378.  full_type_declaration   ::=
  379. --c      TYPE identifier IS type_definition ;
  380. --sd     TYPE identifier IS type_definition
  381.      
  382.          TYPE type_identifier IS type_definition
  383.      
  384. -- no action
  385.      
  386. --c  |   TYPE identifier ( discriminant_specification
  387. --c         {;discriminant_specification} ) IS type_definition ;
  388.      
  389. --sd |   TYPE identifier left_paren discriminant_specification
  390. --sd        {;discriminant_specification} right_paren IS type_definition
  391.      
  392.      |   TYPE type_identifier left_paren discriminant_specification
  393.             {;discriminant_specification} right_paren IS type_definition
  394.      
  395. -- no action
  396.  
  397. --sd
  398.  type_identifier  ::=
  399.          identifier
  400.  
  401. /. %action %case_expression
  402.          Save_Type_Identifier;
  403. ./
  404.  
  405.  type_definition   ::=
  406. --c      enumeration_type_definition
  407.      
  408.          enumeration_type_definition ;
  409.  
  410. -- no action
  411.      
  412. --c  |   integer_type_definition
  413.      
  414.      |   integer_type_definition ;
  415.      
  416. -- no action
  417.      
  418. --c  |   real_type_definition
  419.      
  420.      |   real_type_definition ;
  421.      
  422. -- no action
  423.      
  424. --c  |   array_type_definition
  425.      
  426.      |   array_type_definition ;
  427.      
  428. /. %action %case_expression
  429.         Save_Type_Class (Array_Type);
  430. ./
  431. -- no action
  432.      
  433. --c  |   record_type_definition
  434.      
  435.      |   record_type_definition ;
  436.      
  437. /. %action %case_expression
  438.         Decrease_Indent;
  439.         Save_Type_Class (Record_Type);
  440. ./
  441.      
  442. --c  |   access_type_definition
  443.      
  444.      |   access_type_definition ;
  445.      
  446. /. %action %case_expression
  447.         Save_Type_Class (Access_Type);
  448. ./
  449.      
  450. --c  |   derived_type_definition
  451.      
  452.      |   derived_type_definition ;
  453.      
  454. -- no action
  455.      
  456. -- LRM 3.3.2
  457.      
  458.  subtype_declaration   ::=
  459.          SUBTYPE identifier IS subtype_indication ;
  460.      
  461. -- no action
  462.      
  463.  subtype_indication   ::=
  464.          type_mark
  465.      
  466. -- no action
  467.      
  468.      |   type_mark constraint
  469.      
  470. -- no action
  471.      
  472.  type_mark   ::=
  473.          type_name|subtype_name
  474.      
  475. /. %action %case_expression
  476.         End_Typemark;
  477. ./
  478.  
  479.  
  480.  constraint   ::=
  481.          range_constraint
  482.      
  483. -- no action
  484.      
  485.      |   floating_point_constraint
  486.      
  487. -- no action
  488.      
  489.      |   fixed_point_constraint
  490.      
  491. -- no action
  492.      
  493.      |   ( general_component_associations )
  494.      
  495. -- no action
  496.      
  497. -- LRM 3.4
  498.      
  499.  derived_type_definition   ::=
  500.          NEW start_expanded_name subtype_indication
  501.      
  502. /. %action %case_expression
  503.         Save_Type_Class (Derived_Type);
  504. ./
  505.  
  506. -- LRM 3.5
  507.      
  508.  range_constraint   ::=
  509.          RANGE simple_expression
  510.      
  511. -- no action
  512.      
  513.      |   RANGE simple_expression .. simple_expression
  514.      
  515. -- no action
  516.      
  517. -- LRM 3.5.1
  518.      
  519.  enumeration_type_definition   ::=
  520.          ( enumeration_literal_specification
  521.                    {,enumeration_literal_specification} )
  522.      
  523. /. %action %case_expression
  524.         Save_Type_Class (Enumeration_Type);
  525. ./
  526.      
  527.  enumeration_literal_specification   ::=
  528.          enumeration_literal
  529.      
  530. -- no action
  531.      
  532.  enumeration_literal   ::=
  533.          identifier
  534.      
  535. -- no action
  536.      
  537.      |   character_literal
  538.      
  539. -- no action
  540.      
  541. -- LRM 3.5.4
  542.      
  543.  integer_type_definition   ::=
  544.          range_constraint
  545.      
  546. /. %action %case_expression
  547.         Save_Type_Class (Integer_Type);
  548. ./
  549.      
  550. -- LRM 3.5.6
  551.      
  552.  real_type_definition   ::=
  553.          floating_point_constraint
  554.      
  555. /. %action %case_expression
  556.         Save_Type_Class (Float_Type);
  557. ./
  558.      
  559.      |   fixed_point_constraint
  560.      
  561. /. %action %case_expression
  562.         Save_Type_Class (Fixed_Type);
  563. ./
  564.      
  565. -- LRM 3.5.7
  566.      
  567.  floating_point_constraint   ::=
  568.          floating_accuracy_definition [range_constraint]
  569.      
  570. -- no action
  571.      
  572.  floating_accuracy_definition   ::=
  573.          DIGITS simple_expression
  574.      
  575. -- no action
  576.      
  577. -- LRM 3.5.9
  578.      
  579.  fixed_point_constraint   ::=
  580.          fixed_accuracy_definition [range_constraint]
  581.      
  582. -- no action
  583.      
  584.  fixed_accuracy_definition   ::=
  585.          DELTA simple_expression
  586.      
  587. -- no action
  588.      
  589. -- LRM 3.6
  590.      
  591.  array_type_definition   ::=
  592.          unconstrained_array_definition
  593.      
  594. -- no action
  595.      
  596.      |   constrained_array_definition
  597.      
  598. -- no action
  599.      
  600.  unconstrained_array_definition   ::=
  601. --sd         ARRAY ( index_subtype_definition
  602. --sd            {,index_subtype_definition} ) OF subtype_indication
  603.  
  604.          ARRAY index_left_paren index_subtype_definition
  605.             {,index_subtype_definition} index_right_paren 
  606.             OF subtype_indication
  607.      
  608. -- no action
  609.      
  610.  constrained_array_definition   ::=
  611.          ARRAY index_constraint OF subtype_indication
  612.      
  613. -- no action
  614.      
  615.  index_subtype_definition   ::=
  616.          name RANGE <>
  617.      
  618. /. %action %case_expression
  619.         Increment_Array_Index;
  620. ./     
  621.  
  622.  index_constraint   ::=
  623. --sd         ( discrete_range {,discrete_range} )
  624.          index_left_paren discrete_range {,discrete_range} index_right_paren
  625.      
  626. -- no action
  627.  
  628. --sd
  629.  index_left_paren  ::=
  630.           (
  631.  
  632. /. %action %case_expression
  633.          Start_Array_Index;
  634. ./
  635.      
  636. --sd
  637.  index_right_paren  ::=
  638.           )
  639.  
  640. /. %action %case_expression
  641.          End_Array_Index;
  642. ./
  643.      
  644.  discrete_range   ::=
  645.          name range_constraint
  646.      
  647. /. %action %start_case_expression ./ 
  648.      
  649.      |   range
  650.      
  651. /. %action %end_case_expression
  652.         Increment_Array_Index;
  653. ./
  654.      
  655.  range   ::=
  656.          simple_expression
  657.      
  658.      |   simple_expression .. simple_expression
  659.      
  660. -- no action
  661.      
  662. -- LRM 3.7
  663.      
  664.  record_type_definition   ::=
  665. --c      RECORD  component_list END RECORD
  666.      
  667.          start_of_record_type record_terminal component_list END RECORD
  668.      
  669. -- no action
  670.      
  671.  component_list   ::=
  672. --c      {pragma_decl} {component_declaration}
  673. --c          component_declaration {pragma_decl}
  674.  
  675.          {pragma_decl} {component_declaration}
  676.              component_declaration closing_{pragma_decl}
  677.      
  678. /. %action %start_case_expression ./
  679.      
  680. --c  |   {pragma_decl} {component_declaration}
  681. --c          variant_part {pragma_decl}
  682.  
  683.      |   {pragma_decl} {component_declaration}'
  684.              variant_part {pragma_decl}
  685.      
  686. /. %action %end_case_expression 
  687.          Decrease_Indent;
  688. ./
  689.      
  690. --c  |    NULL ; {pragma_decl}
  691.      
  692.      |    null_statement {pragma_decl}
  693.      
  694. --sd        -- buffering started at record_terminal so must print out
  695. --sd        Print_Colon_Declarations_Buffer;
  696. /. %action %case_expression
  697.         Decrease_Indent;
  698.         Null_Record_Field;
  699. ./
  700.      
  701.  component_declaration   ::=
  702.          identifier_list : subtype_indication [:=expression] ;
  703.  
  704. /. %action %case_expression
  705.         New_Line;
  706.         Process_Identifier_List (Record_Field_List);
  707. ./
  708.      
  709. -- LRM 3.7.1
  710.      
  711.  discriminant_specification   ::=
  712.      identifier_list : type_mark [:=expression]
  713.      
  714. /. %action %case_expression
  715.         Process_Identifier_List (Discriminant_List);
  716. ./
  717.  
  718. -- LRM 3.7.3
  719.      
  720.  variant_part   ::=
  721. --c      CASE identifier IS {pragma_variant} variant {variant}
  722. --c         END CASE ;
  723.      
  724.          CASE__identifier__IS {pragma_variant}__variant__{variant}
  725.             END CASE ;
  726.      
  727.      
  728. /. %action %case_expression
  729.         New_Line;
  730. ./
  731.      
  732.  variant   ::=
  733. --c      WHEN choice {|choice} => component_list
  734. --sd     WHEN__variant_choice__{|variant_choice}__=> component_list
  735.  
  736.          start_record_variant WHEN__variant_choice__{|variant_choice}__=> 
  737.          component_list
  738.  
  739. -- no action
  740.      
  741. --c  |   WHEN OTHERS => component_list
  742. --sd |   WHEN__variant_OTHERS__=> component_list  
  743.  
  744.      |   start_record_variant WHEN__variant_OTHERS__=> component_list  
  745.  
  746. -- no action
  747.      
  748. --sd
  749.  start_record_variant  ::=
  750.          empty
  751.  
  752. /. %action %case_expression
  753.         Start_Record_Variant;
  754. ./
  755.  
  756.  choice   ::=
  757.          simple_expression
  758.      
  759. -- no action
  760.      
  761.      |   simple_expression .. simple_expression
  762.      
  763. -- no action
  764.      
  765.      |   name range_constraint
  766.      
  767. -- no action
  768.      
  769. -- LRM 3.8
  770.      
  771.  access_type_definition   ::=
  772.          ACCESS subtype_indication
  773.      
  774. -- no action
  775.      
  776. -- LRM 3.8.1
  777.      
  778.  incomplete_type_declaration   ::=
  779. --sd     TYPE identifier ;
  780.          TYPE type_identifier ;
  781.      
  782. -- no action
  783.  
  784. --c  |   TYPE identifier ( discriminant_specification
  785. --c         {;discriminant_specification} ) ;
  786.  
  787. --sd |   TYPE identifier left_paren discriminant_specification
  788. --sd        {;discriminant_specification} right_paren ;
  789.      
  790.      |   TYPE type_identifier left_paren discriminant_specification
  791.             {;discriminant_specification} right_paren ;
  792.      
  793. -- no action
  794.      
  795. -- LRM 3.9
  796.      
  797.  declarative_part   ::=
  798. --s      {basic_declarative_item}
  799.          start_bdi {basic_declarative_item}
  800.      
  801. /. %action %start_case_expression ./
  802.      
  803. --s  |   {basic_declarative_item} body {later_declarative_item}
  804.      |   start_bdi {basic_declarative_item} body {later_declarative_item}
  805.      
  806. /. %action %end_case_expression
  807.         Decrease_Indent;
  808.         End_Declarative_Part;
  809. ./
  810.  
  811. --s
  812.  start_bdi  ::=
  813.          empty
  814.  
  815. /. %action %case_expression
  816.         Start_Declarative_Part;
  817. ./
  818.  
  819.  basic_declarative_item   ::=
  820.          basic_declaration
  821.      
  822. /. %action %start_case_expression ./
  823.      
  824.      |   representation_clause
  825.      
  826. /. %action %continue_case_expression ./
  827.      
  828.      |   use_clause
  829.      
  830. /. %action %continue_case_expression ./
  831.      
  832.  later_declarative_item   ::=
  833.          body
  834.      
  835. -- no action
  836.      
  837.      |   subprogram_declaration
  838.      
  839. /. %action %continue_case_expression ./
  840.      
  841.      |   package_declaration
  842.      
  843. /. %action %continue_case_expression ./
  844.      
  845.      |   task_specification
  846.      
  847. /. %action %continue_case_expression ./
  848.      
  849.      |   generic_specification
  850.      
  851. /. %action %continue_case_expression ./
  852.      
  853.      |   use_clause
  854.      
  855. /. %action %continue_case_expression ./
  856.      
  857.      |   generic_instantiation
  858.      
  859. /. %action %continue_case_expression ./
  860.      
  861.  body   ::=
  862.          proper_body
  863.      
  864. /. %action %continue_case_expression ./
  865.      
  866.      |   body_stub
  867.      
  868. /. %action %end_case_expression
  869.         New_Line;
  870. ./
  871.      
  872.  proper_body   ::=
  873.          subprogram_body
  874.      
  875. -- no action
  876. --sd /. %action %start_case_expression ./
  877.      
  878.      |   package_body
  879.      
  880. -- no action
  881. --sd /. %action %continue_case_expression ./
  882.      
  883.      |   task_body
  884.      
  885. -- no action
  886. --sd /. %action %end_case_expression
  887. --sd        Switch_Comment_Context;
  888. --sd./
  889.      
  890. -- LRM 4.1
  891.      
  892.  name   ::=
  893.          identifier
  894.  
  895. -- no action
  896.      
  897.      |   character_literal
  898.      
  899. -- no action
  900.      
  901.      |   string_literal
  902.      
  903. -- no action
  904.      
  905.      |   indexed_component
  906.      
  907. -- no action
  908.      
  909.      |   selected_component
  910.      
  911. -- no action
  912.      
  913.      |   attribute
  914.  
  915. -- no action
  916.      
  917.      
  918. -- LRM 4.1.1 & 4.1.2
  919.      
  920.  indexed_component   ::=
  921.          name ( general_component_associations )
  922.      
  923. -- no action
  924.      
  925. -- LRM 4.1.3
  926.      
  927.  selected_component   ::=
  928.          name . selector
  929.      
  930. -- no action
  931.      
  932.      |   name . ALL
  933.      
  934. -- no action
  935.      
  936.  selector   ::=
  937.          identifier
  938.      
  939. -- no action
  940.      
  941.      |   character_literal
  942.      
  943. -- no action
  944.      
  945.      |   string_literal
  946.      
  947. -- no action
  948.      
  949. -- LRM 4.1.4
  950.      
  951.  attribute   ::=
  952.          name ' attribute_designator
  953.      
  954. -- no action
  955.      
  956.  attribute_designator   ::=
  957.          identifier
  958.      
  959. -- no action
  960.      
  961.      |   DIGITS
  962.      
  963. -- no action
  964.      
  965.      |   DELTA
  966.      
  967. -- no action
  968.      
  969.      |   RANGE
  970.      
  971. -- no action
  972.      
  973. -- LRM 4.3
  974.      
  975.  aggregate   ::=
  976.          ( component_associations )
  977.      
  978. -- no action
  979.      
  980.  component_associations   ::=
  981.              expression,expression{,expression}
  982.              [,others=>expression]
  983.      
  984. -- no action
  985.      
  986.      |       expression,expression{,expression}
  987.              , choice{|choice}=>expression
  988.              {,choice{|choice}=>expression}
  989.              [,others=>expression]
  990.      
  991. -- no action
  992.      
  993.      |       expression
  994.              , choice{|choice}=>expression
  995.              {,choice{|choice}=>expression}
  996.              [,others=>expression]
  997.      
  998. -- no action
  999.      
  1000.      |       choice{|choice}=>expression
  1001.              {,choice{|choice}=>expression}
  1002.              [,others=>expression]
  1003.      
  1004. -- no action
  1005.      
  1006.      |       expression , others=>expression
  1007.      
  1008. -- no action
  1009.      
  1010.      |       others=>expression
  1011.      
  1012. -- no action
  1013.      
  1014.  general_component_associations   ::=
  1015.                ga_expression{,ga_expression}
  1016.      
  1017. -- no action
  1018.      
  1019.      |         ga_expression{,ga_expression}
  1020.               , identifier{|identifier}=>expression
  1021.               {,identifier{|identifier}=>expression}
  1022.      
  1023. -- no action
  1024.      
  1025.      |        identifier{|identifier}=>expression
  1026.               {,identifier{|identifier}=>expression}
  1027.      
  1028. -- no action
  1029.      
  1030. -- LRM 4.4
  1031.      
  1032.  expression   ::=
  1033.          relation
  1034.      
  1035. -- no action
  1036.      
  1037.      |   relation{AND__relation}
  1038.      
  1039. -- no action
  1040.      
  1041.      |   relation{OR__relation}
  1042.      
  1043. -- no action
  1044.      
  1045.      |   relation{XOR__relation}
  1046.      
  1047. -- no action
  1048.      
  1049.      |   relation{AND__THEN__relation}
  1050.      
  1051. -- no action
  1052.      
  1053.      |   relation{OR__ELSE__relation}
  1054.      
  1055. -- no action
  1056.      
  1057.  relation   ::=
  1058.          simple_expression
  1059.                   [relational_operator__simple_expression]
  1060.      
  1061. -- no action
  1062.      
  1063.      |   simple_expression [NOT]IN range
  1064.      
  1065. -- no action
  1066.      
  1067.  simple_expression   ::=
  1068.          [unary_adding_operator]term{binary_adding_operator__term}
  1069.      
  1070. -- no action
  1071.      
  1072.  term   ::=
  1073.          factor{multiplying_operator__factor}
  1074.      
  1075. -- no action
  1076.      
  1077.  factor   ::=
  1078.          primary [exponentiating_operator__primary]
  1079.      
  1080. -- no action
  1081.      
  1082.      |   high_precedence_unary_operator   primary
  1083.      
  1084. -- no action
  1085.      
  1086.  parenthesized_expression   ::=
  1087.          ( expression )
  1088.      
  1089. -- no action
  1090.  
  1091.     
  1092.  primary   ::=
  1093.          numeric_literal
  1094.      
  1095. -- no action
  1096.      
  1097.      |   NULL
  1098.      
  1099. -- no action
  1100.      
  1101.      |   name
  1102.      
  1103. -- no action
  1104.      
  1105.      |   allocator
  1106.      
  1107. -- no action
  1108.      
  1109.      |   qualified_expression
  1110.      
  1111. -- no action
  1112.      
  1113.      |   aggregate
  1114.      
  1115. -- no action
  1116.      
  1117.      |   parenthesized_expression
  1118.      
  1119. -- no action
  1120.      
  1121.  relational_operator   ::=
  1122.          =
  1123.      
  1124. -- no action
  1125.      
  1126.      |   /=
  1127.      
  1128. -- no action
  1129.      |   <
  1130.      
  1131. -- no action
  1132.      |   <=
  1133.      
  1134. -- no action
  1135.      |   >
  1136.      
  1137. -- no action
  1138.      
  1139.      |   >=
  1140.      
  1141. -- no action
  1142.      
  1143.  binary_adding_operator   ::=
  1144.          +
  1145.      
  1146. /. %action %start_case_expression ./
  1147.      
  1148.      |   -
  1149.      
  1150. /. %action %end_case_expression
  1151.         Put_Space;
  1152. ./
  1153.      
  1154.      |   &
  1155.      
  1156. -- no action
  1157.      
  1158.  unary_adding_operator   ::=
  1159.          +
  1160.      
  1161. -- no action
  1162.      
  1163.      |   -
  1164.      
  1165. -- no action
  1166.      
  1167.  high_precedence_unary_operator   ::=
  1168.          ABS
  1169.      
  1170. -- no action
  1171.      
  1172.      |   NOT
  1173.      
  1174. -- no action
  1175.      
  1176.  multiplying_operator   ::=
  1177.          *
  1178.      
  1179. -- no action
  1180.      
  1181.      |   /
  1182.      
  1183. -- no action
  1184.      
  1185.      |   MOD
  1186.      
  1187. -- no action
  1188.      
  1189.      |   REM
  1190.      
  1191. -- no action
  1192.      
  1193.  exponentiating_operator   ::=
  1194.          **
  1195.      
  1196. -- no action
  1197.      
  1198. -- LRM 4.7
  1199.      
  1200.  qualified_expression   ::=
  1201.          name ' aggregate
  1202.      
  1203. -- no action
  1204.      
  1205.      |   name ' parenthesized_expression
  1206.      
  1207. -- no action
  1208.  
  1209.      
  1210. -- LRM 4.8
  1211.      
  1212.  allocator   ::=
  1213.          NEW type_mark
  1214.      
  1215. -- no action
  1216.      
  1217.      |   NEW type_mark ( general_component_associations )
  1218.      
  1219. -- no action
  1220.      
  1221.      |   NEW expanded_name ' parenthesized_expression
  1222.      
  1223. -- no action
  1224.      
  1225.      |   NEW expanded_name ' aggregate
  1226.      
  1227. -- no action
  1228.      
  1229. -- LRM 5.1
  1230.      
  1231.  sequence_of_statements   ::=
  1232.          {pragma_stm} statement {statement}
  1233.      
  1234. /. %action %case_expression
  1235.         Decrease_Indent;
  1236. ./
  1237.      
  1238.  statement   ::=
  1239.          simple_statement
  1240.      
  1241. -- no action
  1242.      
  1243.      |   compound_statement
  1244.  
  1245. -- no action
  1246.  
  1247.      
  1248.      |   {label}+ simple_statement
  1249.      
  1250. -- no action
  1251.      
  1252.      |   {label}+ compound_statement
  1253.      
  1254. -- no action
  1255.  
  1256.  
  1257.  simple_statement   ::=
  1258. --sd     null_statement
  1259.          break_point null_statement
  1260.  
  1261. -- no action
  1262.      
  1263. --sd |   assignment_statement
  1264.      |   break_point assignment_statement
  1265.  
  1266. /. %action %start_case_expression ./
  1267.      
  1268. --sd |   exit_statement
  1269.      |   break_point exit_statement
  1270.  
  1271. /. %action %continue_case_expression ./
  1272.      
  1273. --sd |   return_statement
  1274.      |   break_return return_statement
  1275.      
  1276. /. %action %continue_case_expression ./
  1277.      
  1278. --sd |   goto_statement
  1279.      |   break_point goto_statement
  1280.      
  1281. /. %action %continue_case_expression ./
  1282.      
  1283. --sd |   delay_statement
  1284.      |   break_point delay_statement
  1285.      
  1286. -- no action
  1287.  
  1288. --sd |   abort_statement
  1289.      |   break_point abort_statement
  1290.      
  1291. /. %action %continue_case_expression ./
  1292.      
  1293. --sd |   raise_statement
  1294.      |   break_point raise_statement
  1295.      
  1296. /. %action %continue_case_expression ./
  1297.      
  1298. --sd |   code_statement
  1299.      |   break_point code_statement
  1300.  
  1301. /. %action %continue_case_expression ./
  1302.  
  1303. --sd |   call_statement
  1304.      |   break_point call_statement
  1305.  
  1306. -- no action
  1307.      
  1308.  compound_statement   ::=
  1309. --sd     if_statement
  1310.          break_point if_statement
  1311.      
  1312. /. %action %continue_case_expression ./
  1313.  
  1314. --sd |   case_statement     
  1315.      |   break_point case_statement
  1316.      
  1317. /. %action %continue_case_expression ./
  1318.      
  1319. --sd |   loop_statement
  1320.      |   break_point loop_statement
  1321.  
  1322. /. %action %continue_case_expression ./
  1323.      
  1324. --sd |   block_statement
  1325.      |   break_point block_statement
  1326.  
  1327. /. %action %continue_case_expression ./
  1328.  
  1329. --sd |   accept_statement
  1330.      |   break_point accept_statement
  1331.      
  1332. -- no action
  1333.  
  1334. --sd |   select_statement
  1335.      |   break_point select_statement
  1336.      
  1337. /. %action %end_case_expression
  1338.         New_Line;
  1339. ./
  1340.  
  1341. --sd
  1342.  break_point ::=
  1343.          empty
  1344.  
  1345. /. %action %case_expression
  1346.         Add_Breakpoint;
  1347. ./
  1348.  
  1349.  
  1350. --sd
  1351.  break_return ::=
  1352.          empty
  1353.  
  1354. /. %action %case_expression
  1355.         Start_Return_Statement;
  1356. ./
  1357.  
  1358.  
  1359.  label   ::=
  1360.          << identifier >>
  1361.      
  1362. -- no action
  1363.      
  1364.  null_statement   ::=
  1365.          NULL ;
  1366.      
  1367. /. %action %case_expression
  1368.         New_Line;
  1369. ./
  1370.  
  1371.      
  1372. -- LRM 5.2
  1373.      
  1374.  assignment_statement   ::=
  1375.          name := expression ;
  1376.      
  1377. -- no action
  1378.      
  1379. -- LRM 5.3
  1380.      
  1381.  if_statement   ::=
  1382. --c      IF condition_THEN__sequence_of_statements
  1383. --c      {ELSIF__condition__THEN__sequence_of_statements}
  1384. --c      [ELSE__sequence_of_statements] END IF ;
  1385.      
  1386.          IF condition__THEN__sequence_of_statements
  1387.          {ELSIF__condition__THEN__sequence_of_statements}
  1388.          [ELSE__sequence_of_statements] END IF ;
  1389.      
  1390. -- no action
  1391.      
  1392.  condition   ::=
  1393.          expression
  1394.      
  1395. -- no action
  1396.      
  1397. -- LRM 5.4
  1398.      
  1399.  case_statement   ::=
  1400. --c      CASE expression IS
  1401. --c      {pragma_alt} case_statement_alternative
  1402. --c      {case_statement_alternative} END CASE ;
  1403.      
  1404.          CASE__expression__IS
  1405.          {pragma_alt}__case_statement_alternative__{case_statement_alternative}
  1406.          END CASE ;
  1407.      
  1408. -- no action
  1409.      
  1410.  case_statement_alternative   ::=
  1411. --c      WHEN choice {|choice} => sequence_of_statements
  1412. --s      WHEN__choice__{|choice}__=> sequence_of_statements
  1413.    
  1414.          WHEN__case_choice__{|choice}__=> sequence_of_statements
  1415.      
  1416. -- no action
  1417.      
  1418. --c  |   WHEN OTHERS => sequence_of_statements
  1419. --s  |   WHEN__OTHERS__=> sequence_of_statements
  1420.  
  1421.      |   WHEN__case_OTHERS__=> sequence_of_statements
  1422.      
  1423. -- no action
  1424.      
  1425. -- LRM 5.5
  1426.      
  1427. -- no action
  1428.      
  1429.      
  1430.  loop_statement   ::=
  1431. --c      [loop_identifier:] LOOP sequence_of_statements
  1432. --c         END LOOP [identifier] ;
  1433.      
  1434.          [loop_identifier:] loop_terminal sequence_of_statements
  1435.             END LOOP [identifier] ;
  1436.      
  1437. -- no action
  1438.  
  1439. --sd     
  1440. --c  |   [loop_identifier:] iteration_rule
  1441. --c         LOOP sequence_of_statements END LOOP [identifier] ;
  1442.      
  1443.  
  1444.      |   [loop_identifier:] 
  1445.             FOR loop_parameter IN discrete_range
  1446.             loop_terminal sequence_of_statements
  1447.             END LOOP [identifier] ;
  1448.  
  1449. /. %action %start_case_expression ./
  1450.  
  1451.      |   [loop_identifier:]
  1452.             FOR loop_parameter IN REVERSE discrete_range
  1453.             loop_terminal sequence_of_statements
  1454.             END LOOP [identifier] ;
  1455.  
  1456. /. %action %end_case_expression
  1457.         End_For_Loop;
  1458. ./     
  1459.  
  1460.      |   [loop_identifier:] WHILE condition
  1461.             loop_terminal sequence_of_statements
  1462.             END LOOP [identifier] ;
  1463.  
  1464. -- no action     
  1465.  
  1466. --sd
  1467.  loop_parameter  ::=
  1468.           identifier
  1469.  
  1470. /. %action %case_expression
  1471.          Save_Loop_Parameter;
  1472. ./
  1473.  
  1474. --sd iteration_rule  ::=
  1475. --sd         WHILE condition
  1476.  
  1477. -- no action
  1478.  
  1479. --sd |       FOR loop_parameter IN discrete_range
  1480.  
  1481. -- no action
  1482.  
  1483. --sd |       FOR loop_parameter IN REVERSE discrete_range
  1484.  
  1485. -- no action
  1486.  
  1487. -- LRM 5.6
  1488.      
  1489.  declarative_part__begin_end_block   ::=
  1490.          declarative_part begin_end_block
  1491.      
  1492. -- no action
  1493.      
  1494.  begin_end_block   ::=
  1495. --c      BEGIN sequence_of_statements END
  1496. --s      begin_terminal sequence_of_statements END
  1497.      
  1498. --c  |   BEGIN sequence_of_statements
  1499. --c      EXCEPTION {pragma_alt}__exception_handler_list END
  1500.      
  1501. --s  |   begin_terminal sequence_of_statements exception_terminal
  1502. --s      {pragma_alt}__exception_handler_list END
  1503.    
  1504.          begin_terminal sequence_of_statements__end_block_statements
  1505.          [exception_handler_part] END
  1506.   
  1507. -- no action
  1508.  
  1509. --s
  1510.  sequence_of_statements__end_block_statements  ::=
  1511.          sequence_of_statements
  1512.  
  1513. /. %action %case_expression
  1514.         End_Block_Sequence_of_Statements;
  1515. ./
  1516.      
  1517.  block_statement   ::=
  1518. --c      [block_identifier:] DECLARE
  1519. --c         declarative_part__begin_end_block [identifier] ;
  1520.      
  1521.          [block_identifier:] declare_terminal
  1522.             declarative_part__begin_end_block [identifier] ;
  1523.      
  1524. /. %action %start_case_expression ./
  1525.      
  1526.      |   [block_identifier:] begin_end_block [identifier] ;
  1527.      
  1528. /. %action %end_case_expression
  1529.         End_Block_Statement;
  1530. ./
  1531.      
  1532. -- LRM 5.7
  1533.      
  1534.  exit_statement   ::=
  1535.          EXIT ;
  1536.      
  1537. -- no action
  1538.      
  1539.      |   EXIT WHEN condition ;
  1540.      
  1541. -- no action
  1542.      
  1543.      |   EXIT expanded_name ;
  1544.      
  1545. -- no action
  1546.      
  1547.      |   EXIT expanded_name WHEN condition ;
  1548.      
  1549. -- no action
  1550.      
  1551. -- LRM 5.8
  1552.      
  1553.  return_statement   ::=
  1554.          RETURN ;
  1555.      
  1556. -- no action
  1557.      
  1558.      |   RETURN expression ;
  1559.      
  1560. -- no action
  1561.      
  1562. -- LRM 5.9
  1563.      
  1564.  goto_statement   ::=
  1565.          GOTO expanded_name ;
  1566.      
  1567. -- no action
  1568.      
  1569. -- LRM 6.1
  1570.      
  1571.  subprogram_declaration   ::=
  1572.          subprogram_specification ;
  1573.      
  1574. /. %action %case_expression
  1575.         Pop_Identifier;
  1576. ./
  1577.      
  1578.  subprogram_specification   ::=
  1579. --c      PROCEDURE identifier
  1580.      
  1581.          PROCEDURE start_identifier
  1582.      
  1583. /. %action %start_case_expression ./
  1584.      
  1585. --c  |   PROCEDURE identifier (
  1586. --c         parameter_specification {;parameter_specification} )
  1587.      
  1588.      |   PROCEDURE start_identifier left_paren
  1589.             parameter_specification {;parameter_specification} 
  1590.             right_paren
  1591.      
  1592. /. %action %end_case_expression 
  1593.         Subprogram_Type ("procedure");
  1594. ./
  1595.      
  1596.      |   FUNCTION designator RETURN type_mark
  1597.      
  1598. /. %action %start_case_expression ./
  1599.      
  1600. --c  |   FUNCTION designator (
  1601. --c         parameter_specification {;parameter_specification}
  1602. --c         ) RETURN type_mark
  1603.      
  1604.      |   FUNCTION designator left_paren
  1605.             parameter_specification {;parameter_specification}
  1606.             right_paren RETURN type_mark
  1607.      
  1608. /. %action %end_case_expression
  1609.         Subprogram_Type ("function");
  1610. ./
  1611.      
  1612.  designator   ::=
  1613.          identifier
  1614.      
  1615. /. %action %start_case_expression ./
  1616.      
  1617.      |   string_literal
  1618.      
  1619. /. %action %end_case_expression
  1620.         Push_Identifier;
  1621. ./
  1622.      
  1623.  parameter_specification   ::=
  1624.          identifier_list mode type_mark [:=expression]
  1625.      
  1626. /. %action %case_expression
  1627.         Process_Identifier_List (Parameter_List);
  1628. ./
  1629.  
  1630.  mode   ::=
  1631.          generic_parameter_mode
  1632.      
  1633. -- no action
  1634.      
  1635.      |   : OUT
  1636.      
  1637. /. %action %case_expression
  1638.         Set_Identifier_Mode (Write_Only);
  1639. ./
  1640.      
  1641.  generic_parameter_mode   ::=
  1642.          :
  1643.      
  1644. /. %action %case_expression
  1645.         Set_Identifier_Mode (Read_Only);
  1646. ./
  1647.      
  1648.      |   : IN
  1649.      
  1650. /. %action %case_expression
  1651.         Set_Identifier_Mode (Read_Only);
  1652. ./
  1653.      
  1654.      |  : IN OUT
  1655.      
  1656. /. %action %case_expression
  1657.         Set_Identifier_Mode (Read_Write);
  1658. ./
  1659.      
  1660. -- LRM 6.3
  1661.      
  1662.  subprogram_body   ::=
  1663. --c      subprogram_specification IS
  1664. --c      declarative_part__begin_end_block
  1665. --c      [end_designator] ;
  1666.      
  1667.          subprogram_specification__IS
  1668.          declarative_part__begin_end_block
  1669.          [end_designator] ;
  1670.      
  1671. /. %action %case_expression
  1672.         Decrement_Scope;
  1673. ./
  1674.      
  1675. -- LRM 6.4
  1676.      
  1677.  call_statement   ::=
  1678.          name ;
  1679.      
  1680. /. %action %case_expression
  1681.         New_Line;
  1682. ./
  1683.      
  1684. -- LRM 7.1
  1685.      
  1686.      
  1687.  package_declaration   ::=
  1688.          package_specification ;
  1689.      
  1690. /. %action %case_expression
  1691.         Decrement_Scope;
  1692. ./
  1693.      
  1694.  package_specification   ::=
  1695. --c      PACKAGE identifier IS {basic_declarative_item}
  1696. --c         END [identifier]
  1697.      
  1698.          PACKAGE__start_identifier__IS {basic_declarative_item}'
  1699.             END [identifier]
  1700.      
  1701. -- no action
  1702.      
  1703. --c  |   PACKAGE identifier IS {basic_declarative_item}
  1704. --c         PRIVATE {basic_declarative_item} END [identifier]
  1705.      
  1706.      |   PACKAGE__start_identifier__IS {basic_declarative_item}'
  1707.             private_terminal {basic_declarative_item}'
  1708.             END [identifier]
  1709.      
  1710. -- no action
  1711.      
  1712.  package_body   ::=
  1713. --c      PACKAGE BODY identifier IS declarative_part
  1714. --c         END [identifier] ;
  1715.      
  1716.          PACKAGE__BODY__start_identifier__IS 
  1717. --s      declarative_part END [identifier] ;
  1718.          declarative_part__no_begin END [identifier] ;
  1719.      
  1720. /. %action %start_case_expression ./
  1721.      
  1722. --c  |   PACKAGE BODY identifier IS
  1723. --c      declarative_part__begin_end_block
  1724. --c      [identifier] ;
  1725.      
  1726.      |   PACKAGE__BODY__start_identifier__IS
  1727.          declarative_part__begin_end_block
  1728.          [identifier] ;
  1729.      
  1730. /. %action %end_case_expression
  1731.         Decrement_Scope;
  1732. ./
  1733.   
  1734. --s
  1735.  declarative_part__no_begin  ::=
  1736.          declarative_part
  1737.  
  1738. /. %action %case_expression
  1739.         Add_Package_Body_Begin;
  1740. ./
  1741.    
  1742. -- LRM 7.4
  1743.      
  1744.  private_type_declaration   ::=
  1745. --sd     TYPE identifier IS LIMITED PRIVATE ;
  1746.          TYPE type_identifier IS LIMITED PRIVATE ;
  1747.      
  1748. /. %action %case_expression
  1749.         Save_Type_Class (Limited_Private_Type);
  1750. ./
  1751.  
  1752.      
  1753. --c  |   TYPE identifier ( discriminant_specification
  1754. --c         {;discriminant_specification} ) IS LIMITED PRIVATE ;
  1755.  
  1756. --sd |   TYPE identifier left_paren discriminant_specification
  1757. --sd        {;discriminant_specification} right_paren IS LIMITED PRIVATE ;
  1758.      
  1759.      |   TYPE type_identifier left_paren discriminant_specification
  1760.             {;discriminant_specification} right_paren IS LIMITED PRIVATE ;
  1761.      
  1762. /. %action %case_expression
  1763.         Save_Type_Class (Limited_Private_Type);
  1764. ./
  1765.      
  1766. --sd |   TYPE identifier IS PRIVATE ;
  1767.      |   TYPE type_identifier IS PRIVATE ;
  1768.      
  1769. /. %action %case_expression
  1770.         Save_Type_Class (Private_Type);
  1771. ./
  1772.      
  1773. --c  |   TYPE identifier ( discriminant_specification
  1774. --c         {;discriminant_specification} ) IS PRIVATE ;
  1775.      
  1776. --sd |   TYPE identifier left_paren discriminant_specification
  1777. --sd        {;discriminant_specification} right_paren IS PRIVATE ;
  1778.      
  1779.      |   TYPE type_identifier left_paren discriminant_specification
  1780.             {;discriminant_specification} right_paren IS PRIVATE ;
  1781.      
  1782. /. %action %case_expression
  1783.         Save_Type_Class (Private_Type);
  1784. ./
  1785.  
  1786. -- LRM 8.4
  1787.      
  1788.  use_clause   ::=
  1789. --s      USE expanded_name {,expanded_name} ;
  1790.          USE package_name {,package_name} ;
  1791.      
  1792. -- no action
  1793.  
  1794. --s
  1795.  package_name  ::=
  1796.          start_expanded_name expanded_name
  1797.  
  1798. /. %action %case_expression
  1799.         Use_Package_Name;
  1800. ./
  1801.      
  1802. -- LRM 8.5
  1803.      
  1804. --? Ada syntax allows only one identifier in the identifier list
  1805.  
  1806. --c     
  1807.  renaming_colon_declaration   ::=
  1808.          identifier_list : type_mark RENAMES name ;
  1809.  
  1810. /. %action %start_case_expression ./
  1811.      
  1812. --? Ada syntax allows only one identifier in the identifier list
  1813.      
  1814.      |   identifier_list : EXCEPTION RENAMES expanded_name ;
  1815.      
  1816. /. %action %end_case_expression
  1817.         Process_Identifier_List (Renaming_List);
  1818. ./
  1819.  
  1820.      
  1821.  renaming_declaration   ::=
  1822. --c      identifier_list : type_mark RENAMES name ;
  1823.  
  1824. --c  |   identifier_list : EXCEPTION RENAMES expanded_name ;
  1825.      
  1826. --c      PACKAGE identifier RENAMES expanded_name ;
  1827.      
  1828.          PACKAGE start_identifier RENAMES expanded_name ;
  1829.      
  1830. /. %action %start_case_expression ./
  1831.      
  1832.      |   subprogram_specification RENAMES name ;
  1833.      
  1834. /. %action %continue_case_expression ./
  1835.  
  1836. -- LRM 9.1
  1837.      
  1838.  task_specification   ::=
  1839. --c      TASK identifier
  1840.      
  1841.          TASK start_identifier ;
  1842.      
  1843. /. %action %end_case_expression
  1844.         Pop_Identifier;
  1845. ./
  1846.      
  1847. --c  |   TASK TYPE identifier
  1848.      
  1849.      |   TASK TYPE start_identifier ;
  1850.      
  1851. /. %action %case_expression
  1852.         Pop_Identifier;
  1853.         Save_Type_Class (Task_Type);
  1854.         End_Type_Declaration;
  1855. ./
  1856.      
  1857. --c  |   TASK identifier IS
  1858. --c         {entry_declaration} {representation_clause}
  1859. --c         END [identifier]
  1860.      
  1861.      |   TASK__start_identifier__IS
  1862.             {entry_declaration}__{representation_clause}
  1863.             END [identifier] ;
  1864.      
  1865. -- no action
  1866.      
  1867. --c  |   TASK TYPE identifier IS
  1868. --c         {entry_declaration} {representation_clause}
  1869. --c         END [identifier]
  1870.      
  1871.      |   TASK__TYPE__start_identifier__IS
  1872.             {entry_declaration}__{representation_clause}
  1873.             END [identifier] ;
  1874.      
  1875. /. %action %case_expression
  1876.         End_Type_Declaration;
  1877. ./
  1878.  
  1879.      
  1880.  task_body   ::=
  1881. --c      TASK BODY identifier IS
  1882. --c      declarative_part__begin_end_block
  1883. --c      [identifier] ;
  1884.      
  1885.          TASK__BODY__start_identifier__IS
  1886.          declarative_part__begin_end_block
  1887.          [identifier] ;
  1888.      
  1889. /. %action %case_expression
  1890.         Decrement_Scope;
  1891. ./
  1892.      
  1893. -- LRM 9.5
  1894.      
  1895.  entry_declaration   ::=
  1896.          ENTRY identifier [(discrete_range)][formal_part] ;
  1897.      
  1898. /. %action %case_expression
  1899.         New_Line;
  1900. ./
  1901.      
  1902.  accept_statement   ::=
  1903. --c      ACCEPT identifier [(expression)][formal_part] ;
  1904.      
  1905.          ACCEPT start_identifier [(expression)][formal_part] ;
  1906.      
  1907. /. %action %case_expression
  1908.         Pop_Identifier;
  1909.         New_Line;
  1910. ./
  1911.      
  1912. --c  |   ACCEPT identifier [(expression)][formal_part] DO
  1913. --c         sequence_of_statements END [identifier] ;
  1914.      
  1915. --sd  |   ACCEPT__start_identifier__[(expression)][formal_part]__DO
  1916. --sd        sequence_of_statements END [identifier] ;
  1917.  
  1918.      |   ACCEPT__start_identifier__[(expression)][formal_part]__DO
  1919.             do_sequence_of_statements END [identifier] ;
  1920.      
  1921. /. %action %case_expression
  1922.         New_Line;
  1923. ./     
  1924.  
  1925. --sd
  1926.  do_sequence_of_statements  ::=
  1927.           sequence_of_statements
  1928.  
  1929. /. %action %case_expression
  1930.         End_Do_Sequence_Of_Statements;
  1931. ./
  1932.  
  1933. -- LRM 9.6
  1934.      
  1935.  delay_statement   ::=
  1936.       DELAY simple_expression ;
  1937.  
  1938. /. %action %case_expression
  1939.         New_Line;
  1940. ./
  1941.   
  1942.    
  1943. -- LRM 9.7
  1944.      
  1945.  select_statement   ::=
  1946.          selective_wait
  1947.      
  1948. -- no action
  1949.      
  1950.      |   conditional_entry_call
  1951.      
  1952. -- no action
  1953.      
  1954.      |   timed_entry_call
  1955.      
  1956. -- no action
  1957.      
  1958. -- LRM 9.7.1
  1959.      
  1960.  selective_wait   ::=
  1961. --c      SELECT select_alternative {OR__select_alternative}
  1962. --c         [ELSE__sequence_of_statements] END SELECT ;
  1963.      
  1964.       select_terminal select_alternative {OR__select_alternative}
  1965.          [ELSE__sequence_of_statements] END SELECT ;
  1966.      
  1967. -- no action
  1968.      
  1969.  select_alternative   ::=
  1970. --c      {pragma_stm} WHEN condition => selective_wait_alternative
  1971.      
  1972.          {pragma_stm} WHEN__condition__=>__selective_wait_alternative
  1973.      
  1974. /. %action %start_case_expression ./
  1975.      
  1976.      |   {pragma_stm} selective_wait_alternative
  1977.      
  1978. /. %action %end_case_expression
  1979.         Decrease_Indent;
  1980. ./
  1981.      
  1982.  selective_wait_alternative   ::=
  1983.          accept_alternative
  1984.      
  1985. -- no action
  1986.      
  1987.      |   delay_alternative
  1988.      
  1989. -- no action
  1990.      
  1991.      |   terminate_alternative
  1992.      
  1993. -- no action
  1994.      
  1995.  accept_alternative   ::=
  1996. --s      accept_statement [sequence_of_statements]
  1997.          accept_statement__decision_point [sequence_of_statements]
  1998.      
  1999. -- no action
  2000.      
  2001.  delay_alternative   ::=
  2002. --s      delay_statement [sequence_of_statements]
  2003.          delay_statement__decision_point [sequence_of_statements]
  2004.      
  2005. -- no action
  2006.      
  2007.  terminate_alternative   ::=
  2008. --c      TERMINATE ; {pragma_stm}
  2009.      
  2010.          TERMINATE__; {pragma_stm}
  2011.      
  2012. -- no action
  2013.      
  2014. --c
  2015.  TERMINATE__;   ::=
  2016.          TERMINATE ;
  2017.      
  2018. /. %action %case_expression
  2019.         New_Line;
  2020. ./
  2021.      
  2022. -- LRM 9.7.2
  2023.      
  2024.  conditional_entry_call   ::=
  2025. --c      SELECT {pragma_stm} call_statement [sequence_of_statements]
  2026. --c         ELSE sequence_of_statements END SELECT ;
  2027.      
  2028.          select_terminal {pragma_stm}
  2029.             call_statement__[sequence_of_statements] else_terminal
  2030.             sequence_of_statements END SELECT ;
  2031.      
  2032. -- no action
  2033.      
  2034. -- LRM 9.7.3
  2035.      
  2036.  timed_entry_call   ::=
  2037. --c      SELECT {pragma_stm} call_statement [sequence_of_statements]
  2038. --c         OR {pragma_stm} delay_alternative END SELECT ;
  2039.      
  2040.          select_terminal {pragma_stm}
  2041.             call_statement__[sequence_of_statements] or_terminal
  2042.             {pragma_stm} delay_alternative_in_timed_entry
  2043.             END SELECT ;
  2044.      
  2045. -- no action
  2046.  
  2047. --s
  2048.  accept_statement__decision_point  ::=
  2049.          accept_statement
  2050.  
  2051. /. %action %start_case_expression ./
  2052.  
  2053. --s
  2054.  delay_statement__decision_point  ::=
  2055.          delay_statement
  2056.  
  2057. /. %action %continue_case_expression ./
  2058.  
  2059. --s
  2060. -- note: this is called by "call_statement__sqs" in rules added
  2061. -- to implement pretty printer actions
  2062.  
  2063.  call_statement__decision_point  ::=
  2064.          call_statement
  2065.  
  2066. /. %action %end_case_expression
  2067.         Add_Breakpoint;
  2068. ./
  2069.      
  2070. -- LRM 9.10
  2071.      
  2072.  abort_statement   ::=
  2073.          ABORT name {,name} ;
  2074.      
  2075. -- no action
  2076.      
  2077. -- LRM 10.1
  2078.      
  2079.  compilation   ::=
  2080.          {compilation_unit}
  2081.  
  2082. -- no action
  2083.      
  2084.  pragma_header   ::=
  2085.          PRAGMA identifier
  2086.      
  2087. -- no action
  2088.      
  2089.  compilation_unit   ::=
  2090.          pragma_header ( general_component_associations ) ;
  2091.      
  2092. /. %action %start_case_expression ./
  2093.      
  2094.      |   pragma_header ;
  2095.      
  2096. /. %action %end_case_expression 
  2097.         New_Line;
  2098. ./
  2099.      
  2100.      |   context_clause library_or_secondary_unit
  2101.      
  2102. /. %action %case_expression
  2103.         End_Compilation_Unit;
  2104. ./
  2105.      
  2106.  library_or_secondary_unit   ::=
  2107.          subprogram_declaration
  2108.      
  2109. -- no action
  2110.      
  2111.      |   package_declaration
  2112.      
  2113. -- no action
  2114.      
  2115.      |   generic_specification
  2116.      
  2117. -- no action
  2118.      
  2119.      |   generic_instantiation
  2120.      
  2121. -- no action
  2122.      
  2123.      |   subprogram_body
  2124.      
  2125. -- no action
  2126. --sd /. %action %start_case_expression ./
  2127.      
  2128.      |   package_body
  2129.      
  2130. -- no action
  2131. --sd /. %action %end_case_expression
  2132. --sd        Switch_Comment_Context;
  2133. --sd./
  2134.      
  2135.      |   subunit
  2136.      
  2137. -- no action
  2138.      
  2139. -- LRM 10.1.1
  2140.      
  2141.  context_clause   ::=
  2142.          {with_clause{use_clause}}
  2143.      
  2144. -- no action
  2145.  
  2146.  with_clause   ::=
  2147. --s      WITH identifier {,used_identifier} ;
  2148.          WITH library_unit_name {,library_unit_name} ;
  2149.      
  2150. -- no action
  2151.      
  2152. --s
  2153.  library_unit_name  ::=
  2154.          identifier
  2155.  
  2156. /. %action %case_expression
  2157.         With_Library_Unit;
  2158. ./
  2159.  
  2160. -- LRM 10.2
  2161.      
  2162.  body_stub   ::=
  2163.          subprogram_specification IS SEPARATE ;
  2164.      
  2165. /. %action %start_case_expression ./
  2166.      
  2167. --c  |   PACKAGE BODY identifier IS SEPARATE ;
  2168.      
  2169.      |   PACKAGE BODY start_identifier IS SEPARATE ;
  2170.      
  2171. /. %action %continue_case_expression ./
  2172.      
  2173. --c  |   TASK BODY identifier IS SEPARATE  ;
  2174.      
  2175.      |   TASK BODY start_identifier IS SEPARATE  ;
  2176.      
  2177. /. %action %end_case_expression
  2178.         Pop_Identifier;
  2179. ./
  2180.      
  2181.  subunit   ::=
  2182. --c      SEPARATE ( expanded_name ) proper_body
  2183.          SEPARATE__(__expanded_name__) proper_body
  2184.      
  2185. -- no action
  2186.      
  2187. -- LRM 11.1
  2188.      
  2189.  exception_declaration   ::=
  2190.          identifier_list : EXCEPTION ;
  2191.  
  2192. /. %action %case_expression
  2193.         Process_Identifier_List (Exception_List);
  2194. ./
  2195.  
  2196.      
  2197. -- no action
  2198.      
  2199. -- LRM 11.2
  2200.      
  2201.  exception_handler   ::=
  2202. --c      WHEN exception_choice {|exception_choice} =>
  2203. --c         sequence_of_statements
  2204. --s      WHEN__exception_choice__{|exception_choice}__=>
  2205. --s         sequence_of_statements
  2206.  
  2207.          {non_others_handler} [others_handler]
  2208.      
  2209. -- no action
  2210.  
  2211.      |    others_handler
  2212.  
  2213. -- no action
  2214.  
  2215. --s
  2216.  non_others_handler  ::=
  2217.          WHEN__exception_choice__{|exception_choice}__=>
  2218.          sequence_of_statements
  2219.  
  2220. /. %action %start_case_expression ./
  2221.  
  2222. --s
  2223.  others_handler  ::=
  2224.          WHEN__exception_OTHERS__=> sequence_of_statements        
  2225.      
  2226. /. %action %end_case_expression
  2227.         End_Exception_Sequence_of_Statements;
  2228. ./
  2229.  
  2230.  exception_choice   ::=
  2231.          expanded_name
  2232.      
  2233. -- no action
  2234.      
  2235. --s  |   OTHERS
  2236.      
  2237.      
  2238. -- LRM 11.3
  2239.      
  2240.  raise_statement   ::=
  2241.          RAISE ;
  2242.      
  2243. -- no action
  2244.      
  2245.      |   RAISE expanded_name ;
  2246.      
  2247. -- no action
  2248.      
  2249. -- LRM 12.1
  2250.      
  2251.  generic_specification   ::=
  2252.          generic_formal_part subprogram_specification ;
  2253.      
  2254. /. %action %case_expression
  2255.         Pop_Identifier;
  2256. ./
  2257.      
  2258.      |   generic_formal_part package_specification ;
  2259.      
  2260. /. %action %case_expression
  2261.         Decrement_Scope;
  2262. ./
  2263.      
  2264.  generic_formal_part   ::=
  2265. --c      GENERIC {generic_parameter_declaration}
  2266.      
  2267.          generic_terminal {generic_parameter_declaration}
  2268.      
  2269. /. %action %case_expression
  2270.         Decrease_Indent;
  2271.         End_Generic_Specification;
  2272. ./
  2273.      
  2274.  generic_parameter_declaration   ::=
  2275.          identifier_list generic_parameter_mode type_mark
  2276.             [:=expression] ;
  2277.      
  2278. /. %action %case_expression 
  2279.         New_Line;
  2280.         Process_Identifier_List (Generic_Object_List);
  2281. ./
  2282.      
  2283. --c     |   TYPE identifier IS generic_type_definition ;
  2284.  
  2285. --sd
  2286.         |   TYPE generic_type_identifier IS generic_type_definition ;
  2287.      
  2288. /. %action %start_case_expression ./
  2289.      
  2290. --c  |   TYPE identifier ( discriminant_specification
  2291. --c         {;discriminant_specification} ) IS
  2292. --c         generic_type_definition ;
  2293.      
  2294. --sd    |   TYPE identifier left_paren discriminant_specification
  2295. --sd           {;discriminant_specification} right_paren IS
  2296. --sd           generic_type_definition ;
  2297.      
  2298.      |   TYPE generic_type_identifier left_paren discriminant_specification
  2299.             {;discriminant_specification} right_paren IS
  2300.             generic_type_definition ;
  2301.      
  2302. /. %action %end_case_expression 
  2303.         New_Line;
  2304.         End_Generic_Type;
  2305. ./
  2306.  
  2307.      |   WITH subprogram_specification [IS__name__or__<>] ;
  2308.  
  2309. /. %action %case_expression
  2310.         New_Line;
  2311.         Pop_Identifier;
  2312. ./
  2313.      
  2314. --sd
  2315. generic_type_identifier ::=
  2316.       identifier
  2317.  
  2318. /. %action %case_expression
  2319.       Save_Type_Identifier;
  2320. ./     
  2321.  
  2322.  generic_type_definition   ::=
  2323.          ( <> )
  2324.      
  2325. -- no action
  2326.      
  2327.      
  2328.      |   RANGE <>
  2329.      
  2330. -- no action
  2331.      
  2332.      |   DIGITS <>
  2333.      
  2334. -- no action
  2335.      
  2336.      |   DELTA <>
  2337.      
  2338. -- no action
  2339.      
  2340.      |   LIMITED PRIVATE
  2341.      
  2342. -- no action
  2343.      
  2344.      |   PRIVATE
  2345.      
  2346. -- no action
  2347.      
  2348.      |   array_type_definition
  2349.      
  2350. -- no action
  2351.      
  2352.      |   access_type_definition
  2353.      
  2354. -- no action
  2355.      
  2356. -- LRM 12.3
  2357.      
  2358.  generic_instantiation   ::=
  2359. --c      PACKAGE identifier IS NEW expanded_name ;
  2360. --s      PACKAGE__start_identifier__IS NEW expanded_name ;
  2361.  
  2362.          PACKAGE start_identifier IS__NEW__expanded_name ;
  2363.      
  2364. /. %action %start_case_expression ./
  2365.      
  2366. --c  |   PACKAGE identifier IS NEW expanded_name
  2367. --c         ( generic_association {,generic_association} ) ;
  2368. --s  |   PACKAGE__start_identifier__IS NEW expanded_name
  2369.  
  2370.      |   PACKAGE start_identifier IS__NEW__expanded_name
  2371.             ( generic_association {,generic_association} ) ;
  2372.      
  2373. /. %action %continue_case_expression ./
  2374.      
  2375. --c  |   FUNCTION designator IS NEW expanded_name ;
  2376. --s  |   FUNCTION__designator__IS NEW expanded_name ;
  2377.  
  2378.      |   FUNCTION designator IS__NEW__expanded_name ;
  2379.      
  2380. /. %action %continue_case_expression ./
  2381.      
  2382. --c  |   FUNCTION designator IS NEW expanded_name
  2383. --c         ( generic_association {,generic_association} ) ;
  2384. --s  |   FUNCTION__designator__IS NEW expanded_name
  2385. --s         ( generic_association {,generic_association} ) ;
  2386.  
  2387.      |   FUNCTION designator IS__NEW__expanded_name
  2388.             ( generic_association {,generic_association} ) ;
  2389.      
  2390. /. %action %continue_case_expression ./
  2391.  
  2392.      
  2393. --c  |   subprogram_specification IS NEW expanded_name ;
  2394. --s  |   subprogram_specification__IS NEW expanded_name ;
  2395.  
  2396.      |   subprogram_specification IS__NEW__expanded_name ;
  2397.  
  2398. /. %action %continue_case_expression ./
  2399.      
  2400. --c  |   subprogram_specification IS NEW expanded_name
  2401. --c         ( generic_association {,generic_association} ) ;
  2402. --s  |   subprogram_specification__IS NEW expanded_name
  2403. --s         ( generic_association {,generic_association} ) ;
  2404.  
  2405.      |   subprogram_specification IS__NEW__expanded_name
  2406.             ( generic_association {,generic_association} ) ;
  2407.      
  2408. /. %action %end_case_expression
  2409.         Decrease_Indent;
  2410.         Pop_Identifier;
  2411. ./
  2412.  
  2413. --s
  2414.  IS__NEW__expanded_name  ::=
  2415.          generic_instantiation_IS NEW start_expanded_name expanded_name
  2416.  
  2417. /. %action %case_expression
  2418.         Save_Generic_Name;
  2419. ./
  2420.  
  2421. --s
  2422.  generic_instantiation_IS ::=
  2423.          IS
  2424.  
  2425. /. %action %case_expression
  2426.         New_Line;
  2427.         Increase_Indent;
  2428. ./     
  2429.  
  2430.  generic_association   ::=
  2431.          [generic_formal_parameter=>]generic_actual_parameter
  2432.      
  2433. -- no action
  2434.      
  2435.  generic_formal_parameter   ::=
  2436.          identifier
  2437.      
  2438. -- no action
  2439.      
  2440.      |   string_literal
  2441.      
  2442. -- no action
  2443.      
  2444.  generic_actual_parameter   ::=
  2445.          expression
  2446.      
  2447. -- no action
  2448.      
  2449. -- LRM 13.1
  2450.      
  2451.  representation_clause   ::=
  2452.          length_clause
  2453.      
  2454. -- no action
  2455.      
  2456.      |   enumeration_representation_clause
  2457.      
  2458. -- no action
  2459.      
  2460.      |   address_clause
  2461.      
  2462. -- no action
  2463.      
  2464.      |   record_representation_clause
  2465.      
  2466. /. %action %case_expression
  2467.         Decrease_Indent;
  2468. ./
  2469.      
  2470. -- LRM 13.2
  2471.      
  2472.  length_clause   ::=
  2473.          FOR attribute USE simple_expression ;
  2474.      
  2475. -- no action
  2476.      
  2477. -- LRM 13.3
  2478.      
  2479.  enumeration_representation_clause   ::=
  2480.          FOR identifier USE aggregate ;
  2481.      
  2482. -- no action
  2483.      
  2484. -- LRM 13.4
  2485.      
  2486.  record_representation_clause   ::=
  2487. --c      FOR identifier USE RECORD {component_clause} END RECORD ;
  2488.      
  2489. --s      FOR identifier USE start_of_record_type record_terminal
  2490. --s         {component_clause}' END RECORD ;
  2491.  
  2492.          FOR identifier USE start_of_record_type 
  2493.          repspec_record_terminal {component_clause}' END RECORD ;
  2494.      
  2495. -- no action
  2496.      
  2497. --c  |   FOR identifier USE RECORD alignment_clause
  2498. --c         {component_clause} END RECORD ;
  2499.      
  2500.      |   FOR identifier USE start_of_record_type RECORD alignment_clause
  2501.             {component_clause}' END RECORD ;
  2502.      
  2503. -- no action
  2504.  
  2505.  component_clause   ::=
  2506.          name AT simple_expression range_constraint ;
  2507.      
  2508. /. %action %case_expression
  2509.         New_Line;
  2510. ./
  2511.      
  2512.  alignment_clause   ::=
  2513.          AT MOD simple_expression ;
  2514.      
  2515. /. %action %case_expression
  2516.         New_Line;
  2517.         Increase_Indent;
  2518. ./
  2519.      
  2520. -- LRM 13.5
  2521.      
  2522.  address_clause   ::=
  2523.          FOR identifier USE AT simple_expression ;
  2524.      
  2525. -- no action
  2526.      
  2527. -- LRM 13.8
  2528.      
  2529.  code_statement   ::=
  2530.          name ' aggregate ;
  2531.      
  2532. -- no action
  2533.      
  2534. ----------------------------------------------------------------------
  2535. -- The following rules are used to implement [...] and {...}
  2536. -- syntactic constructs.
  2537. ----------------------------------------------------------------------
  2538.      
  2539.  {pragma_decl}   ::=
  2540.           empty
  2541.      
  2542. -- no action
  2543.      
  2544.      |   {pragma_decl} pragma
  2545.      
  2546. -- no action
  2547.      
  2548.  {pragma_variant}   ::=
  2549.           empty
  2550.      
  2551. -- no action
  2552.      
  2553.      |   {pragma_variant} pragma
  2554.      
  2555. -- no action
  2556.      
  2557.  {pragma_stm}   ::=
  2558.           empty
  2559.      
  2560. -- no action
  2561.      
  2562.      |   {pragma_stm} pragma
  2563.      
  2564. -- no action
  2565.      
  2566.  {pragma_alt}   ::=
  2567.           empty
  2568.      
  2569. -- no action
  2570.      
  2571.      |   {pragma_alt} pragma
  2572.      
  2573. -- no action
  2574.      
  2575.  [:=expression]   ::=
  2576.          empty
  2577.      
  2578. -- no action
  2579.      
  2580.      |   := expression
  2581.      
  2582. -- no action
  2583.      
  2584.  --sd {,identifier}   ::=
  2585.  
  2586.  {,save_identifier}   ::=
  2587.            empty
  2588.      
  2589. -- no action
  2590.      
  2591.      |   {,save_identifier} , save_identifier
  2592.      
  2593. -- no action
  2594.      
  2595.  type_name|subtype_name   ::=
  2596.          expanded_name
  2597.      
  2598. -- no action
  2599.      
  2600.  expanded_name   ::=
  2601.          identifier
  2602.      
  2603. -- no action
  2604.      
  2605.      |   expanded_name . identifier
  2606.      
  2607. -- no action
  2608.      
  2609.  {,enumeration_literal_specification}   ::=
  2610.            empty
  2611.      
  2612. -- no action
  2613.      
  2614.      |   {,enumeration_literal_specification}
  2615.             , enumeration_literal_specification
  2616.      
  2617. -- no action
  2618.      
  2619.  [range_constraint]   ::=
  2620.          empty
  2621.      
  2622. -- no action
  2623.      
  2624.      |   range_constraint
  2625.      
  2626. -- no action
  2627.      
  2628.  {,index_subtype_definition}   ::=
  2629.            empty
  2630.      
  2631. -- no action
  2632.      
  2633.      |   {,index_subtype_definition} , index_subtype_definition
  2634.      
  2635. -- no action
  2636.      
  2637.  {,discrete_range}   ::=
  2638.            empty
  2639.      
  2640. -- no action
  2641.      
  2642.      |   {,discrete_range} , discrete_range
  2643.      
  2644. -- no action
  2645.      
  2646.  {component_declaration}   ::=
  2647.           empty
  2648.      
  2649. -- no action
  2650.      
  2651.      |   {component_declaration} component_declaration {pragma_decl}
  2652.      
  2653. -- no action
  2654.      
  2655.  {;discriminant_specification}   ::=
  2656.            empty
  2657.      
  2658. -- no action
  2659.      
  2660. --c  |   {;discriminant_specification} ; discriminant_specification
  2661.      
  2662.      |   {;discriminant_specification} discriminant__; 
  2663.          discriminant_specification
  2664.      
  2665. -- no action
  2666.      
  2667.  {variant}   ::=
  2668.           empty
  2669.      
  2670. -- no action
  2671.      
  2672.      |   {variant} variant
  2673.      
  2674. -- no action
  2675.      
  2676.  {|choice}   ::=
  2677.            empty
  2678.      
  2679. -- no action
  2680.      
  2681.      |   {|choice} '|' choice
  2682.      
  2683. -- no action
  2684.      
  2685.  {basic_declarative_item}   ::=
  2686.          {pragma_decl}
  2687.      
  2688. -- no action
  2689.      
  2690.      |   {basic_declarative_item} basic_declarative_item {pragma_decl}
  2691.      
  2692. -- no action
  2693.      
  2694.      |   {basic_declarative_item}__basic_declarative_item|EMPTY
  2695.          {basic_colon_declaration}
  2696.      
  2697. -- no action
  2698.      
  2699.  {later_declarative_item}   ::=
  2700.          {pragma_decl}
  2701.      
  2702. -- no action
  2703.      
  2704.      |   {later_declarative_item} later_declarative_item {pragma_decl}
  2705.      
  2706. -- no action
  2707.      
  2708.  expression,expression{,expression}   ::=
  2709.          expression , expression
  2710.      
  2711. -- no action
  2712.      
  2713.      |   expression,expression{,expression} , expression
  2714.      
  2715. -- no action
  2716.      
  2717.  choice{|choice}=>expression   ::=
  2718.          choice {|choice} => expression
  2719.      
  2720. -- no action
  2721.      
  2722.  {,choice{|choice}=>expression}   ::=
  2723.            empty
  2724.      
  2725. -- no action
  2726.      
  2727.      |   {,choice{|choice}=>expression} , choice{|choice}=>expression
  2728.      
  2729. -- no action
  2730.      
  2731.  [,others=>expression]   ::=
  2732.           empty
  2733.      
  2734. -- no action
  2735.      
  2736.      |    , others=>expression
  2737.      
  2738. -- no action
  2739.      
  2740.  others=>expression   ::=
  2741.          OTHERS => expression
  2742.      
  2743. -- no action
  2744.      
  2745.  ga_expression   ::=
  2746.          expression
  2747.      
  2748. -- no action
  2749.      
  2750.      |   simple_expression .. simple_expression
  2751.      
  2752. -- no action
  2753.      
  2754.      |   name range_constraint
  2755.      
  2756. -- no action
  2757.      
  2758.  ga_expression{,ga_expression}   ::=
  2759.          ga_expression
  2760.      
  2761. -- no action
  2762.      
  2763.      |   ga_expression{,ga_expression} , ga_expression
  2764.      
  2765. -- no action
  2766.      
  2767.  identifier{|identifier}=>expression  ::=
  2768.          identifier {|identifier} => expression
  2769.      
  2770. -- no action
  2771.      
  2772.  {,identifier{|identifier}=>expression}   ::=
  2773.            empty
  2774.      
  2775. -- no action
  2776.      
  2777.      |   {,identifier{|identifier}=>expression}
  2778.             , identifier{|identifier}=>expression
  2779.      
  2780. -- no action
  2781.      
  2782.  {|identifier}   ::=
  2783.          empty
  2784.      
  2785. -- no action
  2786.      
  2787.      |   {|identifier} '|' identifier
  2788.      
  2789. -- no action
  2790.      
  2791.  relation{AND__relation}   ::=
  2792.          relation AND relation
  2793.      
  2794. -- no action
  2795.      
  2796.      |   relation{AND__relation} AND relation
  2797.      
  2798. -- no action
  2799.      
  2800.  relation{OR__relation}   ::=
  2801.          relation OR relation
  2802.      
  2803. -- no action
  2804.      
  2805.      |   relation{OR__relation} OR relation
  2806.      
  2807. -- no action
  2808.      
  2809.  relation{XOR__relation}   ::=
  2810.          relation XOR relation
  2811.      
  2812. -- no action
  2813.      
  2814.      |   relation{XOR__relation} XOR relation
  2815.      
  2816. -- no action
  2817.      
  2818.  relation{AND__THEN__relation}   ::=
  2819.          relation AND THEN relation
  2820.      
  2821. -- no action
  2822.      
  2823.      |   relation{AND__THEN__relation} AND THEN relation
  2824.      
  2825. -- no action
  2826.      
  2827.  relation{OR__ELSE__relation}   ::=
  2828.          relation OR ELSE relation
  2829.      
  2830. -- no action
  2831.      
  2832.      |   relation{OR__ELSE__relation} OR ELSE relation
  2833.      
  2834. -- no action
  2835.      
  2836.  [relational_operator__simple_expression]   ::=
  2837.          empty
  2838.      
  2839. -- no action
  2840.      
  2841.      |   relational_operator simple_expression
  2842.      
  2843. -- no action
  2844.      
  2845.  [NOT]IN   ::=
  2846.          IN
  2847.      
  2848. -- no action
  2849.      
  2850.      |   NOT IN
  2851.      
  2852. -- no action
  2853.      
  2854.  [unary_adding_operator]term{binary_adding_operator__term}   ::=
  2855.          term
  2856.      
  2857. -- no action
  2858.      
  2859.      |   unary_adding_operator term
  2860.      
  2861. -- no action
  2862.      
  2863.      |   [unary_adding_operator]term{binary_adding_operator__term}
  2864.              binary_adding_operator term
  2865.      
  2866. -- no action
  2867.      
  2868.  factor{multiplying_operator__factor}   ::=
  2869.          factor
  2870.      
  2871. -- no action
  2872.      
  2873.      |   factor{multiplying_operator__factor} multiplying_operator
  2874.             factor
  2875.      
  2876. -- no action
  2877.      
  2878.  [exponentiating_operator__primary]   ::=
  2879.          empty
  2880.      
  2881. -- no action
  2882.      
  2883.      |   exponentiating_operator primary
  2884.      
  2885. -- no action
  2886.      
  2887.  {statement}   ::=
  2888.          {pragma_stm}
  2889.      
  2890. -- no action
  2891.      
  2892.      |   {statement} statement {pragma_stm}
  2893.      
  2894. -- no action
  2895.      
  2896.  {label}+   ::=
  2897.          label
  2898.      
  2899. -- no action
  2900.      
  2901.      |   {label}+ label
  2902.      
  2903. -- no action
  2904.      
  2905. -- The following rules are used to implement Pretty Printer actions
  2906. --
  2907.      
  2908. --c condition_THEN__sequence_of_statements   ::=
  2909. --c       condition THEN sequence_of_statements
  2910.      
  2911.  condition__THEN__sequence_of_statements   ::=
  2912.           condition__THEN sequence_of_statements
  2913.      
  2914. -- no action
  2915.      
  2916.  {ELSIF__condition__THEN__sequence_of_statements}   ::=
  2917.           empty
  2918.      
  2919. -- no action
  2920.      
  2921. --c  |   {ELSIF__condition__THEN__sequence_of_statements}
  2922. --c         ELSIF condition THEN sequence_of_statements
  2923.      
  2924.      |   {ELSIF__condition__THEN__sequence_of_statements}
  2925.             ELSIF__condition__THEN sequence_of_statements
  2926.      
  2927. -- no action
  2928.      
  2929.  [ELSE__sequence_of_statements]   ::=
  2930.          empty
  2931.      
  2932. -- no action
  2933.      
  2934. --c  |   ELSE sequence_of_statements
  2935.      
  2936.      |   else_terminal sequence_of_statements
  2937.      
  2938. -- no action
  2939.      
  2940.  {case_statement_alternative}   ::=
  2941.          empty
  2942.      
  2943. -- no action
  2944.      
  2945.      |   {case_statement_alternative} case_statement_alternative
  2946.      
  2947. -- no action
  2948.      
  2949.  [loop_identifier:]   ::=
  2950.          empty
  2951.      
  2952. /. %action %case_expression
  2953.         Push_Empty_Token;
  2954. ./
  2955.      
  2956.      |   identifier :
  2957.      
  2958. /. %action %case_expression
  2959.         Push_Identifier;
  2960. ./
  2961.      
  2962.  [identifier]   ::=
  2963.          empty
  2964.      
  2965. /. %action %case_expression
  2966.         Pop_Identifier(To_Output);
  2967. ./
  2968.      
  2969.      |   identifier
  2970.      
  2971. /. %action %case_expression
  2972.         Pop_Identifier;
  2973. ./
  2974.      
  2975.  [block_identifier:]   ::=
  2976.          empty
  2977.      
  2978. /. %action %case_expression
  2979.         Start_Block (False);
  2980. ./
  2981.      
  2982.      |   identifier :
  2983.      
  2984. /. %action %case_expression
  2985.         Push_Identifier;
  2986.         Start_Block (True);
  2987. ./
  2988.   
  2989. --s
  2990.  [exception_handler_part]  ::=
  2991.          empty
  2992.  
  2993. /. %action %case_expression
  2994.         Add_Exception_Handler;
  2995. ./
  2996.  
  2997.      |   exception_terminal {pragma_alt}__exception_handler
  2998.  
  2999. -- no action
  3000.  
  3001.    
  3002. --s {pragma_alt}__exception_handler_list   ::=
  3003. --s         {pragma_alt} exception_handler_list
  3004.  
  3005.  {pragma_alt}__exception_handler   ::=
  3006.          {pragma_alt} exception_handler
  3007.      
  3008. /. %action %case_expression
  3009.         Decrease_Indent;
  3010. ./
  3011.      
  3012. --s exception_handler_list   ::=
  3013. --s      exception_handler
  3014. --s  |   exception_handler_list exception_handler
  3015.      
  3016. --s
  3017.  {non_others_handler}  ::=
  3018.          non_others_handler
  3019.  
  3020. -- no action
  3021.  
  3022.      |   {non_others_handler} non_others_handler
  3023.  
  3024. -- no action
  3025.  
  3026. --s
  3027.  [others_handler]  ::=
  3028.          empty
  3029.  
  3030. /. %action %case_expression
  3031.         Add_Others_Handler;
  3032. ./
  3033.  
  3034.      |   others_handler
  3035.  
  3036. -- no action
  3037.  
  3038.  {;parameter_specification}   ::=
  3039.            empty
  3040.      
  3041. -- no action
  3042.      
  3043. --c  |   {;parameter_specification} ; parameter_specification
  3044.      
  3045.      |   {;parameter_specification} parameter__; parameter_specification
  3046.      
  3047. -- no action
  3048.      
  3049.  [end_designator]   ::=
  3050.          empty
  3051.      
  3052. /. %action %case_expression
  3053.         Pop_Identifier(To_Output);
  3054. ./
  3055.      
  3056.      |   identifier
  3057.      
  3058. /. %action %start_case_expression ./
  3059.      
  3060.      |   string_literal
  3061.      
  3062. /. %action %end_case_expression
  3063.         Pop_Identifier;
  3064. ./
  3065.      
  3066. --s {,expanded_name}   ::=
  3067. --s        empty
  3068. --s  |   {,expanded_name} , expanded_name
  3069.  
  3070. --s
  3071.  {,package_name}  ::=
  3072.          empty
  3073.  
  3074. -- no action
  3075.  
  3076.      |   {,package_name} , package_name
  3077.  
  3078. -- no action
  3079.  
  3080.  {entry_declaration}   ::=
  3081.          {pragma_decl}
  3082.      
  3083. -- no action
  3084.      
  3085.      |   {entry_declaration} entry_declaration {pragma_decl}
  3086.      
  3087. -- no action
  3088.      
  3089.  {representation_clause}   ::=
  3090.           empty
  3091.      
  3092. -- no action
  3093.      
  3094.      |   {representation_clause} representation_clause {pragma_decl}
  3095.      
  3096. -- no action
  3097.      
  3098.  [(discrete_range)][formal_part]   ::=
  3099.          empty
  3100.      
  3101. -- no action
  3102.      
  3103. --c  |   ( parameter_specification {;parameter_specification} )
  3104.  
  3105.      |   left_paren parameter_specification 
  3106.          {;parameter_specification} right_paren
  3107.      
  3108. -- no action
  3109.      
  3110. --c  |   ( discrete_range )
  3111.      
  3112.      |   left_paren discrete_range right_paren
  3113.      
  3114. -- no action
  3115.      
  3116. --c  |   ( discrete_range )
  3117. --c         ( parameter_specification {;parameter_specification} )
  3118.  
  3119.      |   left_paren discrete_range right_paren
  3120.             left_paren parameter_specification 
  3121.             {;parameter_specification} right_paren
  3122.      
  3123. -- no action
  3124.      
  3125.  [(expression)][formal_part]   ::=
  3126.          empty
  3127.      
  3128. -- no action
  3129.      
  3130. --c  |   ( parameter_specification {;parameter_specification} )
  3131.  
  3132.      |   left_paren parameter_specification 
  3133.          {;parameter_specification} right_paren
  3134.      
  3135. -- no action
  3136.      
  3137. --c |   ( expression )
  3138.      
  3139.     |   left_paren expression right_paren
  3140.      
  3141. -- no action
  3142.      
  3143. --c  |   ( expression )
  3144. --c         ( parameter_specification {;parameter_specification} )
  3145.  
  3146.      |   left_paren expression right_paren
  3147.             left_paren parameter_specification 
  3148.             {;parameter_specification} right_paren
  3149.      
  3150. -- no action
  3151.      
  3152.  {OR__select_alternative}   ::=
  3153.           empty
  3154.      
  3155. -- no action
  3156.      
  3157.      
  3158. --c  |   {OR__select_alternative} OR select_alternative
  3159.      
  3160.      |   {OR__select_alternative} or_terminal select_alternative
  3161.      
  3162. -- no action
  3163.      
  3164.  [sequence_of_statements]   ::=
  3165.          {pragma_stm}
  3166.      
  3167. -- no action
  3168.      
  3169.      |    optional_sequence_of_statements
  3170.      
  3171. -- no action
  3172.      
  3173.  {,name}   ::=
  3174.            empty
  3175.      
  3176. -- no action
  3177.      
  3178.      
  3179.      |   {,name} , name
  3180.      
  3181. -- no action
  3182.      
  3183.      
  3184.  {compilation_unit}   ::=
  3185.          compilation_unit
  3186.      
  3187. -- no action
  3188.      
  3189.      
  3190.      |   {compilation_unit} compilation_unit
  3191.      
  3192. -- no action
  3193.      
  3194.  {with_clause{use_clause}}   ::=
  3195.          empty
  3196.      
  3197. -- no action
  3198.      
  3199.      |   {with_clause{use_clause}} with_clause use_clause_list
  3200.      
  3201. /. %action %case_expression
  3202.         New_Line;
  3203. ./
  3204.      
  3205.  use_clause_list   ::=
  3206.          {pragma_decl}
  3207.      
  3208. -- no action
  3209.      
  3210.      |    use_clause_list use_clause {pragma_decl}
  3211.      
  3212. -- no action
  3213.  
  3214. --s {,used_identifier}   ::=
  3215. --s        empty
  3216. --s  |   {,used_identifier} , identifier
  3217.      
  3218.  
  3219.  {,library_unit_name}   ::=
  3220.         empty
  3221.  
  3222. -- no action
  3223.  
  3224.   |   {,library_unit_name} , library_unit_name
  3225.      
  3226. -- no action
  3227.      
  3228.  {|exception_choice}   ::=
  3229.            empty
  3230.      
  3231. -- no action
  3232.      
  3233.      |   {|exception_choice} '|' exception_choice
  3234.      
  3235. -- no action
  3236.      
  3237.  {generic_parameter_declaration}   ::=
  3238.           empty
  3239.      
  3240. -- no action
  3241.      
  3242.      |   {generic_parameter_declaration} generic_parameter_declaration
  3243.      
  3244. -- no action
  3245.      
  3246.  [IS__name__or__<>]   ::=
  3247.          empty
  3248.      
  3249. -- no action
  3250.  
  3251.      |   IS name
  3252.      
  3253. -- no action
  3254.      
  3255.      |   IS <>
  3256.      
  3257. -- no action
  3258.  
  3259.  {,generic_association}   ::=
  3260.            empty
  3261.      
  3262. -- no action
  3263.      
  3264.      |   {,generic_association} , generic_association
  3265.      
  3266. -- no action
  3267.      
  3268.  [generic_formal_parameter=>]generic_actual_parameter   ::=
  3269.          generic_actual_parameter
  3270.      
  3271. -- no action
  3272.      
  3273.      |   generic_formal_parameter => generic_actual_parameter
  3274.      
  3275. -- no action
  3276.      
  3277.  {component_clause}   ::=
  3278.          {pragma_decl}
  3279.      
  3280. -- no action
  3281.      
  3282.      |   {component_clause} component_clause {pragma_decl}
  3283.      
  3284. -- no action
  3285.  
  3286. -----------------------------------------------------------------
  3287. -- The following rules were added so that pretty printing actions 
  3288. -- could be put on them.  They have been modified for source
  3289. -- instrumenting actions.
  3290. -----------------------------------------------------------------
  3291.  
  3292. --c
  3293.  record_terminal   ::=
  3294.          RECORD
  3295.      
  3296. /. %action %case_expression
  3297.         New_Line;
  3298.         Increase_Indent;
  3299. ./
  3300. --sd        Start_Buffering_Colon_Declarations;
  3301.      
  3302. --c
  3303.  closing_{pragma_decl}  ::=
  3304.          {pragma_decl}
  3305.  
  3306. --sd/. %action %start_case_expression ./
  3307. -- no action
  3308.  
  3309. --c
  3310.  {component_declaration}'  ::=
  3311.          {component_declaration}
  3312.  
  3313. -- no action
  3314. --sd/. %action %end_case_expression
  3315. --sd        Print_Colon_Declarations_Buffer;
  3316. --sd        NULL;
  3317. --sd./
  3318.  
  3319. --c
  3320.  start_of_record_type   ::=
  3321.          EMPTY
  3322.      
  3323. /. %action %start_case_expression ./
  3324.      
  3325. --s
  3326.  repspec_record_terminal  ::=
  3327.          RECORD
  3328.  
  3329. /. %action %continue_case_expression ./
  3330.      
  3331. --c
  3332.  CASE__identifier__IS   ::=
  3333. --s      CASE identifier IS
  3334.  
  3335.          CASE__identifier IS
  3336.      
  3337. /. %action %continue_case_expression ./
  3338.      
  3339. --c
  3340.  WHEN__choice__{|choice}__=>   ::=
  3341.          WHEN choice {|choice} =>
  3342.  
  3343. /. %action %continue_case_expression ./
  3344.      
  3345. --c
  3346.  WHEN__OTHERS__=>   ::=
  3347.          WHEN OTHERS =>
  3348.      
  3349. /. %action %continue_case_expression ./
  3350.      
  3351.      
  3352. --c
  3353.  CASE__expression__IS   ::=
  3354.          CASE expression IS
  3355.      
  3356. /. %action %end_case_expression
  3357.         New_Line;
  3358.         Increase_Indent;
  3359. ./
  3360.   
  3361. --c
  3362.  generic_terminal   ::=
  3363.          GENERIC
  3364.      
  3365. /. %action %case_expression 
  3366.         Start_Generic_Specification;
  3367.         New_Line;
  3368.         Increase_Indent;
  3369. ./
  3370.  
  3371. --s
  3372.  CASE__identifier  ::=
  3373.          CASE identifier
  3374.  
  3375. /. %action %case_expression
  3376.         Save_Case_Identifier;
  3377. ./
  3378.  
  3379. --c
  3380.  WHEN__variant_choice__{|variant_choice}__=>  ::=
  3381.          WHEN__choice__{|choice}__=>
  3382.  
  3383. /. %action %start_case_expression ./
  3384.  
  3385. --s
  3386.  WHEN__variant_OTHERS__=>  ::=
  3387.          WHEN__OTHERS__=>
  3388.  
  3389. --sd        Start_Buffering_Colon_Declarations;
  3390. /. %action %end_case_expression
  3391.         End_Record_Variant;
  3392. ./
  3393.  
  3394. --s
  3395.  WHEN__case_choice__{|choice}__=>  ::=
  3396.          WHEN__choice__{|choice}__=>
  3397.  
  3398. /. %action %start_case_expression ./
  3399.  
  3400. --s
  3401.  WHEN__case_OTHERS__=>  ::=
  3402.          WHEN__OTHERS__=>
  3403.  
  3404. /. %action %end_case_expression
  3405.         Add_Breakpoint;
  3406. ./
  3407.  
  3408. --c
  3409.  {pragma_alt}__case_statement_alternative__{case_statement_alternative} ::=
  3410.      
  3411.          {pragma_alt} case_statement_alternative
  3412.          {case_statement_alternative}
  3413.      
  3414. /. %action %case_expression
  3415.         Decrease_Indent;
  3416. ./
  3417.      
  3418. --c
  3419.  loop_terminal   ::=
  3420.          LOOP
  3421.      
  3422. /. %action %case_expression
  3423.         New_Line;
  3424.         Increase_Indent;
  3425. ./
  3426.      
  3427.      
  3428. --c
  3429.  begin_terminal   ::=
  3430.          BEGIN
  3431.      
  3432. --sd/. %action %case_expression
  3433. --sd        Switch_Comment_Context;
  3434.  
  3435. /. %action %case_expression
  3436.         New_Line;
  3437.         Increase_Indent;
  3438.         Start_Begin_End_Block;
  3439. ./
  3440.      
  3441. --c
  3442.  {pragma_variant}__variant__{variant}   ::=
  3443.          {pragma_variant} variant {variant}
  3444.      
  3445. /. %action %case_expression
  3446.         Decrease_Indent;
  3447. ./
  3448.      
  3449. --c
  3450.  declare_terminal   ::=
  3451.          DECLARE
  3452.      
  3453. --sd/. %action %case_expression
  3454. --sd        Switch_Comment_Context;
  3455.  
  3456. /. %action %case_expression
  3457.         New_Line;
  3458.         Increase_Indent;
  3459. ./
  3460.      
  3461. --c
  3462.  PACKAGE__start_identifier__IS   ::=
  3463.          PACKAGE start_identifier IS
  3464.      
  3465. /. %action %case_expression
  3466.         Increment_Scope (Package_Specification);
  3467.         New_Line;
  3468.         Increase_Indent;
  3469. ./
  3470.      
  3471. --c
  3472.  start_identifier   ::=
  3473.          identifier
  3474.      
  3475. /. %action %case_expression
  3476.         Push_Identifier;
  3477. ./
  3478.      
  3479. --c
  3480.  {basic_declarative_item}'   ::=
  3481.          {basic_declarative_item}
  3482.      
  3483. /. %action %start_case_expression ./
  3484.      
  3485. --c
  3486.  {entry_declaration}__{representation_clause}   ::=
  3487.          {entry_declaration} {representation_clause}
  3488.      
  3489. /. %action %end_case_expression
  3490.         Decrease_Indent;
  3491. ./
  3492.      
  3493. --c
  3494.  private_terminal   ::=
  3495.          PRIVATE
  3496.      
  3497. /. %action %case_expression
  3498.         New_Line;
  3499.         Increase_Indent;
  3500.         Start_Private_Part;
  3501. ./
  3502.      
  3503. --c
  3504.  PACKAGE__BODY__start_identifier__IS   ::=
  3505.          PACKAGE BODY start_identifier IS
  3506.      
  3507. /. %action %case_expression
  3508.         Increment_Scope (Package_Body);
  3509.         New_Line;
  3510.         Increase_Indent;
  3511.  ./
  3512.      
  3513. --c
  3514.  TASK__start_identifier__IS   ::=
  3515.          TASK start_identifier IS
  3516.      
  3517. /. %action %case_expression
  3518.         New_Line;
  3519.         Increase_Indent;
  3520. ./
  3521.      
  3522. --c
  3523.  TASK__TYPE__start_identifier__IS   ::=
  3524.          TASK TYPE start_identifier IS
  3525.      
  3526. /. %action %case_expression
  3527.         New_Line;
  3528.         Increase_Indent;
  3529.         Save_Type_Class (Task_Type);
  3530. ./
  3531.    
  3532. --c
  3533.  TASK__BODY__start_identifier__IS   ::=
  3534.          TASK BODY start_identifier IS
  3535.      
  3536. /. %action %case_expression
  3537.         Increment_Scope (Task_Body);
  3538.         New_Line;
  3539.         Increase_Indent;
  3540. ./
  3541.      
  3542. --c
  3543.  ACCEPT__start_identifier__[(expression)][formal_part]__DO   ::=
  3544.           ACCEPT start_identifier [(expression)][formal_part] DO
  3545.  
  3546.  
  3547. /. %action %case_expression 
  3548.         New_Line;
  3549.         Increase_Indent;
  3550.         Start_Do_Sequence_Of_Statements;
  3551. ./     
  3552.  
  3553. --c
  3554.  select_terminal   ::=
  3555.          SELECT
  3556.      
  3557. /. %action %case_expression
  3558.         New_Line;
  3559.         Increase_Indent;
  3560. ./
  3561.      
  3562. --c
  3563.  call_statement__[sequence_of_statements]   ::=
  3564. --s      call_statement [sequence_of_statements]
  3565.          call_statement__decision_point [sequence_of_statements]
  3566.      
  3567. /. %action %case_expression
  3568.         Decrease_Indent;
  3569. ./
  3570.      
  3571. --c
  3572.  optional_sequence_of_statements  ::=
  3573.          {pragma_stm} statement {statement}
  3574.      
  3575. -- no action
  3576.      
  3577. --c
  3578.  delay_alternative_in_timed_entry   ::=
  3579.         delay_alternative
  3580.      
  3581. /. %action %start_case_expression ./
  3582.      
  3583. --c
  3584.  WHEN__condition__=>__selective_wait_alternative   ::=
  3585.          WHEN__condition__=> selective_wait_alternative
  3586.      
  3587. /. %action %end_case_expression
  3588.         Decrease_Indent;
  3589. ./
  3590.      
  3591. --c
  3592.  WHEN__condition__=>   ::=
  3593.          WHEN condition =>
  3594.  
  3595. /. %action %start_case_expression ./
  3596.         
  3597. --c
  3598.  exception_terminal   ::=
  3599.          EXCEPTION
  3600.      
  3601. /. %action %end_case_expression
  3602.         New_Line;
  3603.         Increase_Indent;
  3604. ./
  3605.   
  3606. --c
  3607.  WHEN__exception_choice__{|exception_choice}__=>   ::=
  3608.          WHEN exception_choice {|exception_choice} =>
  3609.  
  3610. /. %action %start_case_expression ./
  3611.  
  3612. --s
  3613.  WHEN__exception_OTHERS__=>  ::=
  3614.          WHEN OTHERS =>
  3615.  
  3616. /. %action %end_case_expression
  3617.         New_Line;
  3618.         Increase_Indent;
  3619.         Start_Exception_Branch;
  3620. ./
  3621.      
  3622. --c
  3623. --s FUNCTION__designator__IS   ::=
  3624. --s         FUNCTION designator IS
  3625.      
  3626. --s/. %action %start_case_expression ./
  3627.      
  3628.  subprogram_specification__IS   ::=
  3629.          subprogram_specification IS
  3630.      
  3631. /. %action %case_expression
  3632.         Increment_Scope (Subprogram_Body);
  3633.         New_Line;
  3634.         Increase_Indent;
  3635. ./
  3636.      
  3637. --c
  3638.  {component_clause}'   ::=
  3639.          {component_clause}
  3640.      
  3641. /. %action %case_expression
  3642.         Decrease_Indent;
  3643. ./
  3644.      
  3645. --c
  3646.  SEPARATE__(__expanded_name__)   ::=
  3647. --s      SEPARATE ( expanded_name )
  3648.          SEPARATE__(__expanded_name )
  3649.      
  3650. /. %action %case_expression
  3651.         New_Line;
  3652. ./
  3653.   
  3654. --s
  3655.  SEPARATE__(__expanded_name  ::=
  3656.          SEPARATE ( start_expanded_name expanded_name  
  3657.  
  3658. /. %action %case_expression
  3659.         Save_Separate_Name;
  3660. ./
  3661.  
  3662. --sd
  3663.  start_expanded_name  ::=
  3664.          empty
  3665.      
  3666. /. %action %case_expression
  3667.         Start_Saving_Expanded_Name;
  3668. ./
  3669.  
  3670. --c
  3671.  {basic_colon_declaration}   ::=
  3672.          start_{basic_colon_declaration} {basic_colon_declaration}'
  3673.          basic_colon_declaration {pragma_decl}
  3674.   
  3675. -- no action 
  3676.    
  3677. --sd/. %action %case_expression
  3678. --sd        Print_Colon_Declarations_Buffer;
  3679. --sd./
  3680.      
  3681. --c
  3682.  start_{basic_colon_declaration} ::= EMPTY
  3683.   
  3684. -- no action   
  3685. --sd/. %action %case_expression
  3686. --sd        Start_Buffering_Colon_Declarations;
  3687. --sd./
  3688.      
  3689. --c
  3690.  {basic_colon_declaration}'   ::=
  3691.          {basic_colon_declaration}' basic_colon_declaration {pragma_decl}
  3692.      
  3693. -- no action
  3694.      
  3695. --c
  3696.  {basic_colon_declaration}'   ::=
  3697.          EMPTY
  3698.      
  3699. -- no action
  3700.      
  3701. --c
  3702.  {basic_declarative_item}__basic_declarative_item|EMPTY   ::=
  3703.          {basic_declarative_item} basic_declarative_item {pragma_decl}
  3704.      
  3705. -- no action
  3706.      
  3707. --c
  3708.  {basic_declarative_item}__basic_declarative_item|EMPTY   ::=
  3709.          {pragma_decl}
  3710.      
  3711.      
  3712. -- no action
  3713.      
  3714. --c
  3715.  condition__THEN   ::=
  3716.          condition THEN
  3717.      
  3718. /. %action %start_case_expression ./
  3719.      
  3720. --c
  3721.  ELSIF__condition__THEN   ::=
  3722.          ELSIF condition THEN
  3723.      
  3724. /. %action %continue_case_expression ./
  3725.      
  3726. --c
  3727.  else_terminal   ::=
  3728.          ELSE
  3729.      
  3730. /. %action %end_case_expression
  3731.         New_Line;
  3732.         Increase_Indent;
  3733.         Add_Breakpoint;
  3734. ./
  3735.      
  3736. --c
  3737.  or_terminal   ::=
  3738.          OR
  3739.      
  3740. /. %action %case_expression
  3741.         New_Line;
  3742.         Increase_Indent;
  3743. ./
  3744.      
  3745. --c
  3746.  discriminant__;  ::=
  3747.          ;
  3748.  
  3749. /. %action %start_case_expression ./
  3750.      
  3751. --c
  3752.  parameter__;   ::=
  3753.          ;
  3754.      
  3755. /. %action %end_case_expression
  3756.         New_Line;
  3757. ./
  3758.      
  3759. --c
  3760.  left_paren  ::=
  3761.         (
  3762.  
  3763. /. %action %case_expression
  3764.         Change_Indent;
  3765. ./
  3766. --sd        Start_Buffering_Colon_Declarations;
  3767.  
  3768. --c
  3769.  right_paren  ::=
  3770.          )
  3771.  
  3772. --sd        Print_Colon_Declarations_Buffer;
  3773. /. %action %case_expression
  3774.         Resume_Normal_Indentation;
  3775. ./
  3776.  
  3777. /.
  3778.     when others =>
  3779.         null;
  3780.     end case;
  3781. end Apply_Actions;
  3782. ./
  3783.      
  3784.  %end
  3785.