1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
5 -- G E N _ I L . G E N . G E N _ N O D E S --
9 -- Copyright (C) 2020-2023, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 ------------------------------------------------------------------------------
26 procedure Gen_IL
.Gen
.Gen_Nodes
is
28 procedure Ab
-- Short for "Abstract"
29 (T
: Abstract_Node
; Parent
: Abstract_Type
;
30 Fields
: Field_Sequence
:= No_Fields
)
31 renames Create_Abstract_Node_Type
;
32 procedure Cc
-- Short for "ConCrete"
33 (T
: Concrete_Node
; Parent
: Abstract_Type
;
34 Fields
: Field_Sequence
:= No_Fields
;
35 Nmake_Assert
: String := "")
36 renames Create_Concrete_Node_Type
;
38 function Sy
-- Short for "Syntactic"
39 (Field
: Node_Field
; Field_Type
: Type_Enum
;
40 Default_Value
: Field_Default_Value
:= No_Default
;
41 Pre
, Pre_Get
, Pre_Set
: String := "") return Field_Desc
42 renames Create_Syntactic_Field
;
43 function Sm
-- Short for "Semantic"
44 (Field
: Field_Enum
; Field_Type
: Type_Enum
;
45 Type_Only
: Type_Only_Enum
:= No_Type_Only
;
46 Pre
, Pre_Get
, Pre_Set
: String := "") return Field_Desc
47 renames Create_Semantic_Field
;
49 procedure Union
(T
: Abstract_Node
; Children
: Type_Array
)
50 renames Create_Node_Union_Type
;
52 begin -- Gen_IL.Gen.Gen_Nodes
53 pragma Style_Checks
("M200");
55 Create_Root_Node_Type
(Node_Kind
,
56 (Sm
(Nkind
, Node_Kind_Type
),
57 Sm
(Sloc
, Source_Ptr
),
59 Sm
(Rewrite_Ins
, Flag
),
60 Sm
(Comes_From_Source
, Flag
),
62 Sm
(Error_Posted
, Flag
),
63 Sm
(Small_Paren_Count
, Small_Paren_Count_Type
),
64 Sm
(Check_Actuals
, Flag
),
65 Sm
(Has_Aspects
, Flag
),
66 Sm
(Is_Ignored_Ghost_Node
, Flag
),
67 Sm
(Link
, Union_Id
)));
69 Cc
(N_Unused_At_Start
, Node_Kind
);
71 Ab
(N_Representation_Clause
, Node_Kind
);
73 Cc
(N_At_Clause
, N_Representation_Clause
,
74 (Sy
(Identifier
, Node_Id
, Default_Empty
),
75 Sy
(Expression
, Node_Id
, Default_Empty
)));
77 Cc
(N_Component_Clause
, N_Representation_Clause
,
78 (Sy
(Component_Name
, Node_Id
),
79 Sy
(Position
, Node_Id
),
80 Sy
(First_Bit
, Node_Id
),
81 Sy
(Last_Bit
, Node_Id
)));
83 Cc
(N_Enumeration_Representation_Clause
, N_Representation_Clause
,
84 (Sy
(Identifier
, Node_Id
, Default_Empty
),
85 Sy
(Array_Aggregate
, Node_Id
),
86 Sm
(Next_Rep_Item
, Node_Id
)));
88 Cc
(N_Mod_Clause
, N_Representation_Clause
,
89 (Sy
(Expression
, Node_Id
, Default_Empty
),
90 Sy
(Pragmas_Before
, List_Id
, Default_No_List
)));
92 Cc
(N_Record_Representation_Clause
, N_Representation_Clause
,
93 (Sy
(Identifier
, Node_Id
, Default_Empty
),
94 Sy
(Mod_Clause
, Node_Id
, Default_Empty
),
95 Sy
(Component_Clauses
, List_Id
),
96 Sm
(Next_Rep_Item
, Node_Id
)));
98 Cc
(N_Attribute_Definition_Clause
, N_Representation_Clause
,
99 (Sy
(Name
, Node_Id
, Default_Empty
),
100 Sy
(Chars
, Name_Id
, Default_No_Name
),
101 Sy
(Expression
, Node_Id
, Default_Empty
),
102 Sm
(Address_Warning_Posted
, Flag
),
103 Sm
(Check_Address_Alignment
, Flag
),
104 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Entity
105 Sm
(From_Aspect_Specification
, Flag
),
106 Sm
(From_At_Mod
, Flag
),
107 Sm
(Is_Delayed_Aspect
, Flag
),
108 Sm
(Next_Rep_Item
, Node_Id
)));
110 Cc
(N_Empty
, Node_Kind
,
111 (Sy
(Chars
, Name_Id
, Default_No_Name
)));
112 -- The following getters and setters are called on Empty,
113 -- and are currently inherited from Node_Kind:
115 -- Set_Comes_From_Source
126 Cc
(N_Pragma_Argument_Association
, Node_Kind
,
127 (Sy
(Chars
, Name_Id
, Default_No_Name
),
128 Sy
(Expression
, Node_Id
, Default_Empty
),
129 Sm
(Expression_Copy
, Node_Id
)));
131 Ab
(N_Has_Etype
, Node_Kind
,
132 (Sm
(Etype
, Node_Id
)));
134 Cc
(N_Error
, N_Has_Etype
,
135 (Sy
(Chars
, Name_Id
, Default_No_Name
)));
137 Ab
(N_Entity
, N_Has_Etype
,
138 (Sm
(Next_Entity
, Node_Id
),
139 Sm
(Scope
, Node_Id
)));
141 Cc
(N_Defining_Character_Literal
, N_Entity
,
142 (Sy
(Chars
, Name_Id
, Default_No_Name
)));
144 Cc
(N_Defining_Identifier
, N_Entity
,
145 (Sy
(Chars
, Name_Id
, Default_No_Name
)));
147 Cc
(N_Defining_Operator_Symbol
, N_Entity
,
148 (Sy
(Chars
, Name_Id
, Default_No_Name
)));
150 Ab
(N_Subexpr
, N_Has_Etype
,
151 -- Nodes with expression fields
152 (Sm
(Assignment_OK
, Flag
),
153 Sm
(Do_Range_Check
, Flag
),
154 Sm
(Has_Dynamic_Length_Check
, Flag
),
155 Sm
(Is_Controlling_Actual
, Flag
),
156 Sm
(Is_Overloaded
, Flag
),
157 Sm
(Is_Static_Expression
, Flag
),
158 Sm
(Must_Not_Freeze
, Flag
),
159 Sm
(Raises_Constraint_Error
, Flag
)));
161 Ab
(N_Has_Entity
, N_Subexpr
,
162 -- Nodes that have Entity fields
163 -- Warning: DOES NOT INCLUDE N_Freeze_Entity, N_Freeze_Generic_Entity,
164 -- N_Aspect_Specification, or N_Attribute_Definition_Clause.
165 (Sm
(Entity_Or_Associated_Node
, Node_Id
))); -- both
167 Cc
(N_Expanded_Name
, N_Has_Entity
,
168 (Sy
(Chars
, Name_Id
, Default_No_Name
),
169 Sy
(Prefix
, Node_Id
),
170 Sy
(Selector_Name
, Node_Id
, Default_Empty
),
171 Sm
(Atomic_Sync_Required
, Flag
),
172 Sm
(Has_Private_View
, Flag
),
173 Sm
(Has_Secondary_Private_View
, Flag
),
174 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
175 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
176 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
177 Sm
(Redundant_Use
, Flag
)));
179 Ab
(N_Direct_Name
, N_Has_Entity
,
180 (Sm
(Has_Private_View
, Flag
),
181 Sm
(Has_Secondary_Private_View
, Flag
)));
183 Cc
(N_Identifier
, N_Direct_Name
,
184 (Sy
(Chars
, Name_Id
, Default_No_Name
),
185 Sm
(Atomic_Sync_Required
, Flag
),
186 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
187 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
188 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
189 Sm
(Original_Discriminant
, Node_Id
),
190 Sm
(Redundant_Use
, Flag
)));
192 Cc
(N_Operator_Symbol
, N_Direct_Name
,
193 (Sy
(Chars
, Name_Id
, Default_No_Name
),
194 Sy
(Strval
, String_Id
)));
196 Cc
(N_Character_Literal
, N_Direct_Name
,
197 (Sy
(Chars
, Name_Id
, Default_No_Name
),
198 Sy
(Char_Literal_Value
, Unat
)));
200 Ab
(N_Op
, N_Has_Entity
,
201 (Sm
(Do_Overflow_Check
, Flag
),
202 Sm
(Has_Private_View
, Flag
),
203 Sm
(Has_Secondary_Private_View
, Flag
)));
205 Ab
(N_Binary_Op
, N_Op
);
207 Cc
(N_Op_Add
, N_Binary_Op
,
208 (Sm
(Chars
, Name_Id
),
209 Sy
(Left_Opnd
, Node_Id
),
210 Sy
(Right_Opnd
, Node_Id
)));
212 Cc
(N_Op_Concat
, N_Binary_Op
,
213 (Sm
(Chars
, Name_Id
),
214 Sy
(Left_Opnd
, Node_Id
),
215 Sy
(Right_Opnd
, Node_Id
),
216 Sm
(Is_Component_Left_Opnd
, Flag
),
217 Sm
(Is_Component_Right_Opnd
, Flag
)));
219 Cc
(N_Op_Expon
, N_Binary_Op
,
220 (Sm
(Chars
, Name_Id
),
221 Sy
(Left_Opnd
, Node_Id
),
222 Sy
(Right_Opnd
, Node_Id
),
223 Sm
(Is_Power_Of_2_For_Shift
, Flag
)));
225 Cc
(N_Op_Subtract
, N_Binary_Op
,
226 (Sm
(Chars
, Name_Id
),
227 Sy
(Left_Opnd
, Node_Id
),
228 Sy
(Right_Opnd
, Node_Id
)));
230 Ab
(N_Multiplying_Operator
, N_Binary_Op
);
232 Cc
(N_Op_Divide
, N_Multiplying_Operator
,
233 (Sm
(Chars
, Name_Id
),
234 Sy
(Left_Opnd
, Node_Id
),
235 Sy
(Right_Opnd
, Node_Id
),
236 Sm
(Do_Division_Check
, Flag
),
237 Sm
(Rounded_Result
, Flag
)));
239 Cc
(N_Op_Mod
, N_Multiplying_Operator
,
240 (Sm
(Chars
, Name_Id
),
241 Sy
(Left_Opnd
, Node_Id
),
242 Sy
(Right_Opnd
, Node_Id
),
243 Sm
(Do_Division_Check
, Flag
)));
245 Cc
(N_Op_Multiply
, N_Multiplying_Operator
,
246 (Sm
(Chars
, Name_Id
),
247 Sy
(Left_Opnd
, Node_Id
),
248 Sy
(Right_Opnd
, Node_Id
),
249 Sm
(Rounded_Result
, Flag
)));
251 Cc
(N_Op_Rem
, N_Multiplying_Operator
,
252 (Sm
(Chars
, Name_Id
),
253 Sy
(Left_Opnd
, Node_Id
),
254 Sy
(Right_Opnd
, Node_Id
),
255 Sm
(Do_Division_Check
, Flag
)));
257 Ab
(N_Op_Boolean
, N_Binary_Op
);
258 -- Binary operators that take operands of a boolean type, and yield a
259 -- result of a boolean type.
261 Cc
(N_Op_And
, N_Op_Boolean
,
262 (Sm
(Chars
, Name_Id
),
263 Sy
(Left_Opnd
, Node_Id
),
264 Sy
(Right_Opnd
, Node_Id
),
265 Sm
(Do_Length_Check
, Flag
)));
267 Ab
(N_Op_Compare
, N_Op_Boolean
);
269 Cc
(N_Op_Eq
, N_Op_Compare
,
270 (Sm
(Chars
, Name_Id
),
271 Sy
(Left_Opnd
, Node_Id
),
272 Sy
(Right_Opnd
, Node_Id
)));
274 Cc
(N_Op_Ge
, N_Op_Compare
,
275 (Sm
(Chars
, Name_Id
),
276 Sy
(Left_Opnd
, Node_Id
),
277 Sy
(Right_Opnd
, Node_Id
)));
279 Cc
(N_Op_Gt
, N_Op_Compare
,
280 (Sm
(Chars
, Name_Id
),
281 Sy
(Left_Opnd
, Node_Id
),
282 Sy
(Right_Opnd
, Node_Id
)));
284 Cc
(N_Op_Le
, N_Op_Compare
,
285 (Sm
(Chars
, Name_Id
),
286 Sy
(Left_Opnd
, Node_Id
),
287 Sy
(Right_Opnd
, Node_Id
)));
289 Cc
(N_Op_Lt
, N_Op_Compare
,
290 (Sm
(Chars
, Name_Id
),
291 Sy
(Left_Opnd
, Node_Id
),
292 Sy
(Right_Opnd
, Node_Id
)));
294 Cc
(N_Op_Ne
, N_Op_Compare
,
295 (Sm
(Chars
, Name_Id
),
296 Sy
(Left_Opnd
, Node_Id
),
297 Sy
(Right_Opnd
, Node_Id
)));
299 Cc
(N_Op_Or
, N_Op_Boolean
,
300 (Sm
(Chars
, Name_Id
),
301 Sy
(Left_Opnd
, Node_Id
),
302 Sy
(Right_Opnd
, Node_Id
),
303 Sm
(Do_Length_Check
, Flag
)));
305 Cc
(N_Op_Xor
, N_Op_Boolean
,
306 (Sm
(Chars
, Name_Id
),
307 Sy
(Left_Opnd
, Node_Id
),
308 Sy
(Right_Opnd
, Node_Id
),
309 Sm
(Do_Length_Check
, Flag
)));
311 Ab
(N_Op_Shift
, N_Binary_Op
,
312 (Sm
(Shift_Count_OK
, Flag
)));
314 Cc
(N_Op_Rotate_Left
, N_Op_Shift
,
315 (Sm
(Chars
, Name_Id
),
316 Sy
(Left_Opnd
, Node_Id
),
317 Sy
(Right_Opnd
, Node_Id
)));
319 Cc
(N_Op_Rotate_Right
, N_Op_Shift
,
320 (Sm
(Chars
, Name_Id
),
321 Sy
(Left_Opnd
, Node_Id
),
322 Sy
(Right_Opnd
, Node_Id
)));
324 Cc
(N_Op_Shift_Left
, N_Op_Shift
,
325 (Sm
(Chars
, Name_Id
),
326 Sy
(Left_Opnd
, Node_Id
),
327 Sy
(Right_Opnd
, Node_Id
)));
329 Cc
(N_Op_Shift_Right
, N_Op_Shift
,
330 (Sm
(Chars
, Name_Id
),
331 Sy
(Left_Opnd
, Node_Id
),
332 Sy
(Right_Opnd
, Node_Id
)));
334 Cc
(N_Op_Shift_Right_Arithmetic
, N_Op_Shift
,
335 (Sm
(Chars
, Name_Id
),
336 Sy
(Left_Opnd
, Node_Id
),
337 Sy
(Right_Opnd
, Node_Id
)));
339 Ab
(N_Unary_Op
, N_Op
);
341 Cc
(N_Op_Abs
, N_Unary_Op
,
342 (Sm
(Chars
, Name_Id
),
343 Sy
(Right_Opnd
, Node_Id
)));
345 Cc
(N_Op_Minus
, N_Unary_Op
,
346 (Sm
(Chars
, Name_Id
),
347 Sy
(Right_Opnd
, Node_Id
)));
349 Cc
(N_Op_Not
, N_Unary_Op
,
350 (Sm
(Chars
, Name_Id
),
351 Sy
(Right_Opnd
, Node_Id
)));
353 Cc
(N_Op_Plus
, N_Unary_Op
,
354 (Sm
(Chars
, Name_Id
),
355 Sy
(Right_Opnd
, Node_Id
)));
357 Cc
(N_Attribute_Reference
, N_Has_Entity
,
358 (Sy
(Prefix
, Node_Id
),
359 Sy
(Attribute_Name
, Name_Id
),
360 Sy
(Expressions
, List_Id
, Default_No_List
),
361 Sm
(Do_Overflow_Check
, Flag
),
362 Sm
(Header_Size_Added
, Flag
),
363 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
364 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
365 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
366 Sm
(Must_Be_Byte_Aligned
, Flag
),
367 Sm
(Redundant_Use
, Flag
)));
369 Ab
(N_Membership_Test
, N_Subexpr
);
371 Cc
(N_In
, N_Membership_Test
,
372 (Sy
(Left_Opnd
, Node_Id
),
373 Sy
(Right_Opnd
, Node_Id
),
374 Sy
(Alternatives
, List_Id
, Default_No_List
),
375 Sy
(No_Minimize_Eliminate
, Flag
)));
377 Cc
(N_Not_In
, N_Membership_Test
,
378 (Sy
(Left_Opnd
, Node_Id
),
379 Sy
(Right_Opnd
, Node_Id
),
380 Sy
(Alternatives
, List_Id
, Default_No_List
),
381 Sy
(No_Minimize_Eliminate
, Flag
)));
383 Ab
(N_Short_Circuit
, N_Subexpr
);
385 Cc
(N_And_Then
, N_Short_Circuit
,
386 (Sy
(Left_Opnd
, Node_Id
),
387 Sy
(Right_Opnd
, Node_Id
),
388 Sm
(Actions
, List_Id
)));
390 Cc
(N_Or_Else
, N_Short_Circuit
,
391 (Sy
(Left_Opnd
, Node_Id
),
392 Sy
(Right_Opnd
, Node_Id
),
393 Sm
(Actions
, List_Id
)));
395 Ab
(N_Subprogram_Call
, N_Subexpr
,
396 (Sm
(Controlling_Argument
, Node_Id
),
397 Sm
(First_Named_Actual
, Node_Id
),
398 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
399 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
400 Sm
(Is_Known_Guaranteed_ABE
, Flag
),
401 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
402 Sm
(No_Elaboration_Check
, Flag
)));
404 Cc
(N_Function_Call
, N_Subprogram_Call
,
405 (Sy
(Name
, Node_Id
, Default_Empty
),
406 Sy
(Parameter_Associations
, List_Id
, Default_No_List
),
407 Sm
(Is_Expanded_Build_In_Place_Call
, Flag
)));
409 Cc
(N_Procedure_Call_Statement
, N_Subprogram_Call
,
410 (Sy
(Name
, Node_Id
, Default_Empty
),
411 Sy
(Parameter_Associations
, List_Id
, Default_No_List
)));
413 Ab
(N_Raise_xxx_Error
, N_Subexpr
);
415 Cc
(N_Raise_Constraint_Error
, N_Raise_xxx_Error
,
416 (Sy
(Condition
, Node_Id
, Default_Empty
),
419 Cc
(N_Raise_Program_Error
, N_Raise_xxx_Error
,
420 (Sy
(Condition
, Node_Id
, Default_Empty
),
423 Cc
(N_Raise_Storage_Error
, N_Raise_xxx_Error
,
424 (Sy
(Condition
, Node_Id
, Default_Empty
),
427 Ab
(N_Numeric_Or_String_Literal
, N_Subexpr
);
429 Cc
(N_Integer_Literal
, N_Numeric_Or_String_Literal
,
430 (Sy
(Intval
, Valid_Uint
),
431 Sm
(Original_Entity
, Node_Id
),
432 Sm
(Print_In_Hex
, Flag
)));
434 Cc
(N_Real_Literal
, N_Numeric_Or_String_Literal
,
435 (Sy
(Realval
, Ureal
),
436 Sm
(Corresponding_Integer_Value
, Valid_Uint
),
437 Sm
(Is_Machine_Number
, Flag
),
438 Sm
(Original_Entity
, Node_Id
)));
440 Cc
(N_String_Literal
, N_Numeric_Or_String_Literal
,
441 (Sy
(Strval
, String_Id
),
442 Sy
(Is_Folded_In_Parser
, Flag
),
443 Sm
(Has_Wide_Character
, Flag
),
444 Sm
(Has_Wide_Wide_Character
, Flag
)));
446 Cc
(N_Interpolated_String_Literal
, N_Numeric_Or_String_Literal
,
447 (Sy
(Expressions
, List_Id
, Default_No_List
)));
449 Cc
(N_Explicit_Dereference
, N_Subexpr
,
450 (Sy
(Prefix
, Node_Id
),
451 Sm
(Actual_Designated_Subtype
, Node_Id
),
452 Sm
(Atomic_Sync_Required
, Flag
),
453 Sm
(Has_Dereference_Action
, Flag
)));
455 Cc
(N_Expression_With_Actions
, N_Subexpr
,
456 (Sy
(Actions
, List_Id
, Default_No_List
),
457 Sy
(Expression
, Node_Id
, Default_Empty
)));
459 Cc
(N_If_Expression
, N_Subexpr
,
460 (Sy
(Expressions
, List_Id
, Default_No_List
),
462 Sm
(Do_Overflow_Check
, Flag
),
463 Sm
(Else_Actions
, List_Id
),
464 Sm
(Then_Actions
, List_Id
)));
466 Cc
(N_Indexed_Component
, N_Subexpr
,
467 (Sy
(Prefix
, Node_Id
),
468 Sy
(Expressions
, List_Id
, Default_No_List
),
469 Sm
(Atomic_Sync_Required
, Flag
),
470 Sm
(Generalized_Indexing
, Node_Id
)));
472 Cc
(N_Null
, N_Subexpr
);
474 Cc
(N_Qualified_Expression
, N_Subexpr
,
475 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
476 Sy
(Expression
, Node_Id
, Default_Empty
),
477 Sm
(Is_Qualified_Universal_Literal
, Flag
)));
479 Cc
(N_Quantified_Expression
, N_Subexpr
,
480 (Sy
(Iterator_Specification
, Node_Id
, Default_Empty
),
481 Sy
(Loop_Parameter_Specification
, Node_Id
, Default_Empty
),
482 Sy
(Condition
, Node_Id
, Default_Empty
),
483 Sy
(All_Present
, Flag
)));
485 Cc
(N_Aggregate
, N_Subexpr
,
486 (Sy
(Expressions
, List_Id
, Default_No_List
),
487 Sy
(Component_Associations
, List_Id
, Default_No_List
),
488 Sy
(Null_Record_Present
, Flag
),
489 Sy
(Is_Parenthesis_Aggregate
, Flag
),
490 Sy
(Is_Homogeneous_Aggregate
, Flag
),
491 Sy
(Is_Enum_Array_Aggregate
, Flag
),
492 Sm
(Aggregate_Bounds
, Node_Id
),
493 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Associated_Node
494 Sm
(Compile_Time_Known_Aggregate
, Flag
),
495 Sm
(Expansion_Delayed
, Flag
),
496 Sm
(Has_Self_Reference
, Flag
)));
498 Cc
(N_Allocator
, N_Subexpr
,
499 (Sy
(Expression
, Node_Id
, Default_Empty
),
500 Sy
(Subpool_Handle_Name
, Node_Id
, Default_Empty
),
501 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
502 Sm
(For_Special_Return_Object
, Flag
),
503 Sm
(Do_Storage_Check
, Flag
),
504 Sm
(Is_Dynamic_Coextension
, Flag
),
505 Sm
(Is_Static_Coextension
, Flag
),
506 Sm
(No_Initialization
, Flag
),
507 Sm
(Procedure_To_Call
, Node_Id
),
508 Sm
(Storage_Pool
, Node_Id
)));
510 Cc
(N_Case_Expression
, N_Subexpr
,
511 (Sy
(Expression
, Node_Id
, Default_Empty
),
512 Sy
(Alternatives
, List_Id
, Default_No_List
),
513 Sm
(Do_Overflow_Check
, Flag
)));
515 Cc
(N_Delta_Aggregate
, N_Subexpr
,
516 (Sy
(Expression
, Node_Id
, Default_Empty
),
517 Sy
(Is_Homogeneous_Aggregate
, Flag
),
518 Sy
(Component_Associations
, List_Id
, Default_No_List
)));
520 Cc
(N_Extension_Aggregate
, N_Subexpr
,
521 (Sy
(Ancestor_Part
, Node_Id
),
522 Sy
(Expressions
, List_Id
, Default_No_List
),
523 Sy
(Component_Associations
, List_Id
, Default_No_List
),
524 Sy
(Null_Record_Present
, Flag
),
525 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Associated_Node
526 Sm
(Expansion_Delayed
, Flag
),
527 Sm
(Has_Self_Reference
, Flag
)));
529 Cc
(N_Raise_Expression
, N_Subexpr
,
530 (Sy
(Name
, Node_Id
, Default_Empty
),
531 Sy
(Expression
, Node_Id
, Default_Empty
)));
533 Cc
(N_Range
, N_Subexpr
,
534 (Sy
(Low_Bound
, Node_Id
),
535 Sy
(High_Bound
, Node_Id
),
536 Sm
(Cannot_Be_Superflat
, Flag
),
537 Sm
(Includes_Infinities
, Flag
)));
539 Cc
(N_Reference
, N_Subexpr
,
540 (Sy
(Prefix
, Node_Id
)));
542 Cc
(N_Selected_Component
, N_Subexpr
,
543 (Sy
(Prefix
, Node_Id
),
544 Sy
(Selector_Name
, Node_Id
, Default_Empty
),
545 Sm
(Atomic_Sync_Required
, Flag
),
546 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Associated_Node
547 Sm
(Do_Discriminant_Check
, Flag
),
548 Sm
(Is_In_Discriminant_Check
, Flag
),
549 Sm
(Is_Prefixed_Call
, Flag
)));
551 Cc
(N_Slice
, N_Subexpr
,
552 (Sy
(Prefix
, Node_Id
),
553 Sy
(Discrete_Range
, Node_Id
)));
555 Cc
(N_Target_Name
, N_Subexpr
);
557 Cc
(N_Type_Conversion
, N_Subexpr
,
558 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
559 Sy
(Expression
, Node_Id
, Default_Empty
),
560 Sm
(Conversion_OK
, Flag
),
561 Sm
(Do_Discriminant_Check
, Flag
),
562 Sm
(Do_Length_Check
, Flag
),
563 Sm
(Do_Overflow_Check
, Flag
),
564 Sm
(Float_Truncate
, Flag
),
565 Sm
(Rounded_Result
, Flag
)));
567 Cc
(N_Unchecked_Expression
, N_Subexpr
,
568 (Sy
(Expression
, Node_Id
, Default_Empty
)));
570 Cc
(N_Unchecked_Type_Conversion
, N_Subexpr
,
571 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
572 Sy
(Expression
, Node_Id
, Default_Empty
),
573 Sm
(Kill_Range_Check
, Flag
),
574 Sm
(No_Truncation
, Flag
)),
575 Nmake_Assert
=> "True or else Nkind (Expression) /= N_Unchecked_Type_Conversion");
576 -- Nmake_Assert => "Nkind (Expression) /= N_Unchecked_Type_Conversion");
577 -- Assert that we don't have unchecked conversions of unchecked
578 -- conversions; if Expression might be an unchecked conversion,
579 -- then Tbuild.Unchecked_Convert_To should be used.
581 Cc
(N_Subtype_Indication
, N_Has_Etype
,
582 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
583 Sy
(Constraint
, Node_Id
),
584 Sm
(Must_Not_Freeze
, Flag
)));
586 Ab
(N_Declaration
, Node_Kind
);
587 -- Note: this includes all constructs normally thought of as declarations
588 -- except those that are separately grouped in N_Later_Decl_Item. But
589 -- Declaration_Node may return yet more node types; see N_Is_Decl below.
591 Cc
(N_Component_Declaration
, N_Declaration
,
592 (Sy
(Defining_Identifier
, Node_Id
),
593 Sy
(Component_Definition
, Node_Id
),
594 Sy
(Expression
, Node_Id
, Default_Empty
),
596 Sm
(Prev_Ids
, Flag
)));
598 Cc
(N_Entry_Declaration
, N_Declaration
,
599 (Sy
(Defining_Identifier
, Node_Id
),
600 Sy
(Discrete_Subtype_Definition
, Node_Id
, Default_Empty
),
601 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
602 Sy
(Must_Override
, Flag
),
603 Sy
(Must_Not_Override
, Flag
),
604 Sm
(Corresponding_Body
, Node_Id
)));
606 Cc
(N_Expression_Function
, N_Declaration
,
607 (Sy
(Specification
, Node_Id
),
608 Sy
(Expression
, Node_Id
, Default_Empty
),
609 Sm
(Corresponding_Spec
, Node_Id
)));
611 Cc
(N_Formal_Object_Declaration
, N_Declaration
,
612 (Sy
(Defining_Identifier
, Node_Id
),
613 Sy
(In_Present
, Flag
),
614 Sy
(Out_Present
, Flag
),
615 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
616 Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
617 Sy
(Access_Definition
, Node_Id
, Default_Empty
),
618 Sy
(Default_Expression
, Node_Id
, Default_Empty
),
620 Sm
(Prev_Ids
, Flag
)));
622 Cc
(N_Formal_Type_Declaration
, N_Declaration
,
623 (Sy
(Defining_Identifier
, Node_Id
),
624 Sy
(Formal_Type_Definition
, Node_Id
),
625 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
626 Sy
(Unknown_Discriminants_Present
, Flag
),
627 Sy
(Default_Subtype_Mark
, Node_Id
)));
629 Cc
(N_Full_Type_Declaration
, N_Declaration
,
630 (Sy
(Defining_Identifier
, Node_Id
),
631 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
632 Sy
(Type_Definition
, Node_Id
),
633 Sm
(Discr_Check_Funcs_Built
, Flag
),
634 Sm
(Incomplete_View
, Node_Id
)));
636 Cc
(N_Incomplete_Type_Declaration
, N_Declaration
,
637 (Sy
(Defining_Identifier
, Node_Id
),
638 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
639 Sy
(Unknown_Discriminants_Present
, Flag
),
640 Sy
(Tagged_Present
, Flag
),
641 Sm
(Premature_Use
, Node_Id
)));
643 Cc
(N_Iterator_Specification
, N_Declaration
,
644 (Sy
(Defining_Identifier
, Node_Id
),
645 Sy
(Name
, Node_Id
, Default_Empty
),
646 Sy
(Reverse_Present
, Flag
),
647 Sy
(Of_Present
, Flag
),
648 Sy
(Iterator_Filter
, Node_Id
, Default_Empty
),
649 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
)));
651 Cc
(N_Loop_Parameter_Specification
, N_Declaration
,
652 (Sy
(Defining_Identifier
, Node_Id
),
653 Sy
(Reverse_Present
, Flag
),
654 Sy
(Iterator_Filter
, Node_Id
, Default_Empty
),
655 Sy
(Discrete_Subtype_Definition
, Node_Id
, Default_Empty
)));
657 Cc
(N_Object_Declaration
, N_Declaration
,
658 (Sy
(Defining_Identifier
, Node_Id
),
659 Sy
(Aliased_Present
, Flag
),
660 Sy
(Constant_Present
, Flag
),
661 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
662 Sy
(Object_Definition
, Node_Id
),
663 Sy
(Expression
, Node_Id
, Default_Empty
),
664 Sy
(Has_Init_Expression
, Flag
),
665 Sm
(Assignment_OK
, Flag
),
666 Sm
(Corresponding_Generic_Association
, Node_Id
),
667 Sm
(Exception_Junk
, Flag
),
668 Sm
(Handler_List_Entry
, Node_Id
),
669 Sm
(Is_Subprogram_Descriptor
, Flag
),
671 Sm
(No_Initialization
, Flag
),
673 Sm
(Suppress_Assignment_Checks
, Flag
)));
675 Cc
(N_Protected_Type_Declaration
, N_Declaration
,
676 (Sy
(Defining_Identifier
, Node_Id
),
677 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
678 Sy
(Interface_List
, List_Id
, Default_No_List
),
679 Sy
(Protected_Definition
, Node_Id
),
680 Sm
(Corresponding_Body
, Node_Id
)));
682 Cc
(N_Private_Extension_Declaration
, N_Declaration
,
683 (Sy
(Defining_Identifier
, Node_Id
),
684 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
685 Sy
(Unknown_Discriminants_Present
, Flag
),
686 Sy
(Abstract_Present
, Flag
),
687 Sy
(Limited_Present
, Flag
),
688 Sy
(Synchronized_Present
, Flag
),
689 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
),
690 Sy
(Interface_List
, List_Id
, Default_No_List
),
691 Sm
(Uninitialized_Variable
, Node_Id
)));
693 Cc
(N_Private_Type_Declaration
, N_Declaration
,
694 (Sy
(Defining_Identifier
, Node_Id
),
695 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
696 Sy
(Unknown_Discriminants_Present
, Flag
),
697 Sy
(Abstract_Present
, Flag
),
698 Sy
(Tagged_Present
, Flag
),
699 Sy
(Limited_Present
, Flag
)));
701 Cc
(N_Subtype_Declaration
, N_Declaration
,
702 (Sy
(Defining_Identifier
, Node_Id
),
703 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
704 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
),
705 Sm
(Exception_Junk
, Flag
),
706 Sm
(Generic_Parent_Type
, Node_Id
)));
708 Ab
(N_Subprogram_Specification
, N_Declaration
,
709 (Sm
(Generic_Parent
, Node_Id
)));
711 Cc
(N_Function_Specification
, N_Subprogram_Specification
,
712 (Sy
(Defining_Unit_Name
, Node_Id
),
713 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
714 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
715 Sy
(Result_Definition
, Node_Id
),
716 Sy
(Must_Override
, Flag
),
717 Sy
(Must_Not_Override
, Flag
)));
719 Cc
(N_Procedure_Specification
, N_Subprogram_Specification
,
720 (Sy
(Defining_Unit_Name
, Node_Id
),
721 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
722 Sy
(Null_Present
, Flag
),
723 Sy
(Must_Override
, Flag
),
724 Sy
(Must_Not_Override
, Flag
),
725 Sm
(Null_Statement
, Node_Id
)));
727 Ab
(N_Access_To_Subprogram_Definition
, Node_Kind
);
729 Cc
(N_Access_Function_Definition
, N_Access_To_Subprogram_Definition
,
730 (Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
731 Sy
(Null_Exclusion_In_Return_Present
, Flag
),
732 Sy
(Protected_Present
, Flag
),
733 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
734 Sy
(Result_Definition
, Node_Id
)));
736 Cc
(N_Access_Procedure_Definition
, N_Access_To_Subprogram_Definition
,
737 (Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
738 Sy
(Protected_Present
, Flag
),
739 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
)));
741 Ab
(N_Later_Decl_Item
, Node_Kind
);
742 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and includes
743 -- only those items which can appear as later declarative items. This also
744 -- includes N_Implicit_Label_Declaration which is not specifically in the
745 -- grammar but may appear as a valid later declarative items. It does NOT
746 -- include N_Pragma which can also appear among later declarative items.
747 -- It does however include N_Protected_Body, which is a bit peculiar, but
748 -- harmless since this cannot appear in Ada 83 mode anyway.
750 Cc
(N_Task_Type_Declaration
, N_Later_Decl_Item
,
751 (Sy
(Defining_Identifier
, Node_Id
),
752 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
753 Sy
(Interface_List
, List_Id
, Default_No_List
),
754 Sy
(Task_Definition
, Node_Id
, Default_Empty
),
755 Sm
(Corresponding_Body
, Node_Id
)));
757 Ab
(N_Body_Stub
, N_Later_Decl_Item
,
758 (Sm
(Corresponding_Body
, Node_Id
),
759 Sm
(Corresponding_Spec_Of_Stub
, Node_Id
),
760 Sm
(Library_Unit
, Node_Id
)));
762 Cc
(N_Package_Body_Stub
, N_Body_Stub
,
763 (Sy
(Defining_Identifier
, Node_Id
)));
765 Cc
(N_Protected_Body_Stub
, N_Body_Stub
,
766 (Sy
(Defining_Identifier
, Node_Id
)));
768 Cc
(N_Subprogram_Body_Stub
, N_Body_Stub
,
769 (Sy
(Specification
, Node_Id
)));
771 Cc
(N_Task_Body_Stub
, N_Body_Stub
,
772 (Sy
(Defining_Identifier
, Node_Id
)));
774 Ab
(N_Generic_Instantiation
, N_Later_Decl_Item
,
775 (Sm
(Instance_Spec
, Node_Id
),
776 Sm
(Is_Declaration_Level_Node
, Flag
),
777 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
778 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
779 Sm
(Is_Known_Guaranteed_ABE
, Flag
),
780 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
781 Sm
(Parent_Spec
, Node_Id
)));
783 Ab
(N_Subprogram_Instantiation
, N_Generic_Instantiation
);
785 Cc
(N_Function_Instantiation
, N_Subprogram_Instantiation
,
786 (Sy
(Defining_Unit_Name
, Node_Id
),
787 Sy
(Name
, Node_Id
, Default_Empty
),
788 Sy
(Generic_Associations
, List_Id
, Default_No_List
),
789 Sy
(Must_Override
, Flag
),
790 Sy
(Must_Not_Override
, Flag
)));
792 Cc
(N_Procedure_Instantiation
, N_Subprogram_Instantiation
,
793 (Sy
(Defining_Unit_Name
, Node_Id
),
794 Sy
(Name
, Node_Id
, Default_Empty
),
795 Sy
(Generic_Associations
, List_Id
, Default_No_List
),
796 Sy
(Must_Override
, Flag
),
797 Sy
(Must_Not_Override
, Flag
)));
799 Cc
(N_Package_Instantiation
, N_Generic_Instantiation
,
800 (Sy
(Defining_Unit_Name
, Node_Id
),
801 Sy
(Name
, Node_Id
, Default_Empty
),
802 Sy
(Generic_Associations
, List_Id
, Default_No_List
)));
804 Ab
(N_Proper_Body
, N_Later_Decl_Item
,
805 (Sm
(Corresponding_Spec
, Node_Id
),
806 Sm
(Was_Originally_Stub
, Flag
)));
808 Ab
(N_Unit_Body
, N_Proper_Body
);
810 Cc
(N_Package_Body
, N_Unit_Body
,
811 (Sy
(Defining_Unit_Name
, Node_Id
),
812 Sy
(Declarations
, List_Id
, Default_No_List
),
813 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
814 Sy
(At_End_Proc
, Node_Id
, Default_Empty
)));
816 Cc
(N_Subprogram_Body
, N_Unit_Body
,
817 (Sy
(Specification
, Node_Id
),
818 Sy
(Declarations
, List_Id
, Default_No_List
),
819 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
820 Sy
(Bad_Is_Detected
, Flag
),
821 Sy
(At_End_Proc
, Node_Id
, Default_Empty
),
822 Sm
(Activation_Chain_Entity
, Node_Id
),
823 Sm
(Acts_As_Spec
, Flag
),
824 Sm
(Corresponding_Entry_Body
, Node_Id
),
825 Sm
(Do_Storage_Check
, Flag
),
826 Sm
(Has_Relative_Deadline_Pragma
, Flag
),
827 Sm
(Is_Entry_Barrier_Function
, Flag
),
828 Sm
(Is_Protected_Subprogram_Body
, Flag
),
829 Sm
(Is_Task_Body_Procedure
, Flag
),
830 Sm
(Is_Task_Master
, Flag
),
831 Sm
(Was_Attribute_Reference
, Flag
),
832 Sm
(Was_Expression_Function
, Flag
)));
834 Cc
(N_Protected_Body
, N_Proper_Body
,
835 (Sy
(Defining_Identifier
, Node_Id
),
836 Sy
(Declarations
, List_Id
, Default_No_List
),
837 Sy
(End_Label
, Node_Id
, Default_Empty
)));
839 Cc
(N_Task_Body
, N_Proper_Body
,
840 (Sy
(Defining_Identifier
, Node_Id
),
841 Sy
(Declarations
, List_Id
, Default_No_List
),
842 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
843 Sy
(At_End_Proc
, Node_Id
, Default_Empty
),
844 Sm
(Activation_Chain_Entity
, Node_Id
),
845 Sm
(Is_Task_Master
, Flag
)));
847 Cc
(N_Implicit_Label_Declaration
, N_Later_Decl_Item
,
848 (Sy
(Defining_Identifier
, Node_Id
),
849 Sm
(Label_Construct
, Node_Id
)));
851 Cc
(N_Package_Declaration
, N_Later_Decl_Item
,
852 (Sy
(Specification
, Node_Id
),
853 Sm
(Activation_Chain_Entity
, Node_Id
),
854 Sm
(Corresponding_Body
, Node_Id
),
855 Sm
(Parent_Spec
, Node_Id
)));
857 Cc
(N_Single_Task_Declaration
, N_Later_Decl_Item
,
858 (Sy
(Defining_Identifier
, Node_Id
),
859 Sy
(Interface_List
, List_Id
, Default_No_List
),
860 Sy
(Task_Definition
, Node_Id
, Default_Empty
)));
862 Cc
(N_Subprogram_Declaration
, N_Later_Decl_Item
,
863 (Sy
(Specification
, Node_Id
),
864 Sm
(Body_To_Inline
, Node_Id
),
865 Sm
(Corresponding_Body
, Node_Id
),
866 Sm
(Is_Entry_Barrier_Function
, Flag
),
867 Sm
(Is_Task_Body_Procedure
, Flag
),
868 Sm
(Parent_Spec
, Node_Id
)));
870 Cc
(N_Use_Package_Clause
, N_Later_Decl_Item
,
871 (Sy
(Name
, Node_Id
, Default_Empty
),
872 Sy
(Is_Effective_Use_Clause
, Flag
),
873 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Associated_Node
874 Sm
(Hidden_By_Use_Clause
, Elist_Id
),
876 Sm
(Next_Use_Clause
, Node_Id
),
878 Sm
(Prev_Use_Clause
, Node_Id
)));
880 Ab
(N_Generic_Declaration
, N_Later_Decl_Item
,
881 (Sm
(Corresponding_Body
, Node_Id
),
882 Sm
(Parent_Spec
, Node_Id
)));
884 Cc
(N_Generic_Package_Declaration
, N_Generic_Declaration
,
885 (Sy
(Specification
, Node_Id
),
886 Sy
(Generic_Formal_Declarations
, List_Id
),
887 Sm
(Activation_Chain_Entity
, Node_Id
)));
889 Cc
(N_Generic_Subprogram_Declaration
, N_Generic_Declaration
,
890 (Sy
(Specification
, Node_Id
),
891 Sy
(Generic_Formal_Declarations
, List_Id
)));
893 Ab
(N_Array_Type_Definition
, Node_Kind
);
895 Cc
(N_Constrained_Array_Definition
, N_Array_Type_Definition
,
896 (Sy
(Discrete_Subtype_Definitions
, List_Id
),
897 Sy
(Component_Definition
, Node_Id
)));
899 Cc
(N_Unconstrained_Array_Definition
, N_Array_Type_Definition
,
900 (Sy
(Subtype_Marks
, List_Id
),
901 Sy
(Component_Definition
, Node_Id
)));
903 Ab
(N_Renaming_Declaration
, Node_Kind
);
905 Cc
(N_Exception_Renaming_Declaration
, N_Renaming_Declaration
,
906 (Sy
(Defining_Identifier
, Node_Id
),
907 Sy
(Name
, Node_Id
, Default_Empty
)));
909 Cc
(N_Object_Renaming_Declaration
, N_Renaming_Declaration
,
910 (Sy
(Defining_Identifier
, Node_Id
),
911 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
912 Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
913 Sy
(Access_Definition
, Node_Id
, Default_Empty
),
914 Sy
(Name
, Node_Id
, Default_Empty
),
915 Sm
(Comes_From_Iterator
, Flag
),
916 Sm
(Corresponding_Generic_Association
, Node_Id
)));
918 Cc
(N_Package_Renaming_Declaration
, N_Renaming_Declaration
,
919 (Sy
(Defining_Unit_Name
, Node_Id
),
920 Sy
(Name
, Node_Id
, Default_Empty
),
921 Sm
(Parent_Spec
, Node_Id
)));
923 Cc
(N_Subprogram_Renaming_Declaration
, N_Renaming_Declaration
,
924 (Sy
(Specification
, Node_Id
),
925 Sy
(Name
, Node_Id
, Default_Empty
),
926 Sm
(Corresponding_Formal_Spec
, Node_Id
),
927 Sm
(Corresponding_Spec
, Node_Id
),
928 Sm
(From_Default
, Flag
),
929 Sm
(Parent_Spec
, Node_Id
)));
931 Ab
(N_Generic_Renaming_Declaration
, N_Renaming_Declaration
,
932 (Sm
(Parent_Spec
, Node_Id
)));
934 Cc
(N_Generic_Function_Renaming_Declaration
, N_Generic_Renaming_Declaration
,
935 (Sy
(Defining_Unit_Name
, Node_Id
),
936 Sy
(Name
, Node_Id
, Default_Empty
)));
938 Cc
(N_Generic_Package_Renaming_Declaration
, N_Generic_Renaming_Declaration
,
939 (Sy
(Defining_Unit_Name
, Node_Id
),
940 Sy
(Name
, Node_Id
, Default_Empty
)));
942 Cc
(N_Generic_Procedure_Renaming_Declaration
, N_Generic_Renaming_Declaration
,
943 (Sy
(Defining_Unit_Name
, Node_Id
),
944 Sy
(Name
, Node_Id
, Default_Empty
)));
946 Ab
(N_Statement_Other_Than_Procedure_Call
, Node_Kind
);
947 -- Note that this includes all statement types except for the cases of the
948 -- N_Procedure_Call_Statement which is considered to be a subexpression
949 -- (since overloading is possible, so it needs to go through the normal
950 -- overloading resolution for expressions).
952 Cc
(N_Abort_Statement
, N_Statement_Other_Than_Procedure_Call
,
953 (Sy
(Names
, List_Id
)));
955 Cc
(N_Accept_Statement
, N_Statement_Other_Than_Procedure_Call
,
956 (Sy
(Entry_Direct_Name
, Node_Id
),
957 Sy
(Entry_Index
, Node_Id
, Default_Empty
),
958 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
959 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
960 Sy
(Declarations
, List_Id
, Default_No_List
)));
962 Cc
(N_Assignment_Statement
, N_Statement_Other_Than_Procedure_Call
,
963 (Sy
(Name
, Node_Id
, Default_Empty
),
964 Sy
(Expression
, Node_Id
, Default_Empty
),
965 Sm
(Backwards_OK
, Flag
),
966 Sm
(Componentwise_Assignment
, Flag
),
967 Sm
(Do_Discriminant_Check
, Flag
),
968 Sm
(Do_Length_Check
, Flag
),
969 Sm
(Forwards_OK
, Flag
),
970 Sm
(Has_Target_Names
, Flag
),
971 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
972 Sm
(Is_Elaboration_Code
, Flag
),
973 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
974 Sm
(No_Ctrl_Actions
, Flag
),
975 Sm
(No_Finalize_Actions
, Flag
),
976 Sm
(Suppress_Assignment_Checks
, Flag
)));
978 Cc
(N_Asynchronous_Select
, N_Statement_Other_Than_Procedure_Call
,
979 (Sy
(Triggering_Alternative
, Node_Id
),
980 Sy
(Abortable_Part
, Node_Id
)));
982 Cc
(N_Block_Statement
, N_Statement_Other_Than_Procedure_Call
,
983 (Sy
(Identifier
, Node_Id
, Default_Empty
),
984 Sy
(Declarations
, List_Id
, Default_No_List
),
985 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
986 Sy
(Has_Created_Identifier
, Flag
),
987 Sy
(Is_Asynchronous_Call_Block
, Flag
),
988 Sy
(Is_Task_Allocation_Block
, Flag
),
989 Sy
(At_End_Proc
, Node_Id
, Default_Empty
),
990 Sm
(Activation_Chain_Entity
, Node_Id
),
991 Sm
(Cleanup_Actions
, List_Id
),
992 Sm
(Exception_Junk
, Flag
),
993 Sm
(Is_Abort_Block
, Flag
),
994 Sm
(Is_Finalization_Wrapper
, Flag
),
995 Sm
(Is_Initialization_Block
, Flag
),
996 Sm
(Is_Task_Master
, Flag
)));
998 Cc
(N_Case_Statement
, N_Statement_Other_Than_Procedure_Call
,
999 (Sy
(Expression
, Node_Id
, Default_Empty
),
1000 Sy
(Alternatives
, List_Id
, Default_No_List
),
1001 Sy
(End_Span
, Unat
, Default_Uint_0
),
1002 Sm
(From_Conditional_Expression
, Flag
)));
1004 Cc
(N_Code_Statement
, N_Statement_Other_Than_Procedure_Call
,
1005 (Sy
(Expression
, Node_Id
, Default_Empty
)));
1007 Cc
(N_Compound_Statement
, N_Statement_Other_Than_Procedure_Call
,
1008 (Sy
(Actions
, List_Id
, Default_No_List
)));
1010 Cc
(N_Conditional_Entry_Call
, N_Statement_Other_Than_Procedure_Call
,
1011 (Sy
(Entry_Call_Alternative
, Node_Id
),
1012 Sy
(Else_Statements
, List_Id
, Default_No_List
)));
1014 Ab
(N_Delay_Statement
, N_Statement_Other_Than_Procedure_Call
);
1016 Cc
(N_Delay_Relative_Statement
, N_Delay_Statement
,
1017 (Sy
(Expression
, Node_Id
, Default_Empty
)));
1019 Cc
(N_Delay_Until_Statement
, N_Delay_Statement
,
1020 (Sy
(Expression
, Node_Id
, Default_Empty
)));
1022 Cc
(N_Entry_Call_Statement
, N_Statement_Other_Than_Procedure_Call
,
1023 (Sy
(Name
, Node_Id
, Default_Empty
),
1024 Sy
(Parameter_Associations
, List_Id
, Default_No_List
),
1025 Sm
(First_Named_Actual
, Node_Id
),
1026 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
1027 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
1028 Sm
(Is_SPARK_Mode_On_Node
, Flag
)));
1030 Cc
(N_Free_Statement
, N_Statement_Other_Than_Procedure_Call
,
1031 (Sy
(Expression
, Node_Id
, Default_Empty
),
1032 Sm
(Actual_Designated_Subtype
, Node_Id
),
1033 Sm
(Procedure_To_Call
, Node_Id
),
1034 Sm
(Storage_Pool
, Node_Id
)));
1036 Cc
(N_Goto_Statement
, N_Statement_Other_Than_Procedure_Call
,
1037 (Sy
(Name
, Node_Id
, Default_Empty
),
1038 Sm
(Exception_Junk
, Flag
)));
1040 Cc
(N_Goto_When_Statement
, N_Statement_Other_Than_Procedure_Call
,
1041 (Sy
(Name
, Node_Id
, Default_Empty
),
1042 Sy
(Condition
, Node_Id
, Default_Empty
)));
1044 Cc
(N_Loop_Statement
, N_Statement_Other_Than_Procedure_Call
,
1045 (Sy
(Identifier
, Node_Id
, Default_Empty
),
1046 Sy
(Iteration_Scheme
, Node_Id
, Default_Empty
),
1047 Sy
(Statements
, List_Id
, Default_Empty_List
),
1048 Sy
(End_Label
, Node_Id
, Default_Empty
),
1049 Sy
(Has_Created_Identifier
, Flag
),
1050 Sy
(Is_Null_Loop
, Flag
),
1051 Sy
(Suppress_Loop_Warnings
, Flag
)));
1053 Cc
(N_Null_Statement
, N_Statement_Other_Than_Procedure_Call
,
1054 (Sm
(Next_Rep_Item
, Node_Id
)));
1056 Cc
(N_Raise_Statement
, N_Statement_Other_Than_Procedure_Call
,
1057 (Sy
(Name
, Node_Id
, Default_Empty
),
1058 Sy
(Expression
, Node_Id
, Default_Empty
)));
1060 Cc
(N_Raise_When_Statement
, N_Statement_Other_Than_Procedure_Call
,
1061 (Sy
(Name
, Node_Id
, Default_Empty
),
1062 Sy
(Expression
, Node_Id
, Default_Empty
),
1063 Sy
(Condition
, Node_Id
, Default_Empty
)));
1065 Cc
(N_Requeue_Statement
, N_Statement_Other_Than_Procedure_Call
,
1066 (Sy
(Name
, Node_Id
, Default_Empty
),
1067 Sy
(Abort_Present
, Flag
),
1068 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
1069 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
1070 Sm
(Is_SPARK_Mode_On_Node
, Flag
)));
1072 Cc
(N_Simple_Return_Statement
, N_Statement_Other_Than_Procedure_Call
,
1073 (Sy
(Expression
, Node_Id
, Default_Empty
),
1074 Sm
(Comes_From_Extended_Return_Statement
, Flag
),
1075 Sm
(Procedure_To_Call
, Node_Id
),
1076 Sm
(Return_Statement_Entity
, Node_Id
),
1077 Sm
(Storage_Pool
, Node_Id
)));
1079 Cc
(N_Extended_Return_Statement
, N_Statement_Other_Than_Procedure_Call
,
1080 (Sy
(Return_Object_Declarations
, List_Id
),
1081 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
1082 Sm
(Procedure_To_Call
, Node_Id
),
1083 Sm
(Return_Statement_Entity
, Node_Id
),
1084 Sm
(Storage_Pool
, Node_Id
)));
1086 Cc
(N_Return_When_Statement
, N_Statement_Other_Than_Procedure_Call
,
1087 (Sy
(Expression
, Node_Id
, Default_Empty
),
1088 Sy
(Condition
, Node_Id
, Default_Empty
)));
1090 Cc
(N_Selective_Accept
, N_Statement_Other_Than_Procedure_Call
,
1091 (Sy
(Select_Alternatives
, List_Id
),
1092 Sy
(Else_Statements
, List_Id
, Default_No_List
)));
1094 Cc
(N_Timed_Entry_Call
, N_Statement_Other_Than_Procedure_Call
,
1095 (Sy
(Entry_Call_Alternative
, Node_Id
),
1096 Sy
(Delay_Alternative
, Node_Id
)));
1098 Cc
(N_Exit_Statement
, N_Statement_Other_Than_Procedure_Call
,
1099 (Sy
(Name
, Node_Id
, Default_Empty
),
1100 Sy
(Condition
, Node_Id
, Default_Empty
),
1101 Sm
(Next_Exit_Statement
, Node_Id
)));
1103 Cc
(N_If_Statement
, N_Statement_Other_Than_Procedure_Call
,
1104 (Sy
(Condition
, Node_Id
, Default_Empty
),
1105 Sy
(Then_Statements
, List_Id
),
1106 Sy
(Elsif_Parts
, List_Id
, Default_No_List
),
1107 Sy
(Else_Statements
, List_Id
, Default_No_List
),
1108 Sy
(End_Span
, Unat
, Default_Uint_0
),
1109 Sm
(From_Conditional_Expression
, Flag
),
1110 Sm
(Comes_From_Check_Or_Contract
, Flag
)));
1112 Cc
(N_Accept_Alternative
, Node_Kind
,
1113 (Sy
(Accept_Statement
, Node_Id
),
1114 Sy
(Condition
, Node_Id
, Default_Empty
),
1115 Sy
(Statements
, List_Id
, Default_Empty_List
),
1116 Sy
(Pragmas_Before
, List_Id
, Default_No_List
),
1117 Sm
(Accept_Handler_Records
, List_Id
)));
1119 Cc
(N_Delay_Alternative
, Node_Kind
,
1120 (Sy
(Delay_Statement
, Node_Id
),
1121 Sy
(Condition
, Node_Id
, Default_Empty
),
1122 Sy
(Statements
, List_Id
, Default_Empty_List
),
1123 Sy
(Pragmas_Before
, List_Id
, Default_No_List
)));
1125 Cc
(N_Elsif_Part
, Node_Kind
,
1126 (Sy
(Condition
, Node_Id
, Default_Empty
),
1127 Sy
(Then_Statements
, List_Id
),
1128 Sm
(Condition_Actions
, List_Id
)));
1130 Cc
(N_Entry_Body_Formal_Part
, Node_Kind
,
1131 (Sy
(Entry_Index_Specification
, Node_Id
, Default_Empty
),
1132 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
1133 Sy
(Condition
, Node_Id
, Default_Empty
)));
1135 Cc
(N_Iteration_Scheme
, Node_Kind
,
1136 (Sy
(Condition
, Node_Id
, Default_Empty
),
1137 Sy
(Iterator_Specification
, Node_Id
, Default_Empty
),
1138 Sy
(Loop_Parameter_Specification
, Node_Id
, Default_Empty
),
1139 Sm
(Condition_Actions
, List_Id
)));
1141 Cc
(N_Terminate_Alternative
, Node_Kind
,
1142 (Sy
(Condition
, Node_Id
, Default_Empty
),
1143 Sy
(Pragmas_Before
, List_Id
, Default_No_List
),
1144 Sy
(Pragmas_After
, List_Id
, Default_No_List
)));
1146 Ab
(N_Formal_Subprogram_Declaration
, Node_Kind
);
1148 Cc
(N_Formal_Abstract_Subprogram_Declaration
, N_Formal_Subprogram_Declaration
,
1149 (Sy
(Specification
, Node_Id
),
1150 Sy
(Default_Name
, Node_Id
, Default_Empty
),
1151 Sy
(Expression
, Node_Id
, Default_Empty
),
1152 Sy
(Box_Present
, Flag
)));
1154 Cc
(N_Formal_Concrete_Subprogram_Declaration
, N_Formal_Subprogram_Declaration
,
1155 (Sy
(Specification
, Node_Id
),
1156 Sy
(Default_Name
, Node_Id
, Default_Empty
),
1157 Sy
(Expression
, Node_Id
, Default_Empty
),
1158 Sy
(Box_Present
, Flag
)));
1160 Ab
(N_Push_Pop_xxx_Label
, Node_Kind
);
1162 Ab
(N_Push_xxx_Label
, N_Push_Pop_xxx_Label
,
1163 (Sm
(Exception_Label
, Node_Id
)));
1165 Cc
(N_Push_Constraint_Error_Label
, N_Push_xxx_Label
);
1167 Cc
(N_Push_Program_Error_Label
, N_Push_xxx_Label
);
1169 Cc
(N_Push_Storage_Error_Label
, N_Push_xxx_Label
);
1171 Ab
(N_Pop_xxx_Label
, N_Push_Pop_xxx_Label
);
1173 Cc
(N_Pop_Constraint_Error_Label
, N_Pop_xxx_Label
);
1175 Cc
(N_Pop_Program_Error_Label
, N_Pop_xxx_Label
);
1177 Cc
(N_Pop_Storage_Error_Label
, N_Pop_xxx_Label
);
1179 Ab
(N_SCIL_Node
, Node_Kind
,
1180 (Sm
(SCIL_Entity
, Node_Id
)));
1182 Cc
(N_SCIL_Dispatch_Table_Tag_Init
, N_SCIL_Node
);
1184 Cc
(N_SCIL_Dispatching_Call
, N_SCIL_Node
,
1185 (Sm
(SCIL_Controlling_Tag
, Node_Id
),
1186 Sm
(SCIL_Target_Prim
, Node_Id
)));
1188 Cc
(N_SCIL_Membership_Test
, N_SCIL_Node
,
1189 (Sm
(SCIL_Tag_Value
, Node_Id
)));
1191 Cc
(N_Abortable_Part
, Node_Kind
,
1192 (Sy
(Statements
, List_Id
, Default_Empty_List
)));
1194 Cc
(N_Abstract_Subprogram_Declaration
, Node_Kind
,
1195 (Sy
(Specification
, Node_Id
)));
1197 Cc
(N_Access_Definition
, Node_Kind
,
1198 (Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1199 Sy
(All_Present
, Flag
),
1200 Sy
(Constant_Present
, Flag
),
1201 Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
1202 Sy
(Access_To_Subprogram_Definition
, Node_Id
, Default_Empty
)));
1204 Cc
(N_Access_To_Object_Definition
, Node_Kind
,
1205 (Sy
(All_Present
, Flag
),
1206 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1207 Sy
(Null_Excluding_Subtype
, Flag
),
1208 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
),
1209 Sy
(Constant_Present
, Flag
)));
1211 Cc
(N_Aspect_Specification
, Node_Kind
,
1212 (Sy
(Identifier
, Node_Id
, Default_Empty
),
1213 Sy
(Expression
, Node_Id
, Default_Empty
),
1214 Sy
(Class_Present
, Flag
),
1215 Sy
(Split_PPC
, Flag
),
1216 Sm
(Aspect_On_Partial_View
, Flag
),
1217 Sm
(Aspect_Rep_Item
, Node_Id
),
1218 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Entity
1219 Sm
(Is_Boolean_Aspect
, Flag
),
1220 Sm
(Is_Checked
, Flag
),
1221 Sm
(Is_Delayed_Aspect
, Flag
),
1222 Sm
(Is_Disabled
, Flag
),
1223 Sm
(Is_Ignored
, Flag
),
1224 Sm
(Next_Rep_Item
, Node_Id
)));
1226 Cc
(N_Call_Marker
, Node_Kind
,
1227 (Sm
(Is_Declaration_Level_Node
, Flag
),
1228 Sm
(Is_Dispatching_Call
, Flag
),
1229 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
1230 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
1231 Sm
(Is_Known_Guaranteed_ABE
, Flag
),
1232 Sm
(Is_Preelaborable_Call
, Flag
),
1233 Sm
(Is_Source_Call
, Flag
),
1234 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
1235 Sm
(Target
, Node_Id
)));
1237 Cc
(N_Case_Expression_Alternative
, Node_Kind
,
1238 (Sm
(Actions
, List_Id
),
1239 Sy
(Discrete_Choices
, List_Id
),
1240 Sy
(Expression
, Node_Id
, Default_Empty
),
1241 Sm
(Has_SP_Choice
, Flag
)));
1243 Cc
(N_Case_Statement_Alternative
, Node_Kind
,
1244 (Sy
(Discrete_Choices
, List_Id
),
1245 Sy
(Statements
, List_Id
, Default_Empty_List
),
1246 Sm
(Has_SP_Choice
, Flag
),
1247 Sm
(Multidefined_Bindings
, Flag
)));
1249 Cc
(N_Compilation_Unit
, Node_Kind
,
1250 (Sy
(Context_Items
, List_Id
),
1251 Sy
(Private_Present
, Flag
),
1253 Sy
(Aux_Decls_Node
, Node_Id
),
1254 Sm
(Acts_As_Spec
, Flag
),
1255 Sm
(Body_Required
, Flag
),
1256 Sm
(Context_Pending
, Flag
),
1257 Sm
(First_Inlined_Subprogram
, Node_Id
),
1258 Sm
(Has_No_Elaboration_Code
, Flag
),
1259 Sm
(Has_Pragma_Suppress_All
, Flag
),
1260 Sm
(Library_Unit
, Node_Id
),
1261 Sm
(Save_Invocation_Graph_Of_Body
, Flag
)));
1263 Cc
(N_Compilation_Unit_Aux
, Node_Kind
,
1264 (Sy
(Declarations
, List_Id
, Default_No_List
),
1265 Sy
(Actions
, List_Id
, Default_No_List
),
1266 Sy
(Pragmas_After
, List_Id
, Default_No_List
),
1267 Sy
(Config_Pragmas
, List_Id
, Default_Empty_List
),
1268 Sm
(Default_Storage_Pool
, Node_Id
)));
1270 Cc
(N_Component_Association
, Node_Kind
,
1271 (Sy
(Choices
, List_Id
),
1272 Sy
(Expression
, Node_Id
, Default_Empty
),
1273 Sy
(Box_Present
, Flag
),
1274 Sy
(Inherited_Discriminant
, Flag
),
1275 Sy
(Binding_Chars
, Name_Id
, Default_No_Name
),
1276 Sm
(Loop_Actions
, List_Id
),
1277 Sm
(Was_Default_Init_Box_Association
, Flag
)));
1279 Cc
(N_Component_Definition
, Node_Kind
,
1280 (Sy
(Aliased_Present
, Flag
),
1281 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1282 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
),
1283 Sy
(Access_Definition
, Node_Id
, Default_Empty
)));
1285 Cc
(N_Component_List
, Node_Kind
,
1286 (Sy
(Component_Items
, List_Id
),
1287 Sy
(Variant_Part
, Node_Id
, Default_Empty
),
1288 Sy
(Null_Present
, Flag
)));
1290 Cc
(N_Contract
, Node_Kind
,
1291 (Sm
(Classifications
, Node_Id
),
1292 Sm
(Contract_Test_Cases
, Node_Id
),
1293 Sm
(Is_Expanded_Contract
, Flag
),
1294 Sm
(Pre_Post_Conditions
, Node_Id
)));
1296 Cc
(N_Derived_Type_Definition
, Node_Kind
,
1297 (Sy
(Abstract_Present
, Flag
),
1298 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1299 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
),
1300 Sy
(Record_Extension_Part
, Node_Id
, Default_Empty
),
1301 Sy
(Limited_Present
, Flag
),
1302 Sy
(Task_Present
, Flag
),
1303 Sy
(Protected_Present
, Flag
),
1304 Sy
(Synchronized_Present
, Flag
),
1305 Sy
(Interface_List
, List_Id
, Default_No_List
),
1306 Sy
(Interface_Present
, Flag
)));
1308 Cc
(N_Decimal_Fixed_Point_Definition
, Node_Kind
,
1309 (Sy
(Delta_Expression
, Node_Id
),
1310 Sy
(Digits_Expression
, Node_Id
),
1311 Sy
(Real_Range_Specification
, Node_Id
, Default_Empty
)));
1313 Cc
(N_Defining_Program_Unit_Name
, Node_Kind
,
1314 (Sy
(Name
, Node_Id
, Default_Empty
),
1315 Sy
(Defining_Identifier
, Node_Id
)));
1317 Cc
(N_Delta_Constraint
, Node_Kind
,
1318 (Sy
(Delta_Expression
, Node_Id
),
1319 Sy
(Range_Constraint
, Node_Id
, Default_Empty
)));
1321 Cc
(N_Designator
, Node_Kind
,
1322 (Sy
(Name
, Node_Id
, Default_Empty
),
1323 Sy
(Identifier
, Node_Id
, Default_Empty
)));
1325 Cc
(N_Digits_Constraint
, Node_Kind
,
1326 (Sy
(Digits_Expression
, Node_Id
),
1327 Sy
(Range_Constraint
, Node_Id
, Default_Empty
)));
1329 Cc
(N_Discriminant_Association
, Node_Kind
,
1330 (Sy
(Selector_Names
, List_Id
),
1331 Sy
(Expression
, Node_Id
, Default_Empty
)));
1333 Cc
(N_Discriminant_Specification
, Node_Kind
,
1334 (Sy
(Defining_Identifier
, Node_Id
),
1335 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1336 Sy
(Discriminant_Type
, Node_Id
),
1337 Sy
(Expression
, Node_Id
, Default_Empty
),
1338 Sm
(More_Ids
, Flag
),
1339 Sm
(Prev_Ids
, Flag
)));
1341 Cc
(N_Enumeration_Type_Definition
, Node_Kind
,
1342 (Sy
(Literals
, List_Id
),
1343 Sy
(End_Label
, Node_Id
, Default_Empty
)));
1345 Cc
(N_Entry_Body
, Node_Kind
,
1346 (Sy
(Defining_Identifier
, Node_Id
),
1347 Sy
(Entry_Body_Formal_Part
, Node_Id
),
1348 Sy
(Declarations
, List_Id
, Default_No_List
),
1349 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
1350 Sy
(At_End_Proc
, Node_Id
, Default_Empty
),
1351 Sm
(Activation_Chain_Entity
, Node_Id
),
1352 Sm
(Corresponding_Spec
, Node_Id
)));
1354 Cc
(N_Entry_Call_Alternative
, Node_Kind
,
1355 (Sy
(Entry_Call_Statement
, Node_Id
),
1356 Sy
(Statements
, List_Id
, Default_Empty_List
),
1357 Sy
(Pragmas_Before
, List_Id
, Default_No_List
)));
1359 Cc
(N_Entry_Index_Specification
, Node_Kind
,
1360 (Sy
(Defining_Identifier
, Node_Id
),
1361 Sy
(Discrete_Subtype_Definition
, Node_Id
, Default_Empty
)));
1363 Cc
(N_Exception_Declaration
, N_Declaration
,
1364 (Sy
(Defining_Identifier
, Node_Id
),
1365 Sm
(Expression
, Node_Id
),
1366 Sm
(More_Ids
, Flag
),
1367 Sm
(Prev_Ids
, Flag
),
1368 Sm
(Renaming_Exception
, Node_Id
)));
1370 Cc
(N_Exception_Handler
, Node_Kind
,
1371 (Sy
(Choice_Parameter
, Node_Id
, Default_Empty
),
1372 Sy
(Exception_Choices
, List_Id
),
1373 Sy
(Statements
, List_Id
, Default_Empty_List
),
1374 Sm
(Exception_Label
, Node_Id
),
1375 Sm
(Has_Local_Raise
, Flag
),
1376 Sm
(Local_Raise_Not_OK
, Flag
),
1377 Sm
(Local_Raise_Statements
, Elist_Id
)));
1379 Cc
(N_Floating_Point_Definition
, Node_Kind
,
1380 (Sy
(Digits_Expression
, Node_Id
),
1381 Sy
(Real_Range_Specification
, Node_Id
, Default_Empty
)));
1383 Cc
(N_Formal_Decimal_Fixed_Point_Definition
, Node_Kind
);
1385 Cc
(N_Formal_Derived_Type_Definition
, Node_Kind
,
1386 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
1387 Sy
(Private_Present
, Flag
),
1388 Sy
(Abstract_Present
, Flag
),
1389 Sy
(Limited_Present
, Flag
),
1390 Sy
(Synchronized_Present
, Flag
),
1391 Sy
(Interface_List
, List_Id
, Default_No_List
)));
1393 Cc
(N_Formal_Discrete_Type_Definition
, Node_Kind
);
1395 Cc
(N_Formal_Floating_Point_Definition
, Node_Kind
);
1397 Cc
(N_Formal_Modular_Type_Definition
, Node_Kind
);
1399 Cc
(N_Formal_Ordinary_Fixed_Point_Definition
, Node_Kind
);
1401 Cc
(N_Formal_Package_Declaration
, Node_Kind
,
1402 (Sy
(Defining_Identifier
, Node_Id
),
1403 Sy
(Name
, Node_Id
, Default_Empty
),
1404 Sy
(Generic_Associations
, List_Id
, Default_No_List
),
1405 Sy
(Box_Present
, Flag
),
1406 Sm
(Instance_Spec
, Node_Id
),
1407 Sm
(Is_Known_Guaranteed_ABE
, Flag
)));
1409 Cc
(N_Formal_Private_Type_Definition
, Node_Kind
,
1410 (Sy
(Abstract_Present
, Flag
),
1411 Sy
(Tagged_Present
, Flag
),
1412 Sy
(Limited_Present
, Flag
),
1413 Sm
(Uninitialized_Variable
, Node_Id
)));
1415 Cc
(N_Formal_Incomplete_Type_Definition
, Node_Kind
,
1416 (Sy
(Tagged_Present
, Flag
)));
1418 Cc
(N_Formal_Signed_Integer_Type_Definition
, Node_Kind
);
1420 Cc
(N_Freeze_Entity
, Node_Kind
,
1421 (Sy
(Actions
, List_Id
, Default_No_List
),
1422 Sm
(Access_Types_To_Process
, Elist_Id
),
1423 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Entity
1424 Sm
(First_Subtype_Link
, Node_Id
),
1425 Sm
(TSS_Elist
, Elist_Id
)));
1427 Cc
(N_Freeze_Generic_Entity
, Node_Kind
,
1428 Sm
(Entity_Or_Associated_Node
, Node_Id
)); -- just Entity
1430 Cc
(N_Generic_Association
, Node_Kind
,
1431 (Sy
(Selector_Name
, Node_Id
, Default_Empty
),
1432 Sy
(Explicit_Generic_Actual_Parameter
, Node_Id
),
1433 Sy
(Box_Present
, Flag
)));
1435 Cc
(N_Handled_Sequence_Of_Statements
, Node_Kind
,
1436 (Sy
(Statements
, List_Id
, Default_Empty_List
),
1437 Sy
(End_Label
, Node_Id
, Default_Empty
),
1438 Sy
(Exception_Handlers
, List_Id
, Default_No_List
),
1439 Sy
(At_End_Proc
, Node_Id
, Default_Empty
)));
1441 Cc
(N_Index_Or_Discriminant_Constraint
, Node_Kind
,
1442 (Sy
(Constraints
, List_Id
)));
1444 Cc
(N_Iterated_Component_Association
, Node_Kind
,
1445 (Sy
(Defining_Identifier
, Node_Id
),
1446 Sy
(Iterator_Specification
, Node_Id
, Default_Empty
),
1447 Sy
(Expression
, Node_Id
, Default_Empty
),
1448 Sy
(Discrete_Choices
, List_Id
),
1449 Sy
(Box_Present
, Flag
),
1450 Sm
(Loop_Actions
, List_Id
)));
1452 Cc
(N_Iterated_Element_Association
, Node_Kind
,
1453 (Sy
(Key_Expression
, Node_Id
),
1454 Sy
(Iterator_Specification
, Node_Id
, Default_Empty
),
1455 Sy
(Expression
, Node_Id
, Default_Empty
),
1456 Sy
(Loop_Parameter_Specification
, Node_Id
, Default_Empty
),
1457 Sy
(Box_Present
, Flag
),
1458 Sm
(Loop_Actions
, List_Id
)));
1460 Cc
(N_Itype_Reference
, Node_Kind
,
1461 (Sm
(Itype
, Node_Id
)));
1463 Cc
(N_Label
, Node_Kind
,
1464 (Sy
(Identifier
, Node_Id
, Default_Empty
),
1465 Sm
(Exception_Junk
, Flag
)));
1467 Cc
(N_Modular_Type_Definition
, Node_Kind
,
1468 (Sy
(Expression
, Node_Id
, Default_Empty
)));
1470 Cc
(N_Number_Declaration
, Node_Kind
,
1471 (Sy
(Defining_Identifier
, Node_Id
),
1472 Sy
(Expression
, Node_Id
, Default_Empty
),
1473 Sm
(More_Ids
, Flag
),
1474 Sm
(Prev_Ids
, Flag
)));
1476 Cc
(N_Ordinary_Fixed_Point_Definition
, Node_Kind
,
1477 (Sy
(Delta_Expression
, Node_Id
),
1478 Sy
(Real_Range_Specification
, Node_Id
, Default_Empty
)));
1480 Cc
(N_Others_Choice
, Node_Kind
,
1481 (Sm
(All_Others
, Flag
),
1482 Sm
(Others_Discrete_Choices
, List_Id
)));
1484 Cc
(N_Package_Specification
, Node_Kind
,
1485 (Sy
(Defining_Unit_Name
, Node_Id
),
1486 Sy
(Visible_Declarations
, List_Id
),
1487 Sy
(Private_Declarations
, List_Id
, Default_No_List
),
1488 Sy
(End_Label
, Node_Id
, Default_Empty
),
1489 Sm
(Generic_Parent
, Node_Id
),
1490 Sm
(Limited_View_Installed
, Flag
)));
1492 Cc
(N_Parameter_Association
, Node_Kind
,
1493 (Sy
(Selector_Name
, Node_Id
, Default_Empty
),
1494 Sy
(Explicit_Actual_Parameter
, Node_Id
),
1495 Sm
(Is_Accessibility_Actual
, Flag
),
1496 Sm
(Next_Named_Actual
, Node_Id
)));
1498 Cc
(N_Parameter_Specification
, Node_Kind
,
1499 (Sy
(Defining_Identifier
, Node_Id
),
1500 Sy
(Aliased_Present
, Flag
),
1501 Sy
(In_Present
, Flag
),
1502 Sy
(Out_Present
, Flag
),
1503 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1504 Sy
(Parameter_Type
, Node_Id
),
1505 Sy
(Expression
, Node_Id
, Default_Empty
),
1506 Sm
(Default_Expression
, Node_Id
),
1507 Sm
(More_Ids
, Flag
),
1508 Sm
(Prev_Ids
, Flag
)));
1510 Cc
(N_Pragma
, Node_Kind
,
1511 (Sy
(Pragma_Argument_Associations
, List_Id
, Default_No_List
),
1512 Sy
(Pragma_Identifier
, Node_Id
),
1513 Sy
(Class_Present
, Flag
),
1514 Sy
(Split_PPC
, Flag
),
1515 Sm
(Corresponding_Aspect
, Node_Id
),
1516 Sm
(From_Aspect_Specification
, Flag
),
1517 Sm
(Import_Interface_Present
, Flag
),
1518 Sm
(Is_Analyzed_Pragma
, Flag
),
1519 Sm
(Is_Checked
, Flag
),
1520 Sm
(Is_Checked_Ghost_Pragma
, Flag
),
1521 Sm
(Is_Delayed_Aspect
, Flag
),
1522 Sm
(Is_Disabled
, Flag
),
1523 Sm
(Is_Generic_Contract_Pragma
, Flag
),
1524 Sm
(Is_Ignored
, Flag
),
1525 Sm
(Is_Ignored_Ghost_Pragma
, Flag
),
1526 Sm
(Is_Inherited_Pragma
, Flag
),
1527 Sm
(Next_Pragma
, Node_Id
),
1528 Sm
(Next_Rep_Item
, Node_Id
),
1529 Sm
(Uneval_Old_Accept
, Flag
),
1530 Sm
(Uneval_Old_Warn
, Flag
)));
1532 Cc
(N_Protected_Definition
, Node_Kind
,
1533 (Sy
(Visible_Declarations
, List_Id
),
1534 Sy
(Private_Declarations
, List_Id
, Default_No_List
),
1535 Sy
(End_Label
, Node_Id
, Default_Empty
)));
1537 Cc
(N_Range_Constraint
, Node_Kind
,
1538 (Sy
(Range_Expression
, Node_Id
)));
1540 Cc
(N_Real_Range_Specification
, Node_Kind
,
1541 (Sy
(Low_Bound
, Node_Id
),
1542 Sy
(High_Bound
, Node_Id
)));
1544 Cc
(N_Record_Definition
, Node_Kind
,
1545 (Sy
(End_Label
, Node_Id
, Default_Empty
),
1546 Sy
(Abstract_Present
, Flag
),
1547 Sy
(Tagged_Present
, Flag
),
1548 Sy
(Limited_Present
, Flag
),
1549 Sy
(Component_List
, Node_Id
),
1550 Sy
(Null_Present
, Flag
),
1551 Sy
(Task_Present
, Flag
),
1552 Sy
(Protected_Present
, Flag
),
1553 Sy
(Synchronized_Present
, Flag
),
1554 Sy
(Interface_Present
, Flag
),
1555 Sy
(Interface_List
, List_Id
, Default_No_List
)));
1557 Cc
(N_Signed_Integer_Type_Definition
, Node_Kind
,
1558 (Sy
(Low_Bound
, Node_Id
),
1559 Sy
(High_Bound
, Node_Id
)));
1561 Cc
(N_Single_Protected_Declaration
, Node_Kind
,
1562 (Sy
(Defining_Identifier
, Node_Id
),
1563 Sy
(Interface_List
, List_Id
, Default_No_List
),
1564 Sy
(Protected_Definition
, Node_Id
)));
1566 Cc
(N_Subunit
, Node_Kind
,
1567 (Sy
(Name
, Node_Id
, Default_Empty
),
1568 Sy
(Proper_Body
, Node_Id
),
1569 Sm
(Corresponding_Stub
, Node_Id
)));
1571 Cc
(N_Task_Definition
, Node_Kind
,
1572 (Sy
(Visible_Declarations
, List_Id
),
1573 Sy
(Private_Declarations
, List_Id
, Default_No_List
),
1574 Sy
(End_Label
, Node_Id
, Default_Empty
),
1575 Sm
(Has_Relative_Deadline_Pragma
, Flag
),
1576 Sm
(Has_Storage_Size_Pragma
, Flag
)));
1578 Cc
(N_Triggering_Alternative
, Node_Kind
,
1579 (Sy
(Triggering_Statement
, Node_Id
),
1580 Sy
(Statements
, List_Id
, Default_Empty_List
),
1581 Sy
(Pragmas_Before
, List_Id
, Default_No_List
)));
1583 Cc
(N_Use_Type_Clause
, Node_Kind
,
1584 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
1585 Sy
(Is_Effective_Use_Clause
, Flag
),
1586 Sy
(All_Present
, Flag
),
1587 Sm
(Hidden_By_Use_Clause
, Elist_Id
),
1588 Sm
(More_Ids
, Flag
),
1589 Sm
(Next_Use_Clause
, Node_Id
),
1590 Sm
(Prev_Ids
, Flag
),
1591 Sm
(Prev_Use_Clause
, Node_Id
),
1592 Sm
(Used_Operations
, Elist_Id
)));
1594 Cc
(N_Validate_Unchecked_Conversion
, Node_Kind
,
1595 (Sm
(Source_Type
, Node_Id
),
1596 Sm
(Target_Type
, Node_Id
)));
1598 Cc
(N_Variable_Reference_Marker
, Node_Kind
,
1599 (Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
1600 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
1602 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
1603 Sm
(Is_Write
, Flag
),
1604 Sm
(Target
, Node_Id
)));
1606 Cc
(N_Variant
, Node_Kind
,
1607 (Sy
(Discrete_Choices
, List_Id
),
1608 Sy
(Component_List
, Node_Id
),
1609 Sm
(Dcheck_Function
, Node_Id
),
1610 Sm
(Enclosing_Variant
, Node_Id
),
1611 Sm
(Has_SP_Choice
, Flag
),
1612 Sm
(Present_Expr
, Uint
)));
1614 Cc
(N_Variant_Part
, Node_Kind
,
1615 (Sy
(Name
, Node_Id
, Default_Empty
),
1616 Sy
(Variants
, List_Id
)));
1618 Cc
(N_With_Clause
, Node_Kind
,
1619 (Sy
(Name
, Node_Id
, Default_Empty
),
1620 Sy
(Private_Present
, Flag
),
1621 Sy
(Limited_Present
, Flag
),
1622 Sy
(First_Name
, Flag
, Default_True
),
1623 Sy
(Last_Name
, Flag
, Default_True
),
1624 Sm
(Context_Installed
, Flag
),
1625 Sm
(Corresponding_Spec
, Node_Id
),
1626 Sm
(Elaborate_All_Desirable
, Flag
),
1627 Sm
(Elaborate_All_Present
, Flag
),
1628 Sm
(Elaborate_Desirable
, Flag
),
1629 Sm
(Elaborate_Present
, Flag
),
1630 Sm
(Implicit_With
, Flag
),
1631 Sm
(Library_Unit
, Node_Id
),
1632 Sm
(Limited_View_Installed
, Flag
),
1633 Sm
(Next_Implicit_With
, Node_Id
),
1634 Sm
(No_Entities_Ref_In_Spec
, Flag
),
1635 Sm
(Parent_With
, Flag
),
1636 Sm
(Unreferenced_In_Spec
, Flag
)));
1638 Cc
(N_Unused_At_End
, Node_Kind
);
1640 -- Union types. These don't fit into the normal parent/child hierarchy
1645 (N_Attribute_Definition_Clause
,
1647 N_Pragma_Argument_Association
,
1653 N_Character_Literal
,
1656 Union
(N_Has_Condition
,
1660 N_Accept_Alternative
,
1661 N_Delay_Alternative
,
1663 N_Entry_Body_Formal_Part
,
1665 N_Terminate_Alternative
));
1666 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
1668 Union
(N_Has_Bounds
,
1671 N_Real_Range_Specification
,
1672 N_Signed_Integer_Type_Definition
));
1673 -- Nodes that have Low_Bound and High_Bound defined
1679 N_Subtype_Indication
));
1680 -- Nodes that can be an index of an array
1682 Union
(N_Entity_Name
,
1686 N_Operator_Symbol
));
1687 -- Nodes that are definitely representing an entity.
1688 -- Some N_Attribute_Reference nodes may also represent an entity. See
1696 N_Discriminant_Specification
,
1697 N_Entry_Index_Specification
,
1698 N_Enumeration_Type_Definition
,
1699 N_Exception_Handler
,
1700 N_Explicit_Dereference
,
1701 N_Expression_With_Actions
,
1702 N_Extension_Aggregate
,
1704 N_Iterated_Component_Association
,
1708 N_Number_Declaration
,
1709 N_Package_Specification
,
1710 N_Parameter_Specification
,
1711 N_Renaming_Declaration
,
1712 N_Quantified_Expression
));
1713 -- Nodes that can be returned by Declaration_Node; it can also return
1714 -- Empty. Not all of these are true "declarations", but Declaration_Node
1715 -- can return them in some cases.
1719 (N_Character_Literal
,
1723 N_Subtype_Indication
));
1724 -- Nodes that can be used to specify a range
1726 Union
(N_Is_Case_Choice
,
1730 -- Nodes that can be in the choices of a case statement
1732 Union
(N_Is_Exception_Choice
,
1736 -- Nodes that can be in the choices of an exception handler
1738 Union
(N_Alternative
,
1740 (N_Case_Statement_Alternative
,
1742 -- Nodes that can be alternatives in case contructs
1744 end Gen_IL
.Gen
.Gen_Nodes
;