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
(Is_Ignored_Ghost_Node
, Flag
),
66 Sm
(Link
, Union_Id
)));
68 Cc
(N_Unused_At_Start
, Node_Kind
);
70 Ab
(N_Representation_Clause
, Node_Kind
);
72 Cc
(N_At_Clause
, N_Representation_Clause
,
73 (Sy
(Identifier
, Node_Id
, Default_Empty
),
74 Sy
(Expression
, Node_Id
, Default_Empty
)));
76 Cc
(N_Component_Clause
, N_Representation_Clause
,
77 (Sy
(Component_Name
, Node_Id
),
78 Sy
(Position
, Node_Id
),
79 Sy
(First_Bit
, Node_Id
),
80 Sy
(Last_Bit
, Node_Id
)));
82 Cc
(N_Enumeration_Representation_Clause
, N_Representation_Clause
,
83 (Sy
(Identifier
, Node_Id
, Default_Empty
),
84 Sy
(Array_Aggregate
, Node_Id
),
85 Sm
(Next_Rep_Item
, Node_Id
)));
87 Cc
(N_Mod_Clause
, N_Representation_Clause
,
88 (Sy
(Expression
, Node_Id
, Default_Empty
),
89 Sy
(Pragmas_Before
, List_Id
, Default_No_List
)));
91 Cc
(N_Record_Representation_Clause
, N_Representation_Clause
,
92 (Sy
(Identifier
, Node_Id
, Default_Empty
),
93 Sy
(Mod_Clause
, Node_Id
, Default_Empty
),
94 Sy
(Component_Clauses
, List_Id
),
95 Sm
(Next_Rep_Item
, Node_Id
)));
97 Cc
(N_Attribute_Definition_Clause
, N_Representation_Clause
,
98 (Sy
(Name
, Node_Id
, Default_Empty
),
99 Sy
(Chars
, Name_Id
, Default_No_Name
),
100 Sy
(Expression
, Node_Id
, Default_Empty
),
101 Sm
(Address_Warning_Posted
, Flag
),
102 Sm
(Check_Address_Alignment
, Flag
),
103 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Entity
104 Sm
(From_Aspect_Specification
, Flag
),
105 Sm
(From_At_Mod
, Flag
),
106 Sm
(Is_Delayed_Aspect
, Flag
),
107 Sm
(Next_Rep_Item
, Node_Id
)));
109 Cc
(N_Empty
, Node_Kind
,
110 (Sy
(Chars
, Name_Id
, Default_No_Name
)));
111 -- The following getters and setters are called on Empty,
112 -- and are currently inherited from Node_Kind:
114 -- Set_Comes_From_Source
125 Cc
(N_Pragma_Argument_Association
, Node_Kind
,
126 (Sy
(Chars
, Name_Id
, Default_No_Name
),
127 Sy
(Expression
, Node_Id
, Default_Empty
),
128 Sm
(Expression_Copy
, Node_Id
)));
130 Ab
(N_Has_Etype
, Node_Kind
,
131 (Sm
(Etype
, Node_Id
)));
133 Cc
(N_Error
, N_Has_Etype
,
134 (Sy
(Chars
, Name_Id
, Default_No_Name
)));
136 Ab
(N_Entity
, N_Has_Etype
,
137 (Sm
(Next_Entity
, Node_Id
),
138 Sm
(Scope
, Node_Id
)));
140 Cc
(N_Defining_Character_Literal
, N_Entity
,
141 (Sy
(Chars
, Name_Id
, Default_No_Name
)));
143 Cc
(N_Defining_Identifier
, N_Entity
,
144 (Sy
(Chars
, Name_Id
, Default_No_Name
)));
146 Cc
(N_Defining_Operator_Symbol
, N_Entity
,
147 (Sy
(Chars
, Name_Id
, Default_No_Name
)));
149 Ab
(N_Subexpr
, N_Has_Etype
,
150 -- Nodes with expression fields
151 (Sm
(Assignment_OK
, Flag
),
152 Sm
(Do_Range_Check
, Flag
),
153 Sm
(Has_Dynamic_Length_Check
, Flag
),
154 Sm
(Is_Controlling_Actual
, Flag
),
155 Sm
(Is_Overloaded
, Flag
),
156 Sm
(Is_Static_Expression
, Flag
),
157 Sm
(Must_Not_Freeze
, Flag
),
158 Sm
(Raises_Constraint_Error
, Flag
)));
160 Ab
(N_Has_Entity
, N_Subexpr
,
161 -- Nodes that have Entity fields
162 -- Warning: DOES NOT INCLUDE N_Freeze_Entity, N_Freeze_Generic_Entity,
163 -- N_Aspect_Specification, or N_Attribute_Definition_Clause.
164 (Sm
(Entity_Or_Associated_Node
, Node_Id
))); -- both
166 Cc
(N_Expanded_Name
, N_Has_Entity
,
167 (Sy
(Chars
, Name_Id
, Default_No_Name
),
168 Sy
(Prefix
, Node_Id
),
169 Sy
(Selector_Name
, Node_Id
, Default_Empty
),
170 Sm
(Atomic_Sync_Required
, Flag
),
171 Sm
(Has_Private_View
, Flag
),
172 Sm
(Has_Secondary_Private_View
, Flag
),
173 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
174 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
175 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
176 Sm
(Redundant_Use
, Flag
)));
178 Ab
(N_Direct_Name
, N_Has_Entity
,
179 (Sm
(Has_Private_View
, Flag
),
180 Sm
(Has_Secondary_Private_View
, Flag
)));
182 Cc
(N_Identifier
, N_Direct_Name
,
183 (Sy
(Chars
, Name_Id
, Default_No_Name
),
184 Sm
(Atomic_Sync_Required
, Flag
),
185 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
186 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
187 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
188 Sm
(Original_Discriminant
, Node_Id
),
189 Sm
(Redundant_Use
, Flag
)));
191 Cc
(N_Operator_Symbol
, N_Direct_Name
,
192 (Sy
(Chars
, Name_Id
, Default_No_Name
),
193 Sy
(Strval
, String_Id
)));
195 Cc
(N_Character_Literal
, N_Direct_Name
,
196 (Sy
(Chars
, Name_Id
, Default_No_Name
),
197 Sy
(Char_Literal_Value
, Unat
)));
199 Ab
(N_Op
, N_Has_Entity
,
200 (Sm
(Do_Overflow_Check
, Flag
),
201 Sm
(Has_Private_View
, Flag
),
202 Sm
(Has_Secondary_Private_View
, Flag
)));
204 Ab
(N_Binary_Op
, N_Op
);
206 Cc
(N_Op_Add
, N_Binary_Op
,
207 (Sm
(Chars
, Name_Id
),
208 Sy
(Left_Opnd
, Node_Id
),
209 Sy
(Right_Opnd
, Node_Id
)));
211 Cc
(N_Op_Concat
, N_Binary_Op
,
212 (Sm
(Chars
, Name_Id
),
213 Sy
(Left_Opnd
, Node_Id
),
214 Sy
(Right_Opnd
, Node_Id
),
215 Sm
(Is_Component_Left_Opnd
, Flag
),
216 Sm
(Is_Component_Right_Opnd
, Flag
)));
218 Cc
(N_Op_Expon
, N_Binary_Op
,
219 (Sm
(Chars
, Name_Id
),
220 Sy
(Left_Opnd
, Node_Id
),
221 Sy
(Right_Opnd
, Node_Id
),
222 Sm
(Is_Power_Of_2_For_Shift
, Flag
)));
224 Cc
(N_Op_Subtract
, N_Binary_Op
,
225 (Sm
(Chars
, Name_Id
),
226 Sy
(Left_Opnd
, Node_Id
),
227 Sy
(Right_Opnd
, Node_Id
)));
229 Ab
(N_Multiplying_Operator
, N_Binary_Op
);
231 Cc
(N_Op_Divide
, N_Multiplying_Operator
,
232 (Sm
(Chars
, Name_Id
),
233 Sy
(Left_Opnd
, Node_Id
),
234 Sy
(Right_Opnd
, Node_Id
),
235 Sm
(Do_Division_Check
, Flag
),
236 Sm
(Rounded_Result
, Flag
)));
238 Cc
(N_Op_Mod
, N_Multiplying_Operator
,
239 (Sm
(Chars
, Name_Id
),
240 Sy
(Left_Opnd
, Node_Id
),
241 Sy
(Right_Opnd
, Node_Id
),
242 Sm
(Do_Division_Check
, Flag
)));
244 Cc
(N_Op_Multiply
, N_Multiplying_Operator
,
245 (Sm
(Chars
, Name_Id
),
246 Sy
(Left_Opnd
, Node_Id
),
247 Sy
(Right_Opnd
, Node_Id
),
248 Sm
(Rounded_Result
, Flag
)));
250 Cc
(N_Op_Rem
, N_Multiplying_Operator
,
251 (Sm
(Chars
, Name_Id
),
252 Sy
(Left_Opnd
, Node_Id
),
253 Sy
(Right_Opnd
, Node_Id
),
254 Sm
(Do_Division_Check
, Flag
)));
256 Ab
(N_Op_Boolean
, N_Binary_Op
);
257 -- Binary operators that yield a result of a boolean type
259 Cc
(N_Op_And
, N_Op_Boolean
,
260 (Sm
(Chars
, Name_Id
),
261 Sy
(Left_Opnd
, Node_Id
),
262 Sy
(Right_Opnd
, Node_Id
),
263 Sm
(Do_Length_Check
, Flag
)));
265 Ab
(N_Op_Compare
, N_Op_Boolean
);
267 Cc
(N_Op_Eq
, N_Op_Compare
,
268 (Sm
(Chars
, Name_Id
),
269 Sy
(Left_Opnd
, Node_Id
),
270 Sy
(Right_Opnd
, Node_Id
),
271 Sm
(Compare_Type
, Node_Id
)));
273 Cc
(N_Op_Ge
, N_Op_Compare
,
274 (Sm
(Chars
, Name_Id
),
275 Sy
(Left_Opnd
, Node_Id
),
276 Sy
(Right_Opnd
, Node_Id
),
277 Sm
(Compare_Type
, 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
),
283 Sm
(Compare_Type
, Node_Id
)));
285 Cc
(N_Op_Le
, N_Op_Compare
,
286 (Sm
(Chars
, Name_Id
),
287 Sy
(Left_Opnd
, Node_Id
),
288 Sy
(Right_Opnd
, Node_Id
),
289 Sm
(Compare_Type
, Node_Id
)));
291 Cc
(N_Op_Lt
, N_Op_Compare
,
292 (Sm
(Chars
, Name_Id
),
293 Sy
(Left_Opnd
, Node_Id
),
294 Sy
(Right_Opnd
, Node_Id
),
295 Sm
(Compare_Type
, Node_Id
)));
297 Cc
(N_Op_Ne
, N_Op_Compare
,
298 (Sm
(Chars
, Name_Id
),
299 Sy
(Left_Opnd
, Node_Id
),
300 Sy
(Right_Opnd
, Node_Id
),
301 Sm
(Compare_Type
, Node_Id
)));
303 Cc
(N_Op_Or
, N_Op_Boolean
,
304 (Sm
(Chars
, Name_Id
),
305 Sy
(Left_Opnd
, Node_Id
),
306 Sy
(Right_Opnd
, Node_Id
),
307 Sm
(Do_Length_Check
, Flag
)));
309 Cc
(N_Op_Xor
, N_Op_Boolean
,
310 (Sm
(Chars
, Name_Id
),
311 Sy
(Left_Opnd
, Node_Id
),
312 Sy
(Right_Opnd
, Node_Id
),
313 Sm
(Do_Length_Check
, Flag
)));
315 Ab
(N_Op_Shift
, N_Binary_Op
,
316 (Sm
(Shift_Count_OK
, Flag
)));
318 Cc
(N_Op_Rotate_Left
, N_Op_Shift
,
319 (Sm
(Chars
, Name_Id
),
320 Sy
(Left_Opnd
, Node_Id
),
321 Sy
(Right_Opnd
, Node_Id
)));
323 Cc
(N_Op_Rotate_Right
, N_Op_Shift
,
324 (Sm
(Chars
, Name_Id
),
325 Sy
(Left_Opnd
, Node_Id
),
326 Sy
(Right_Opnd
, Node_Id
)));
328 Cc
(N_Op_Shift_Left
, N_Op_Shift
,
329 (Sm
(Chars
, Name_Id
),
330 Sy
(Left_Opnd
, Node_Id
),
331 Sy
(Right_Opnd
, Node_Id
)));
333 Cc
(N_Op_Shift_Right
, N_Op_Shift
,
334 (Sm
(Chars
, Name_Id
),
335 Sy
(Left_Opnd
, Node_Id
),
336 Sy
(Right_Opnd
, Node_Id
)));
338 Cc
(N_Op_Shift_Right_Arithmetic
, N_Op_Shift
,
339 (Sm
(Chars
, Name_Id
),
340 Sy
(Left_Opnd
, Node_Id
),
341 Sy
(Right_Opnd
, Node_Id
)));
343 Ab
(N_Unary_Op
, N_Op
);
345 Cc
(N_Op_Abs
, N_Unary_Op
,
346 (Sm
(Chars
, Name_Id
),
347 Sy
(Right_Opnd
, Node_Id
)));
349 Cc
(N_Op_Minus
, N_Unary_Op
,
350 (Sm
(Chars
, Name_Id
),
351 Sy
(Right_Opnd
, Node_Id
)));
353 Cc
(N_Op_Not
, N_Unary_Op
,
354 (Sm
(Chars
, Name_Id
),
355 Sy
(Right_Opnd
, Node_Id
)));
357 Cc
(N_Op_Plus
, N_Unary_Op
,
358 (Sm
(Chars
, Name_Id
),
359 Sy
(Right_Opnd
, Node_Id
)));
361 Cc
(N_Attribute_Reference
, N_Has_Entity
,
362 (Sy
(Prefix
, Node_Id
),
363 Sy
(Attribute_Name
, Name_Id
),
364 Sy
(Expressions
, List_Id
, Default_No_List
),
365 Sm
(Do_Overflow_Check
, Flag
),
366 Sm
(Header_Size_Added
, Flag
),
367 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
368 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
369 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
370 Sm
(Must_Be_Byte_Aligned
, Flag
),
371 Sm
(Redundant_Use
, Flag
)));
373 Ab
(N_Membership_Test
, N_Subexpr
);
375 Cc
(N_In
, N_Membership_Test
,
376 (Sy
(Left_Opnd
, Node_Id
),
377 Sy
(Right_Opnd
, Node_Id
),
378 Sy
(Alternatives
, List_Id
, Default_No_List
),
379 Sy
(No_Minimize_Eliminate
, Flag
)));
381 Cc
(N_Not_In
, N_Membership_Test
,
382 (Sy
(Left_Opnd
, Node_Id
),
383 Sy
(Right_Opnd
, Node_Id
),
384 Sy
(Alternatives
, List_Id
, Default_No_List
),
385 Sy
(No_Minimize_Eliminate
, Flag
)));
387 Ab
(N_Short_Circuit
, N_Subexpr
);
389 Cc
(N_And_Then
, N_Short_Circuit
,
390 (Sy
(Left_Opnd
, Node_Id
),
391 Sy
(Right_Opnd
, Node_Id
),
392 Sm
(Actions
, List_Id
)));
394 Cc
(N_Or_Else
, N_Short_Circuit
,
395 (Sy
(Left_Opnd
, Node_Id
),
396 Sy
(Right_Opnd
, Node_Id
),
397 Sm
(Actions
, List_Id
)));
399 Ab
(N_Subprogram_Call
, N_Subexpr
,
400 (Sm
(Controlling_Argument
, Node_Id
),
401 Sm
(First_Named_Actual
, Node_Id
),
402 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
403 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
404 Sm
(Is_Known_Guaranteed_ABE
, Flag
),
405 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
406 Sm
(No_Elaboration_Check
, Flag
)));
408 Cc
(N_Function_Call
, N_Subprogram_Call
,
409 (Sy
(Name
, Node_Id
, Default_Empty
),
410 Sy
(Parameter_Associations
, List_Id
, Default_No_List
),
411 Sm
(Is_Expanded_Build_In_Place_Call
, Flag
)));
413 Cc
(N_Procedure_Call_Statement
, N_Subprogram_Call
,
414 (Sy
(Name
, Node_Id
, Default_Empty
),
415 Sy
(Parameter_Associations
, List_Id
, Default_No_List
)));
417 Ab
(N_Raise_xxx_Error
, N_Subexpr
);
419 Cc
(N_Raise_Constraint_Error
, N_Raise_xxx_Error
,
420 (Sy
(Condition
, Node_Id
, Default_Empty
),
423 Cc
(N_Raise_Program_Error
, N_Raise_xxx_Error
,
424 (Sy
(Condition
, Node_Id
, Default_Empty
),
427 Cc
(N_Raise_Storage_Error
, N_Raise_xxx_Error
,
428 (Sy
(Condition
, Node_Id
, Default_Empty
),
431 Ab
(N_Numeric_Or_String_Literal
, N_Subexpr
);
433 Cc
(N_Integer_Literal
, N_Numeric_Or_String_Literal
,
434 (Sy
(Intval
, Valid_Uint
),
435 Sm
(Original_Entity
, Node_Id
),
436 Sm
(Print_In_Hex
, Flag
)));
438 Cc
(N_Real_Literal
, N_Numeric_Or_String_Literal
,
439 (Sy
(Realval
, Ureal
),
440 Sm
(Corresponding_Integer_Value
, Valid_Uint
),
441 Sm
(Is_Machine_Number
, Flag
),
442 Sm
(Original_Entity
, Node_Id
)));
444 Cc
(N_String_Literal
, N_Numeric_Or_String_Literal
,
445 (Sy
(Strval
, String_Id
),
446 Sy
(Is_Folded_In_Parser
, Flag
),
447 Sm
(Has_Wide_Character
, Flag
),
448 Sm
(Has_Wide_Wide_Character
, Flag
)));
450 Cc
(N_Interpolated_String_Literal
, N_Numeric_Or_String_Literal
,
451 (Sy
(Expressions
, List_Id
, Default_No_List
)));
453 Cc
(N_Explicit_Dereference
, N_Subexpr
,
454 (Sy
(Prefix
, Node_Id
),
455 Sm
(Actual_Designated_Subtype
, Node_Id
),
456 Sm
(Atomic_Sync_Required
, Flag
),
457 Sm
(Has_Dereference_Action
, Flag
)));
459 Cc
(N_Expression_With_Actions
, N_Subexpr
,
460 (Sy
(Actions
, List_Id
, Default_No_List
),
461 Sy
(Expression
, Node_Id
, Default_Empty
)));
463 Cc
(N_If_Expression
, N_Subexpr
,
464 (Sy
(Expressions
, List_Id
, Default_No_List
),
466 Sm
(Do_Overflow_Check
, Flag
),
467 Sm
(Else_Actions
, List_Id
),
468 Sm
(Then_Actions
, List_Id
)));
470 Cc
(N_Indexed_Component
, N_Subexpr
,
471 (Sy
(Prefix
, Node_Id
),
472 Sy
(Expressions
, List_Id
, Default_No_List
),
473 Sm
(Atomic_Sync_Required
, Flag
),
474 Sm
(Generalized_Indexing
, Node_Id
)));
476 Cc
(N_Null
, N_Subexpr
);
478 Cc
(N_Qualified_Expression
, N_Subexpr
,
479 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
480 Sy
(Expression
, Node_Id
, Default_Empty
),
481 Sm
(Is_Qualified_Universal_Literal
, Flag
)));
483 Cc
(N_Quantified_Expression
, N_Subexpr
,
484 (Sy
(Iterator_Specification
, Node_Id
, Default_Empty
),
485 Sy
(Loop_Parameter_Specification
, Node_Id
, Default_Empty
),
486 Sy
(Condition
, Node_Id
, Default_Empty
),
487 Sy
(All_Present
, Flag
)));
489 Cc
(N_Aggregate
, N_Subexpr
,
490 (Sy
(Expressions
, List_Id
, Default_No_List
),
491 Sy
(Component_Associations
, List_Id
, Default_No_List
),
492 Sy
(Null_Record_Present
, Flag
),
493 Sy
(Is_Parenthesis_Aggregate
, Flag
),
494 Sy
(Is_Homogeneous_Aggregate
, Flag
),
495 Sy
(Is_Enum_Array_Aggregate
, Flag
),
496 Sm
(Aggregate_Bounds
, Node_Id
),
497 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Associated_Node
498 Sm
(Compile_Time_Known_Aggregate
, Flag
),
499 Sm
(Expansion_Delayed
, Flag
),
500 Sm
(Has_Self_Reference
, Flag
)));
502 Cc
(N_Allocator
, N_Subexpr
,
503 (Sy
(Expression
, Node_Id
, Default_Empty
),
504 Sy
(Subpool_Handle_Name
, Node_Id
, Default_Empty
),
505 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
506 Sm
(For_Special_Return_Object
, Flag
),
507 Sm
(Do_Storage_Check
, Flag
),
508 Sm
(Is_Dynamic_Coextension
, Flag
),
509 Sm
(Is_Static_Coextension
, Flag
),
510 Sm
(No_Initialization
, Flag
),
511 Sm
(Procedure_To_Call
, Node_Id
),
512 Sm
(Storage_Pool
, Node_Id
)));
514 Cc
(N_Case_Expression
, N_Subexpr
,
515 (Sy
(Expression
, Node_Id
, Default_Empty
),
516 Sy
(Alternatives
, List_Id
, Default_No_List
),
517 Sm
(Do_Overflow_Check
, Flag
)));
519 Cc
(N_Delta_Aggregate
, N_Subexpr
,
520 (Sy
(Expression
, Node_Id
, Default_Empty
),
521 Sy
(Is_Homogeneous_Aggregate
, Flag
),
522 Sy
(Component_Associations
, List_Id
, Default_No_List
)));
524 Cc
(N_Extension_Aggregate
, N_Subexpr
,
525 (Sy
(Ancestor_Part
, Node_Id
),
526 Sy
(Expressions
, List_Id
, Default_No_List
),
527 Sy
(Component_Associations
, List_Id
, Default_No_List
),
528 Sy
(Null_Record_Present
, Flag
),
529 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Associated_Node
530 Sm
(Expansion_Delayed
, Flag
),
531 Sm
(Has_Self_Reference
, Flag
)));
533 Cc
(N_Raise_Expression
, N_Subexpr
,
534 (Sy
(Name
, Node_Id
, Default_Empty
),
535 Sy
(Expression
, Node_Id
, Default_Empty
)));
537 Cc
(N_Range
, N_Subexpr
,
538 (Sy
(Low_Bound
, Node_Id
),
539 Sy
(High_Bound
, Node_Id
),
540 Sm
(Cannot_Be_Superflat
, Flag
),
541 Sm
(Includes_Infinities
, Flag
)));
543 Cc
(N_Reference
, N_Subexpr
,
544 (Sy
(Prefix
, Node_Id
)));
546 Cc
(N_Selected_Component
, N_Subexpr
,
547 (Sy
(Prefix
, Node_Id
),
548 Sy
(Selector_Name
, Node_Id
, Default_Empty
),
549 Sm
(Atomic_Sync_Required
, Flag
),
550 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Associated_Node
551 Sm
(Do_Discriminant_Check
, Flag
),
552 Sm
(Is_In_Discriminant_Check
, Flag
),
553 Sm
(Is_Prefixed_Call
, Flag
)));
555 Cc
(N_Slice
, N_Subexpr
,
556 (Sy
(Prefix
, Node_Id
),
557 Sy
(Discrete_Range
, Node_Id
)));
559 Cc
(N_Target_Name
, N_Subexpr
);
561 Cc
(N_Type_Conversion
, N_Subexpr
,
562 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
563 Sy
(Expression
, Node_Id
, Default_Empty
),
564 Sm
(Conversion_OK
, Flag
),
565 Sm
(Do_Discriminant_Check
, Flag
),
566 Sm
(Do_Length_Check
, Flag
),
567 Sm
(Do_Overflow_Check
, Flag
),
568 Sm
(Float_Truncate
, Flag
),
569 Sm
(Rounded_Result
, Flag
)));
571 Cc
(N_Unchecked_Expression
, N_Subexpr
,
572 (Sy
(Expression
, Node_Id
, Default_Empty
)));
574 Cc
(N_Unchecked_Type_Conversion
, N_Subexpr
,
575 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
576 Sy
(Expression
, Node_Id
, Default_Empty
),
577 Sm
(Kill_Range_Check
, Flag
),
578 Sm
(No_Truncation
, Flag
)),
579 Nmake_Assert
=> "True or else Nkind (Expression) /= N_Unchecked_Type_Conversion");
580 -- Nmake_Assert => "Nkind (Expression) /= N_Unchecked_Type_Conversion");
581 -- Assert that we don't have unchecked conversions of unchecked
582 -- conversions; if Expression might be an unchecked conversion,
583 -- then Tbuild.Unchecked_Convert_To should be used.
585 Cc
(N_Subtype_Indication
, N_Has_Etype
,
586 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
587 Sy
(Constraint
, Node_Id
),
588 Sm
(Must_Not_Freeze
, Flag
)));
590 Ab
(N_Declaration
, Node_Kind
);
591 -- Note: this includes all constructs normally thought of as declarations
592 -- except those that are separately grouped in N_Later_Decl_Item. But
593 -- Declaration_Node may return yet more node types; see N_Is_Decl below.
595 Cc
(N_Component_Declaration
, N_Declaration
,
596 (Sy
(Defining_Identifier
, Node_Id
),
597 Sy
(Component_Definition
, Node_Id
),
598 Sy
(Expression
, Node_Id
, Default_Empty
),
599 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
601 Sm
(Prev_Ids
, Flag
)));
603 Cc
(N_Entry_Declaration
, N_Declaration
,
604 (Sy
(Defining_Identifier
, Node_Id
),
605 Sy
(Discrete_Subtype_Definition
, Node_Id
, Default_Empty
),
606 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
607 Sy
(Must_Override
, Flag
),
608 Sy
(Must_Not_Override
, Flag
),
609 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
610 Sm
(Corresponding_Body
, Node_Id
)));
612 Cc
(N_Expression_Function
, N_Declaration
,
613 (Sy
(Specification
, Node_Id
),
614 Sy
(Expression
, Node_Id
, Default_Empty
),
615 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
616 Sm
(Corresponding_Spec
, Node_Id
)));
618 Cc
(N_Formal_Object_Declaration
, N_Declaration
,
619 (Sy
(Defining_Identifier
, Node_Id
),
620 Sy
(In_Present
, Flag
),
621 Sy
(Out_Present
, Flag
),
622 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
623 Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
624 Sy
(Access_Definition
, Node_Id
, Default_Empty
),
625 Sy
(Default_Expression
, Node_Id
, Default_Empty
),
626 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
628 Sm
(Prev_Ids
, Flag
)));
630 Cc
(N_Formal_Type_Declaration
, N_Declaration
,
631 (Sy
(Defining_Identifier
, Node_Id
),
632 Sy
(Formal_Type_Definition
, Node_Id
),
633 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
634 Sy
(Unknown_Discriminants_Present
, Flag
),
635 Sy
(Default_Subtype_Mark
, Node_Id
),
636 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
638 Cc
(N_Full_Type_Declaration
, N_Declaration
,
639 (Sy
(Defining_Identifier
, Node_Id
),
640 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
641 Sy
(Type_Definition
, Node_Id
),
642 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
643 Sm
(Discr_Check_Funcs_Built
, Flag
),
644 Sm
(Incomplete_View
, Node_Id
)));
646 Cc
(N_Incomplete_Type_Declaration
, N_Declaration
,
647 (Sy
(Defining_Identifier
, Node_Id
),
648 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
649 Sy
(Unknown_Discriminants_Present
, Flag
),
650 Sy
(Tagged_Present
, Flag
),
651 Sm
(Premature_Use
, Node_Id
)));
653 Cc
(N_Iterator_Specification
, N_Declaration
,
654 (Sy
(Defining_Identifier
, Node_Id
),
655 Sy
(Name
, Node_Id
, Default_Empty
),
656 Sy
(Reverse_Present
, Flag
),
657 Sy
(Of_Present
, Flag
),
658 Sy
(Iterator_Filter
, Node_Id
, Default_Empty
),
659 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
)));
661 Cc
(N_Loop_Parameter_Specification
, N_Declaration
,
662 (Sy
(Defining_Identifier
, Node_Id
),
663 Sy
(Reverse_Present
, Flag
),
664 Sy
(Iterator_Filter
, Node_Id
, Default_Empty
),
665 Sy
(Discrete_Subtype_Definition
, Node_Id
, Default_Empty
)));
667 Cc
(N_Object_Declaration
, N_Declaration
,
668 (Sy
(Defining_Identifier
, Node_Id
),
669 Sy
(Aliased_Present
, Flag
),
670 Sy
(Constant_Present
, Flag
),
671 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
672 Sy
(Object_Definition
, Node_Id
),
673 Sy
(Expression
, Node_Id
, Default_Empty
),
674 Sy
(Has_Init_Expression
, Flag
),
675 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
676 Sm
(Assignment_OK
, Flag
),
677 Sm
(Corresponding_Generic_Association
, Node_Id
),
678 Sm
(Exception_Junk
, Flag
),
679 Sm
(Handler_List_Entry
, Node_Id
),
680 Sm
(Is_Subprogram_Descriptor
, Flag
),
682 Sm
(No_Initialization
, Flag
),
684 Sm
(Suppress_Assignment_Checks
, Flag
)));
686 Cc
(N_Protected_Type_Declaration
, N_Declaration
,
687 (Sy
(Defining_Identifier
, Node_Id
),
688 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
689 Sy
(Interface_List
, List_Id
, Default_No_List
),
690 Sy
(Protected_Definition
, Node_Id
),
691 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
692 Sm
(Corresponding_Body
, Node_Id
)));
694 Cc
(N_Private_Extension_Declaration
, N_Declaration
,
695 (Sy
(Defining_Identifier
, Node_Id
),
696 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
697 Sy
(Unknown_Discriminants_Present
, Flag
),
698 Sy
(Abstract_Present
, Flag
),
699 Sy
(Limited_Present
, Flag
),
700 Sy
(Synchronized_Present
, Flag
),
701 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
),
702 Sy
(Interface_List
, List_Id
, Default_No_List
),
703 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
704 Sm
(Uninitialized_Variable
, Node_Id
)));
706 Cc
(N_Private_Type_Declaration
, N_Declaration
,
707 (Sy
(Defining_Identifier
, Node_Id
),
708 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
709 Sy
(Unknown_Discriminants_Present
, Flag
),
710 Sy
(Abstract_Present
, Flag
),
711 Sy
(Tagged_Present
, Flag
),
712 Sy
(Limited_Present
, Flag
),
713 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
715 Cc
(N_Subtype_Declaration
, N_Declaration
,
716 (Sy
(Defining_Identifier
, Node_Id
),
717 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
718 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
),
719 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
720 Sm
(Exception_Junk
, Flag
),
721 Sm
(Generic_Parent_Type
, Node_Id
)));
723 Ab
(N_Subprogram_Specification
, N_Declaration
,
724 (Sm
(Generic_Parent
, Node_Id
)));
726 Cc
(N_Function_Specification
, N_Subprogram_Specification
,
727 (Sy
(Defining_Unit_Name
, Node_Id
),
728 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
729 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
730 Sy
(Result_Definition
, Node_Id
),
731 Sy
(Must_Override
, Flag
),
732 Sy
(Must_Not_Override
, Flag
)));
734 Cc
(N_Procedure_Specification
, N_Subprogram_Specification
,
735 (Sy
(Defining_Unit_Name
, Node_Id
),
736 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
737 Sy
(Null_Present
, Flag
),
738 Sy
(Must_Override
, Flag
),
739 Sy
(Must_Not_Override
, Flag
),
740 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
741 Sm
(Null_Statement
, Node_Id
)));
743 Ab
(N_Access_To_Subprogram_Definition
, Node_Kind
);
745 Cc
(N_Access_Function_Definition
, N_Access_To_Subprogram_Definition
,
746 (Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
747 Sy
(Null_Exclusion_In_Return_Present
, Flag
),
748 Sy
(Protected_Present
, Flag
),
749 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
750 Sy
(Result_Definition
, Node_Id
)));
752 Cc
(N_Access_Procedure_Definition
, N_Access_To_Subprogram_Definition
,
753 (Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
754 Sy
(Protected_Present
, Flag
),
755 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
)));
757 Ab
(N_Later_Decl_Item
, Node_Kind
);
758 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and includes
759 -- only those items which can appear as later declarative items. This also
760 -- includes N_Implicit_Label_Declaration which is not specifically in the
761 -- grammar but may appear as a valid later declarative items. It does NOT
762 -- include N_Pragma which can also appear among later declarative items.
763 -- It does however include N_Protected_Body, which is a bit peculiar, but
764 -- harmless since this cannot appear in Ada 83 mode anyway.
766 Cc
(N_Task_Type_Declaration
, N_Later_Decl_Item
,
767 (Sy
(Defining_Identifier
, Node_Id
),
768 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
769 Sy
(Interface_List
, List_Id
, Default_No_List
),
770 Sy
(Task_Definition
, Node_Id
, Default_Empty
),
771 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
772 Sm
(Corresponding_Body
, Node_Id
)));
774 Ab
(N_Body_Stub
, N_Later_Decl_Item
,
775 (Sm
(Corresponding_Body
, Node_Id
),
776 Sm
(Corresponding_Spec_Of_Stub
, Node_Id
),
777 Sm
(Library_Unit
, Node_Id
)));
779 Cc
(N_Package_Body_Stub
, N_Body_Stub
,
780 (Sy
(Defining_Identifier
, Node_Id
),
781 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
783 Cc
(N_Protected_Body_Stub
, N_Body_Stub
,
784 (Sy
(Defining_Identifier
, Node_Id
),
785 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
787 Cc
(N_Subprogram_Body_Stub
, N_Body_Stub
,
788 (Sy
(Specification
, Node_Id
),
789 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
791 Cc
(N_Task_Body_Stub
, N_Body_Stub
,
792 (Sy
(Defining_Identifier
, Node_Id
),
793 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
795 Ab
(N_Generic_Instantiation
, N_Later_Decl_Item
,
796 (Sm
(Instance_Spec
, Node_Id
),
797 Sm
(Is_Declaration_Level_Node
, Flag
),
798 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
799 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
800 Sm
(Is_Known_Guaranteed_ABE
, Flag
),
801 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
802 Sm
(Parent_Spec
, Node_Id
)));
804 Ab
(N_Subprogram_Instantiation
, N_Generic_Instantiation
);
806 Cc
(N_Function_Instantiation
, N_Subprogram_Instantiation
,
807 (Sy
(Defining_Unit_Name
, Node_Id
),
808 Sy
(Name
, Node_Id
, Default_Empty
),
809 Sy
(Generic_Associations
, List_Id
, Default_No_List
),
810 Sy
(Must_Override
, Flag
),
811 Sy
(Must_Not_Override
, Flag
),
812 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
814 Cc
(N_Procedure_Instantiation
, N_Subprogram_Instantiation
,
815 (Sy
(Defining_Unit_Name
, Node_Id
),
816 Sy
(Name
, Node_Id
, Default_Empty
),
817 Sy
(Generic_Associations
, List_Id
, Default_No_List
),
818 Sy
(Must_Override
, Flag
),
819 Sy
(Must_Not_Override
, Flag
),
820 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
822 Cc
(N_Package_Instantiation
, N_Generic_Instantiation
,
823 (Sy
(Defining_Unit_Name
, Node_Id
),
824 Sy
(Name
, Node_Id
, Default_Empty
),
825 Sy
(Generic_Associations
, List_Id
, Default_No_List
),
826 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
828 Ab
(N_Proper_Body
, N_Later_Decl_Item
,
829 (Sm
(Corresponding_Spec
, Node_Id
),
830 Sm
(Was_Originally_Stub
, Flag
)));
832 Ab
(N_Unit_Body
, N_Proper_Body
);
834 Cc
(N_Package_Body
, N_Unit_Body
,
835 (Sy
(Defining_Unit_Name
, Node_Id
),
836 Sy
(Declarations
, List_Id
, Default_No_List
),
837 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
838 Sy
(At_End_Proc
, Node_Id
, Default_Empty
),
839 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
841 Cc
(N_Subprogram_Body
, N_Unit_Body
,
842 (Sy
(Specification
, Node_Id
),
843 Sy
(Declarations
, List_Id
, Default_No_List
),
844 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
845 Sy
(Bad_Is_Detected
, Flag
),
846 Sy
(At_End_Proc
, Node_Id
, Default_Empty
),
847 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
848 Sm
(Activation_Chain_Entity
, Node_Id
),
849 Sm
(Acts_As_Spec
, Flag
),
850 Sm
(Corresponding_Entry_Body
, Node_Id
),
851 Sm
(Do_Storage_Check
, Flag
),
852 Sm
(Has_Relative_Deadline_Pragma
, Flag
),
853 Sm
(Is_Entry_Barrier_Function
, Flag
),
854 Sm
(Is_Protected_Subprogram_Body
, Flag
),
855 Sm
(Is_Task_Body_Procedure
, Flag
),
856 Sm
(Is_Task_Master
, Flag
),
857 Sm
(Was_Attribute_Reference
, Flag
),
858 Sm
(Was_Expression_Function
, Flag
)));
860 Cc
(N_Protected_Body
, N_Proper_Body
,
861 (Sy
(Defining_Identifier
, Node_Id
),
862 Sy
(Declarations
, List_Id
, Default_No_List
),
863 Sy
(End_Label
, Node_Id
, Default_Empty
),
864 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
866 Cc
(N_Task_Body
, N_Proper_Body
,
867 (Sy
(Defining_Identifier
, Node_Id
),
868 Sy
(Declarations
, List_Id
, Default_No_List
),
869 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
870 Sy
(At_End_Proc
, Node_Id
, Default_Empty
),
871 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
872 Sm
(Activation_Chain_Entity
, Node_Id
),
873 Sm
(Is_Task_Master
, Flag
)));
875 Cc
(N_Implicit_Label_Declaration
, N_Later_Decl_Item
,
876 (Sy
(Defining_Identifier
, Node_Id
),
877 Sm
(Label_Construct
, Node_Id
)));
879 Cc
(N_Package_Declaration
, N_Later_Decl_Item
,
880 (Sy
(Specification
, Node_Id
),
881 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
882 Sm
(Activation_Chain_Entity
, Node_Id
),
883 Sm
(Corresponding_Body
, Node_Id
),
884 Sm
(Parent_Spec
, Node_Id
)));
886 Cc
(N_Single_Task_Declaration
, N_Later_Decl_Item
,
887 (Sy
(Defining_Identifier
, Node_Id
),
888 Sy
(Interface_List
, List_Id
, Default_No_List
),
889 Sy
(Task_Definition
, Node_Id
, Default_Empty
),
890 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
892 Cc
(N_Subprogram_Declaration
, N_Later_Decl_Item
,
893 (Sy
(Specification
, Node_Id
),
894 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
895 Sm
(Body_To_Inline
, Node_Id
),
896 Sm
(Corresponding_Body
, Node_Id
),
897 Sm
(Is_Entry_Barrier_Function
, Flag
),
898 Sm
(Is_Task_Body_Procedure
, Flag
),
899 Sm
(Parent_Spec
, Node_Id
)));
901 Cc
(N_Use_Package_Clause
, N_Later_Decl_Item
,
902 (Sy
(Name
, Node_Id
, Default_Empty
),
903 Sy
(Is_Effective_Use_Clause
, Flag
),
904 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Associated_Node
905 Sm
(Hidden_By_Use_Clause
, Elist_Id
),
907 Sm
(Next_Use_Clause
, Node_Id
),
909 Sm
(Prev_Use_Clause
, Node_Id
)));
911 Ab
(N_Generic_Declaration
, N_Later_Decl_Item
,
912 (Sm
(Corresponding_Body
, Node_Id
),
913 Sm
(Parent_Spec
, Node_Id
)));
915 Cc
(N_Generic_Package_Declaration
, N_Generic_Declaration
,
916 (Sy
(Specification
, Node_Id
),
917 Sy
(Generic_Formal_Declarations
, List_Id
),
918 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
919 Sm
(Activation_Chain_Entity
, Node_Id
)));
921 Cc
(N_Generic_Subprogram_Declaration
, N_Generic_Declaration
,
922 (Sy
(Specification
, Node_Id
),
923 Sy
(Generic_Formal_Declarations
, List_Id
),
924 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
926 Ab
(N_Array_Type_Definition
, Node_Kind
);
928 Cc
(N_Constrained_Array_Definition
, N_Array_Type_Definition
,
929 (Sy
(Discrete_Subtype_Definitions
, List_Id
),
930 Sy
(Component_Definition
, Node_Id
)));
932 Cc
(N_Unconstrained_Array_Definition
, N_Array_Type_Definition
,
933 (Sy
(Subtype_Marks
, List_Id
),
934 Sy
(Component_Definition
, Node_Id
)));
936 Ab
(N_Renaming_Declaration
, Node_Kind
);
938 Cc
(N_Exception_Renaming_Declaration
, N_Renaming_Declaration
,
939 (Sy
(Defining_Identifier
, Node_Id
),
940 Sy
(Name
, Node_Id
, Default_Empty
),
941 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
943 Cc
(N_Object_Renaming_Declaration
, N_Renaming_Declaration
,
944 (Sy
(Defining_Identifier
, Node_Id
),
945 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
946 Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
947 Sy
(Access_Definition
, Node_Id
, Default_Empty
),
948 Sy
(Name
, Node_Id
, Default_Empty
),
949 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
950 Sm
(Comes_From_Iterator
, Flag
),
951 Sm
(Corresponding_Generic_Association
, Node_Id
)));
953 Cc
(N_Package_Renaming_Declaration
, N_Renaming_Declaration
,
954 (Sy
(Defining_Unit_Name
, Node_Id
),
955 Sy
(Name
, Node_Id
, Default_Empty
),
956 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
957 Sm
(Parent_Spec
, Node_Id
)));
959 Cc
(N_Subprogram_Renaming_Declaration
, N_Renaming_Declaration
,
960 (Sy
(Specification
, Node_Id
),
961 Sy
(Name
, Node_Id
, Default_Empty
),
962 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
963 Sm
(Corresponding_Formal_Spec
, Node_Id
),
964 Sm
(Corresponding_Spec
, Node_Id
),
965 Sm
(From_Default
, Flag
),
966 Sm
(Parent_Spec
, Node_Id
)));
968 Ab
(N_Generic_Renaming_Declaration
, N_Renaming_Declaration
,
969 (Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
970 Sm
(Parent_Spec
, Node_Id
)));
972 Cc
(N_Generic_Function_Renaming_Declaration
, N_Generic_Renaming_Declaration
,
973 (Sy
(Defining_Unit_Name
, Node_Id
),
974 Sy
(Name
, Node_Id
, Default_Empty
)));
976 Cc
(N_Generic_Package_Renaming_Declaration
, N_Generic_Renaming_Declaration
,
977 (Sy
(Defining_Unit_Name
, Node_Id
),
978 Sy
(Name
, Node_Id
, Default_Empty
)));
980 Cc
(N_Generic_Procedure_Renaming_Declaration
, N_Generic_Renaming_Declaration
,
981 (Sy
(Defining_Unit_Name
, Node_Id
),
982 Sy
(Name
, Node_Id
, Default_Empty
)));
984 Ab
(N_Statement_Other_Than_Procedure_Call
, Node_Kind
);
985 -- Note that this includes all statement types except for the cases of the
986 -- N_Procedure_Call_Statement which is considered to be a subexpression
987 -- (since overloading is possible, so it needs to go through the normal
988 -- overloading resolution for expressions).
990 Cc
(N_Abort_Statement
, N_Statement_Other_Than_Procedure_Call
,
991 (Sy
(Names
, List_Id
)));
993 Cc
(N_Accept_Statement
, N_Statement_Other_Than_Procedure_Call
,
994 (Sy
(Entry_Direct_Name
, Node_Id
),
995 Sy
(Entry_Index
, Node_Id
, Default_Empty
),
996 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
997 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
998 Sy
(Declarations
, List_Id
, Default_No_List
)));
1000 Cc
(N_Assignment_Statement
, N_Statement_Other_Than_Procedure_Call
,
1001 (Sy
(Name
, Node_Id
, Default_Empty
),
1002 Sy
(Expression
, Node_Id
, Default_Empty
),
1003 Sm
(Backwards_OK
, Flag
),
1004 Sm
(Componentwise_Assignment
, Flag
),
1005 Sm
(Do_Discriminant_Check
, Flag
),
1006 Sm
(Do_Length_Check
, Flag
),
1007 Sm
(Forwards_OK
, Flag
),
1008 Sm
(Has_Target_Names
, Flag
),
1009 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
1010 Sm
(Is_Elaboration_Code
, Flag
),
1011 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
1012 Sm
(No_Ctrl_Actions
, Flag
),
1013 Sm
(No_Finalize_Actions
, Flag
),
1014 Sm
(Suppress_Assignment_Checks
, Flag
)));
1016 Cc
(N_Asynchronous_Select
, N_Statement_Other_Than_Procedure_Call
,
1017 (Sy
(Triggering_Alternative
, Node_Id
),
1018 Sy
(Abortable_Part
, Node_Id
)));
1020 Cc
(N_Block_Statement
, N_Statement_Other_Than_Procedure_Call
,
1021 (Sy
(Identifier
, Node_Id
, Default_Empty
),
1022 Sy
(Declarations
, List_Id
, Default_No_List
),
1023 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
1024 Sy
(Has_Created_Identifier
, Flag
),
1025 Sy
(Is_Asynchronous_Call_Block
, Flag
),
1026 Sy
(Is_Task_Allocation_Block
, Flag
),
1027 Sy
(At_End_Proc
, Node_Id
, Default_Empty
),
1028 Sm
(Activation_Chain_Entity
, Node_Id
),
1029 Sm
(Cleanup_Actions
, List_Id
),
1030 Sm
(Exception_Junk
, Flag
),
1031 Sm
(Is_Abort_Block
, Flag
),
1032 Sm
(Is_Finalization_Wrapper
, Flag
),
1033 Sm
(Is_Initialization_Block
, Flag
),
1034 Sm
(Is_Task_Master
, Flag
)));
1036 Cc
(N_Case_Statement
, N_Statement_Other_Than_Procedure_Call
,
1037 (Sy
(Expression
, Node_Id
, Default_Empty
),
1038 Sy
(Alternatives
, List_Id
, Default_No_List
),
1039 Sy
(End_Span
, Unat
, Default_Uint_0
),
1040 Sm
(From_Conditional_Expression
, Flag
)));
1042 Cc
(N_Code_Statement
, N_Statement_Other_Than_Procedure_Call
,
1043 (Sy
(Expression
, Node_Id
, Default_Empty
)));
1045 Cc
(N_Compound_Statement
, N_Statement_Other_Than_Procedure_Call
,
1046 (Sy
(Actions
, List_Id
, Default_No_List
)));
1048 Cc
(N_Conditional_Entry_Call
, N_Statement_Other_Than_Procedure_Call
,
1049 (Sy
(Entry_Call_Alternative
, Node_Id
),
1050 Sy
(Else_Statements
, List_Id
, Default_No_List
)));
1052 Ab
(N_Delay_Statement
, N_Statement_Other_Than_Procedure_Call
);
1054 Cc
(N_Delay_Relative_Statement
, N_Delay_Statement
,
1055 (Sy
(Expression
, Node_Id
, Default_Empty
)));
1057 Cc
(N_Delay_Until_Statement
, N_Delay_Statement
,
1058 (Sy
(Expression
, Node_Id
, Default_Empty
)));
1060 Cc
(N_Entry_Call_Statement
, N_Statement_Other_Than_Procedure_Call
,
1061 (Sy
(Name
, Node_Id
, Default_Empty
),
1062 Sy
(Parameter_Associations
, List_Id
, Default_No_List
),
1063 Sm
(First_Named_Actual
, Node_Id
),
1064 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
1065 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
1066 Sm
(Is_SPARK_Mode_On_Node
, Flag
)));
1068 Cc
(N_Free_Statement
, N_Statement_Other_Than_Procedure_Call
,
1069 (Sy
(Expression
, Node_Id
, Default_Empty
),
1070 Sm
(Actual_Designated_Subtype
, Node_Id
),
1071 Sm
(Procedure_To_Call
, Node_Id
),
1072 Sm
(Storage_Pool
, Node_Id
)));
1074 Cc
(N_Goto_Statement
, N_Statement_Other_Than_Procedure_Call
,
1075 (Sy
(Name
, Node_Id
, Default_Empty
),
1076 Sm
(Exception_Junk
, Flag
)));
1078 Cc
(N_Goto_When_Statement
, N_Statement_Other_Than_Procedure_Call
,
1079 (Sy
(Name
, Node_Id
, Default_Empty
),
1080 Sy
(Condition
, Node_Id
, Default_Empty
)));
1082 Cc
(N_Loop_Statement
, N_Statement_Other_Than_Procedure_Call
,
1083 (Sy
(Identifier
, Node_Id
, Default_Empty
),
1084 Sy
(Iteration_Scheme
, Node_Id
, Default_Empty
),
1085 Sy
(Statements
, List_Id
, Default_Empty_List
),
1086 Sy
(End_Label
, Node_Id
, Default_Empty
),
1087 Sy
(Has_Created_Identifier
, Flag
),
1088 Sy
(Is_Null_Loop
, Flag
),
1089 Sy
(Suppress_Loop_Warnings
, Flag
)));
1091 Cc
(N_Null_Statement
, N_Statement_Other_Than_Procedure_Call
,
1092 (Sm
(Next_Rep_Item
, Node_Id
)));
1094 Cc
(N_Raise_Statement
, N_Statement_Other_Than_Procedure_Call
,
1095 (Sy
(Name
, Node_Id
, Default_Empty
),
1096 Sy
(Expression
, Node_Id
, Default_Empty
)));
1098 Cc
(N_Raise_When_Statement
, N_Statement_Other_Than_Procedure_Call
,
1099 (Sy
(Name
, Node_Id
, Default_Empty
),
1100 Sy
(Expression
, Node_Id
, Default_Empty
),
1101 Sy
(Condition
, Node_Id
, Default_Empty
)));
1103 Cc
(N_Requeue_Statement
, N_Statement_Other_Than_Procedure_Call
,
1104 (Sy
(Name
, Node_Id
, Default_Empty
),
1105 Sy
(Abort_Present
, Flag
),
1106 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
1107 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
1108 Sm
(Is_SPARK_Mode_On_Node
, Flag
)));
1110 Cc
(N_Simple_Return_Statement
, N_Statement_Other_Than_Procedure_Call
,
1111 (Sy
(Expression
, Node_Id
, Default_Empty
),
1112 Sm
(Comes_From_Extended_Return_Statement
, Flag
),
1113 Sm
(Procedure_To_Call
, Node_Id
),
1114 Sm
(Return_Statement_Entity
, Node_Id
),
1115 Sm
(Storage_Pool
, Node_Id
)));
1117 Cc
(N_Extended_Return_Statement
, N_Statement_Other_Than_Procedure_Call
,
1118 (Sy
(Return_Object_Declarations
, List_Id
),
1119 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
1120 Sm
(Procedure_To_Call
, Node_Id
),
1121 Sm
(Return_Statement_Entity
, Node_Id
),
1122 Sm
(Storage_Pool
, Node_Id
)));
1124 Cc
(N_Return_When_Statement
, N_Statement_Other_Than_Procedure_Call
,
1125 (Sy
(Expression
, Node_Id
, Default_Empty
),
1126 Sy
(Condition
, Node_Id
, Default_Empty
)));
1128 Cc
(N_Selective_Accept
, N_Statement_Other_Than_Procedure_Call
,
1129 (Sy
(Select_Alternatives
, List_Id
),
1130 Sy
(Else_Statements
, List_Id
, Default_No_List
)));
1132 Cc
(N_Timed_Entry_Call
, N_Statement_Other_Than_Procedure_Call
,
1133 (Sy
(Entry_Call_Alternative
, Node_Id
),
1134 Sy
(Delay_Alternative
, Node_Id
)));
1136 Cc
(N_Exit_Statement
, N_Statement_Other_Than_Procedure_Call
,
1137 (Sy
(Name
, Node_Id
, Default_Empty
),
1138 Sy
(Condition
, Node_Id
, Default_Empty
),
1139 Sm
(Next_Exit_Statement
, Node_Id
)));
1141 Cc
(N_If_Statement
, N_Statement_Other_Than_Procedure_Call
,
1142 (Sy
(Condition
, Node_Id
, Default_Empty
),
1143 Sy
(Then_Statements
, List_Id
),
1144 Sy
(Elsif_Parts
, List_Id
, Default_No_List
),
1145 Sy
(Else_Statements
, List_Id
, Default_No_List
),
1146 Sy
(End_Span
, Unat
, Default_Uint_0
),
1147 Sm
(From_Conditional_Expression
, Flag
),
1148 Sm
(Comes_From_Check_Or_Contract
, Flag
)));
1150 Cc
(N_Accept_Alternative
, Node_Kind
,
1151 (Sy
(Accept_Statement
, Node_Id
),
1152 Sy
(Condition
, Node_Id
, Default_Empty
),
1153 Sy
(Statements
, List_Id
, Default_Empty_List
),
1154 Sy
(Pragmas_Before
, List_Id
, Default_No_List
),
1155 Sm
(Accept_Handler_Records
, List_Id
)));
1157 Cc
(N_Delay_Alternative
, Node_Kind
,
1158 (Sy
(Delay_Statement
, Node_Id
),
1159 Sy
(Condition
, Node_Id
, Default_Empty
),
1160 Sy
(Statements
, List_Id
, Default_Empty_List
),
1161 Sy
(Pragmas_Before
, List_Id
, Default_No_List
)));
1163 Cc
(N_Elsif_Part
, Node_Kind
,
1164 (Sy
(Condition
, Node_Id
, Default_Empty
),
1165 Sy
(Then_Statements
, List_Id
),
1166 Sm
(Condition_Actions
, List_Id
)));
1168 Cc
(N_Entry_Body_Formal_Part
, Node_Kind
,
1169 (Sy
(Entry_Index_Specification
, Node_Id
, Default_Empty
),
1170 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
1171 Sy
(Condition
, Node_Id
, Default_Empty
)));
1173 Cc
(N_Iteration_Scheme
, Node_Kind
,
1174 (Sy
(Condition
, Node_Id
, Default_Empty
),
1175 Sy
(Iterator_Specification
, Node_Id
, Default_Empty
),
1176 Sy
(Loop_Parameter_Specification
, Node_Id
, Default_Empty
),
1177 Sm
(Condition_Actions
, List_Id
)));
1179 Cc
(N_Terminate_Alternative
, Node_Kind
,
1180 (Sy
(Condition
, Node_Id
, Default_Empty
),
1181 Sy
(Pragmas_Before
, List_Id
, Default_No_List
),
1182 Sy
(Pragmas_After
, List_Id
, Default_No_List
)));
1184 Ab
(N_Formal_Subprogram_Declaration
, Node_Kind
);
1186 Cc
(N_Formal_Abstract_Subprogram_Declaration
, N_Formal_Subprogram_Declaration
,
1187 (Sy
(Specification
, Node_Id
),
1188 Sy
(Default_Name
, Node_Id
, Default_Empty
),
1189 Sy
(Expression
, Node_Id
, Default_Empty
),
1190 Sy
(Box_Present
, Flag
),
1191 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
1193 Cc
(N_Formal_Concrete_Subprogram_Declaration
, N_Formal_Subprogram_Declaration
,
1194 (Sy
(Specification
, Node_Id
),
1195 Sy
(Default_Name
, Node_Id
, Default_Empty
),
1196 Sy
(Expression
, Node_Id
, Default_Empty
),
1197 Sy
(Box_Present
, Flag
),
1198 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
1200 Ab
(N_Push_Pop_xxx_Label
, Node_Kind
);
1202 Ab
(N_Push_xxx_Label
, N_Push_Pop_xxx_Label
,
1203 (Sm
(Exception_Label
, Node_Id
)));
1205 Cc
(N_Push_Constraint_Error_Label
, N_Push_xxx_Label
);
1207 Cc
(N_Push_Program_Error_Label
, N_Push_xxx_Label
);
1209 Cc
(N_Push_Storage_Error_Label
, N_Push_xxx_Label
);
1211 Ab
(N_Pop_xxx_Label
, N_Push_Pop_xxx_Label
);
1213 Cc
(N_Pop_Constraint_Error_Label
, N_Pop_xxx_Label
);
1215 Cc
(N_Pop_Program_Error_Label
, N_Pop_xxx_Label
);
1217 Cc
(N_Pop_Storage_Error_Label
, N_Pop_xxx_Label
);
1219 Ab
(N_SCIL_Node
, Node_Kind
,
1220 (Sm
(SCIL_Entity
, Node_Id
)));
1222 Cc
(N_SCIL_Dispatch_Table_Tag_Init
, N_SCIL_Node
);
1224 Cc
(N_SCIL_Dispatching_Call
, N_SCIL_Node
,
1225 (Sm
(SCIL_Controlling_Tag
, Node_Id
),
1226 Sm
(SCIL_Target_Prim
, Node_Id
)));
1228 Cc
(N_SCIL_Membership_Test
, N_SCIL_Node
,
1229 (Sm
(SCIL_Tag_Value
, Node_Id
)));
1231 Cc
(N_Abortable_Part
, Node_Kind
,
1232 (Sy
(Statements
, List_Id
, Default_Empty_List
)));
1234 Cc
(N_Abstract_Subprogram_Declaration
, Node_Kind
,
1235 (Sy
(Specification
, Node_Id
),
1236 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
1238 Cc
(N_Access_Definition
, Node_Kind
,
1239 (Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1240 Sy
(All_Present
, Flag
),
1241 Sy
(Constant_Present
, Flag
),
1242 Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
1243 Sy
(Access_To_Subprogram_Definition
, Node_Id
, Default_Empty
)));
1245 Cc
(N_Access_To_Object_Definition
, Node_Kind
,
1246 (Sy
(All_Present
, Flag
),
1247 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1248 Sy
(Null_Excluding_Subtype
, Flag
),
1249 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
),
1250 Sy
(Constant_Present
, Flag
)));
1252 Cc
(N_Aspect_Specification
, Node_Kind
,
1253 (Sy
(Identifier
, Node_Id
, Default_Empty
),
1254 Sy
(Expression
, Node_Id
, Default_Empty
),
1255 Sy
(Class_Present
, Flag
),
1256 Sy
(Split_PPC
, Flag
),
1257 Sm
(Aspect_On_Partial_View
, Flag
),
1258 Sm
(Aspect_Rep_Item
, Node_Id
),
1259 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Entity
1260 Sm
(Expression_Copy
, Node_Id
),
1261 Sm
(Is_Boolean_Aspect
, Flag
),
1262 Sm
(Is_Checked
, Flag
),
1263 Sm
(Is_Delayed_Aspect
, Flag
),
1264 Sm
(Is_Disabled
, Flag
),
1265 Sm
(Is_Ignored
, Flag
),
1266 Sm
(Next_Rep_Item
, Node_Id
)));
1268 Cc
(N_Call_Marker
, Node_Kind
,
1269 (Sm
(Is_Declaration_Level_Node
, Flag
),
1270 Sm
(Is_Dispatching_Call
, Flag
),
1271 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
1272 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
1273 Sm
(Is_Known_Guaranteed_ABE
, Flag
),
1274 Sm
(Is_Preelaborable_Call
, Flag
),
1275 Sm
(Is_Source_Call
, Flag
),
1276 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
1277 Sm
(Target
, Node_Id
)));
1279 Cc
(N_Case_Expression_Alternative
, Node_Kind
,
1280 (Sm
(Actions
, List_Id
),
1281 Sy
(Discrete_Choices
, List_Id
),
1282 Sy
(Expression
, Node_Id
, Default_Empty
),
1283 Sm
(Has_SP_Choice
, Flag
)));
1285 Cc
(N_Case_Statement_Alternative
, Node_Kind
,
1286 (Sy
(Discrete_Choices
, List_Id
),
1287 Sy
(Statements
, List_Id
, Default_Empty_List
),
1288 Sm
(Has_SP_Choice
, Flag
),
1289 Sm
(Multidefined_Bindings
, Flag
)));
1291 Cc
(N_Compilation_Unit
, Node_Kind
,
1292 (Sy
(Context_Items
, List_Id
),
1293 Sy
(Private_Present
, Flag
),
1295 Sy
(Aux_Decls_Node
, Node_Id
),
1296 Sm
(Acts_As_Spec
, Flag
),
1297 Sm
(Body_Required
, Flag
),
1298 Sm
(Context_Pending
, Flag
),
1299 Sm
(First_Inlined_Subprogram
, Node_Id
),
1300 Sm
(Has_No_Elaboration_Code
, Flag
),
1301 Sm
(Has_Pragma_Suppress_All
, Flag
),
1302 Sm
(Library_Unit
, Node_Id
),
1303 Sm
(Save_Invocation_Graph_Of_Body
, Flag
)));
1305 Cc
(N_Compilation_Unit_Aux
, Node_Kind
,
1306 (Sy
(Declarations
, List_Id
, Default_No_List
),
1307 Sy
(Actions
, List_Id
, Default_No_List
),
1308 Sy
(Pragmas_After
, List_Id
, Default_No_List
),
1309 Sy
(Config_Pragmas
, List_Id
, Default_Empty_List
),
1310 Sm
(Default_Storage_Pool
, Node_Id
)));
1312 Cc
(N_Component_Association
, Node_Kind
,
1313 (Sy
(Choices
, List_Id
),
1314 Sy
(Expression
, Node_Id
, Default_Empty
),
1315 Sy
(Box_Present
, Flag
),
1316 Sy
(Inherited_Discriminant
, Flag
),
1317 Sy
(Binding_Chars
, Name_Id
, Default_No_Name
),
1318 Sm
(Loop_Actions
, List_Id
),
1319 Sm
(Was_Default_Init_Box_Association
, Flag
)));
1321 Cc
(N_Component_Definition
, Node_Kind
,
1322 (Sy
(Aliased_Present
, Flag
),
1323 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1324 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
),
1325 Sy
(Access_Definition
, Node_Id
, Default_Empty
)));
1327 Cc
(N_Component_List
, Node_Kind
,
1328 (Sy
(Component_Items
, List_Id
),
1329 Sy
(Variant_Part
, Node_Id
, Default_Empty
),
1330 Sy
(Null_Present
, Flag
)));
1332 Cc
(N_Contract
, Node_Kind
,
1333 (Sm
(Classifications
, Node_Id
),
1334 Sm
(Contract_Test_Cases
, Node_Id
),
1335 Sm
(Is_Expanded_Contract
, Flag
),
1336 Sm
(Pre_Post_Conditions
, Node_Id
)));
1338 Cc
(N_Derived_Type_Definition
, Node_Kind
,
1339 (Sy
(Abstract_Present
, Flag
),
1340 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1341 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
),
1342 Sy
(Record_Extension_Part
, Node_Id
, Default_Empty
),
1343 Sy
(Limited_Present
, Flag
),
1344 Sy
(Task_Present
, Flag
),
1345 Sy
(Protected_Present
, Flag
),
1346 Sy
(Synchronized_Present
, Flag
),
1347 Sy
(Interface_List
, List_Id
, Default_No_List
),
1348 Sy
(Interface_Present
, Flag
)));
1350 Cc
(N_Decimal_Fixed_Point_Definition
, Node_Kind
,
1351 (Sy
(Delta_Expression
, Node_Id
),
1352 Sy
(Digits_Expression
, Node_Id
),
1353 Sy
(Real_Range_Specification
, Node_Id
, Default_Empty
)));
1355 Cc
(N_Defining_Program_Unit_Name
, Node_Kind
,
1356 (Sy
(Name
, Node_Id
, Default_Empty
),
1357 Sy
(Defining_Identifier
, Node_Id
)));
1359 Cc
(N_Delta_Constraint
, Node_Kind
,
1360 (Sy
(Delta_Expression
, Node_Id
),
1361 Sy
(Range_Constraint
, Node_Id
, Default_Empty
)));
1363 Cc
(N_Designator
, Node_Kind
,
1364 (Sy
(Name
, Node_Id
, Default_Empty
),
1365 Sy
(Identifier
, Node_Id
, Default_Empty
)));
1367 Cc
(N_Digits_Constraint
, Node_Kind
,
1368 (Sy
(Digits_Expression
, Node_Id
),
1369 Sy
(Range_Constraint
, Node_Id
, Default_Empty
)));
1371 Cc
(N_Discriminant_Association
, Node_Kind
,
1372 (Sy
(Selector_Names
, List_Id
),
1373 Sy
(Expression
, Node_Id
, Default_Empty
)));
1375 Cc
(N_Discriminant_Specification
, Node_Kind
,
1376 (Sy
(Defining_Identifier
, Node_Id
),
1377 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1378 Sy
(Discriminant_Type
, Node_Id
),
1379 Sy
(Expression
, Node_Id
, Default_Empty
),
1380 Sm
(More_Ids
, Flag
),
1381 Sm
(Prev_Ids
, Flag
)));
1383 Cc
(N_Enumeration_Type_Definition
, Node_Kind
,
1384 (Sy
(Literals
, List_Id
),
1385 Sy
(End_Label
, Node_Id
, Default_Empty
)));
1387 Cc
(N_Entry_Body
, Node_Kind
,
1388 (Sy
(Defining_Identifier
, Node_Id
),
1389 Sy
(Entry_Body_Formal_Part
, Node_Id
),
1390 Sy
(Declarations
, List_Id
, Default_No_List
),
1391 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
1392 Sy
(At_End_Proc
, Node_Id
, Default_Empty
),
1393 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
1394 Sm
(Activation_Chain_Entity
, Node_Id
),
1395 Sm
(Corresponding_Spec
, Node_Id
)));
1397 Cc
(N_Entry_Call_Alternative
, Node_Kind
,
1398 (Sy
(Entry_Call_Statement
, Node_Id
),
1399 Sy
(Statements
, List_Id
, Default_Empty_List
),
1400 Sy
(Pragmas_Before
, List_Id
, Default_No_List
)));
1402 Cc
(N_Entry_Index_Specification
, Node_Kind
,
1403 (Sy
(Defining_Identifier
, Node_Id
),
1404 Sy
(Discrete_Subtype_Definition
, Node_Id
, Default_Empty
)));
1406 Cc
(N_Exception_Declaration
, N_Declaration
,
1407 (Sy
(Defining_Identifier
, Node_Id
),
1408 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
1409 Sm
(Expression
, Node_Id
),
1410 Sm
(More_Ids
, Flag
),
1411 Sm
(Prev_Ids
, Flag
),
1412 Sm
(Renaming_Exception
, Node_Id
)));
1414 Cc
(N_Exception_Handler
, Node_Kind
,
1415 (Sy
(Choice_Parameter
, Node_Id
, Default_Empty
),
1416 Sy
(Exception_Choices
, List_Id
),
1417 Sy
(Statements
, List_Id
, Default_Empty_List
),
1418 Sm
(Exception_Label
, Node_Id
),
1419 Sm
(Has_Local_Raise
, Flag
),
1420 Sm
(Local_Raise_Not_OK
, Flag
),
1421 Sm
(Local_Raise_Statements
, Elist_Id
)));
1423 Cc
(N_Floating_Point_Definition
, Node_Kind
,
1424 (Sy
(Digits_Expression
, Node_Id
),
1425 Sy
(Real_Range_Specification
, Node_Id
, Default_Empty
)));
1427 Cc
(N_Formal_Decimal_Fixed_Point_Definition
, Node_Kind
);
1429 Cc
(N_Formal_Derived_Type_Definition
, Node_Kind
,
1430 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
1431 Sy
(Private_Present
, Flag
),
1432 Sy
(Abstract_Present
, Flag
),
1433 Sy
(Limited_Present
, Flag
),
1434 Sy
(Synchronized_Present
, Flag
),
1435 Sy
(Interface_List
, List_Id
, Default_No_List
)));
1437 Cc
(N_Formal_Discrete_Type_Definition
, Node_Kind
);
1439 Cc
(N_Formal_Floating_Point_Definition
, Node_Kind
);
1441 Cc
(N_Formal_Modular_Type_Definition
, Node_Kind
);
1443 Cc
(N_Formal_Ordinary_Fixed_Point_Definition
, Node_Kind
);
1445 Cc
(N_Formal_Package_Declaration
, Node_Kind
,
1446 (Sy
(Defining_Identifier
, Node_Id
),
1447 Sy
(Name
, Node_Id
, Default_Empty
),
1448 Sy
(Generic_Associations
, List_Id
, Default_No_List
),
1449 Sy
(Box_Present
, Flag
),
1450 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
1451 Sm
(Instance_Spec
, Node_Id
),
1452 Sm
(Is_Known_Guaranteed_ABE
, Flag
)));
1454 Cc
(N_Formal_Private_Type_Definition
, Node_Kind
,
1455 (Sy
(Abstract_Present
, Flag
),
1456 Sy
(Tagged_Present
, Flag
),
1457 Sy
(Limited_Present
, Flag
),
1458 Sm
(Uninitialized_Variable
, Node_Id
)));
1460 Cc
(N_Formal_Incomplete_Type_Definition
, Node_Kind
,
1461 (Sy
(Tagged_Present
, Flag
)));
1463 Cc
(N_Formal_Signed_Integer_Type_Definition
, Node_Kind
);
1465 Cc
(N_Freeze_Entity
, Node_Kind
,
1466 (Sy
(Actions
, List_Id
, Default_No_List
),
1467 Sm
(Access_Types_To_Process
, Elist_Id
),
1468 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Entity
1469 Sm
(First_Subtype_Link
, Node_Id
),
1470 Sm
(TSS_Elist
, Elist_Id
)));
1472 Cc
(N_Freeze_Generic_Entity
, Node_Kind
,
1473 Sm
(Entity_Or_Associated_Node
, Node_Id
)); -- just Entity
1475 Cc
(N_Generic_Association
, Node_Kind
,
1476 (Sy
(Selector_Name
, Node_Id
, Default_Empty
),
1477 Sy
(Explicit_Generic_Actual_Parameter
, Node_Id
),
1478 Sy
(Box_Present
, Flag
)));
1480 Cc
(N_Handled_Sequence_Of_Statements
, Node_Kind
,
1481 (Sy
(Statements
, List_Id
, Default_Empty_List
),
1482 Sy
(End_Label
, Node_Id
, Default_Empty
),
1483 Sy
(Exception_Handlers
, List_Id
, Default_No_List
),
1484 Sy
(At_End_Proc
, Node_Id
, Default_Empty
)));
1486 Cc
(N_Index_Or_Discriminant_Constraint
, Node_Kind
,
1487 (Sy
(Constraints
, List_Id
)));
1489 Cc
(N_Iterated_Component_Association
, Node_Kind
,
1490 (Sy
(Defining_Identifier
, Node_Id
),
1491 Sy
(Iterator_Specification
, Node_Id
, Default_Empty
),
1492 Sy
(Expression
, Node_Id
, Default_Empty
),
1493 Sy
(Discrete_Choices
, List_Id
),
1494 Sy
(Box_Present
, Flag
),
1495 Sm
(Loop_Actions
, List_Id
)));
1497 Cc
(N_Iterated_Element_Association
, Node_Kind
,
1498 (Sy
(Key_Expression
, Node_Id
),
1499 Sy
(Iterator_Specification
, Node_Id
, Default_Empty
),
1500 Sy
(Expression
, Node_Id
, Default_Empty
),
1501 Sy
(Loop_Parameter_Specification
, Node_Id
, Default_Empty
),
1502 Sy
(Box_Present
, Flag
),
1503 Sm
(Loop_Actions
, List_Id
)));
1505 Cc
(N_Itype_Reference
, Node_Kind
,
1506 (Sm
(Itype
, Node_Id
)));
1508 Cc
(N_Label
, Node_Kind
,
1509 (Sy
(Identifier
, Node_Id
, Default_Empty
),
1510 Sm
(Exception_Junk
, Flag
)));
1512 Cc
(N_Modular_Type_Definition
, Node_Kind
,
1513 (Sy
(Expression
, Node_Id
, Default_Empty
)));
1515 Cc
(N_Number_Declaration
, Node_Kind
,
1516 (Sy
(Defining_Identifier
, Node_Id
),
1517 Sy
(Expression
, Node_Id
, Default_Empty
),
1518 Sm
(More_Ids
, Flag
),
1519 Sm
(Prev_Ids
, Flag
)));
1521 Cc
(N_Ordinary_Fixed_Point_Definition
, Node_Kind
,
1522 (Sy
(Delta_Expression
, Node_Id
),
1523 Sy
(Real_Range_Specification
, Node_Id
, Default_Empty
)));
1525 Cc
(N_Others_Choice
, Node_Kind
,
1526 (Sm
(All_Others
, Flag
),
1527 Sm
(Others_Discrete_Choices
, List_Id
)));
1529 Cc
(N_Package_Specification
, Node_Kind
,
1530 (Sy
(Defining_Unit_Name
, Node_Id
),
1531 Sy
(Visible_Declarations
, List_Id
),
1532 Sy
(Private_Declarations
, List_Id
, Default_No_List
),
1533 Sy
(End_Label
, Node_Id
, Default_Empty
),
1534 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
1535 Sm
(Generic_Parent
, Node_Id
),
1536 Sm
(Limited_View_Installed
, Flag
)));
1538 Cc
(N_Parameter_Association
, Node_Kind
,
1539 (Sy
(Selector_Name
, Node_Id
, Default_Empty
),
1540 Sy
(Explicit_Actual_Parameter
, Node_Id
),
1541 Sm
(Is_Accessibility_Actual
, Flag
),
1542 Sm
(Next_Named_Actual
, Node_Id
)));
1544 Cc
(N_Parameter_Specification
, Node_Kind
,
1545 (Sy
(Defining_Identifier
, Node_Id
),
1546 Sy
(Aliased_Present
, Flag
),
1547 Sy
(In_Present
, Flag
),
1548 Sy
(Out_Present
, Flag
),
1549 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1550 Sy
(Parameter_Type
, Node_Id
),
1551 Sy
(Expression
, Node_Id
, Default_Empty
),
1552 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
),
1553 Sm
(Default_Expression
, Node_Id
),
1554 Sm
(More_Ids
, Flag
),
1555 Sm
(Prev_Ids
, Flag
)));
1557 Cc
(N_Pragma
, Node_Kind
,
1558 (Sy
(Pragma_Argument_Associations
, List_Id
, Default_No_List
),
1559 Sy
(Pragma_Identifier
, Node_Id
),
1560 Sy
(Class_Present
, Flag
),
1561 Sy
(Split_PPC
, Flag
),
1562 Sm
(Corresponding_Aspect
, Node_Id
),
1563 Sm
(From_Aspect_Specification
, Flag
),
1564 Sm
(Import_Interface_Present
, Flag
),
1565 Sm
(Is_Analyzed_Pragma
, Flag
),
1566 Sm
(Is_Checked
, Flag
),
1567 Sm
(Is_Checked_Ghost_Pragma
, Flag
),
1568 Sm
(Is_Delayed_Aspect
, Flag
),
1569 Sm
(Is_Disabled
, Flag
),
1570 Sm
(Is_Generic_Contract_Pragma
, Flag
),
1571 Sm
(Is_Ignored
, Flag
),
1572 Sm
(Is_Ignored_Ghost_Pragma
, Flag
),
1573 Sm
(Is_Inherited_Pragma
, Flag
),
1574 Sm
(Next_Pragma
, Node_Id
),
1575 Sm
(Next_Rep_Item
, Node_Id
),
1576 Sm
(Uneval_Old_Accept
, Flag
),
1577 Sm
(Uneval_Old_Warn
, Flag
)));
1579 Cc
(N_Protected_Definition
, Node_Kind
,
1580 (Sy
(Visible_Declarations
, List_Id
),
1581 Sy
(Private_Declarations
, List_Id
, Default_No_List
),
1582 Sy
(End_Label
, Node_Id
, Default_Empty
)));
1584 Cc
(N_Range_Constraint
, Node_Kind
,
1585 (Sy
(Range_Expression
, Node_Id
)));
1587 Cc
(N_Real_Range_Specification
, Node_Kind
,
1588 (Sy
(Low_Bound
, Node_Id
),
1589 Sy
(High_Bound
, Node_Id
)));
1591 Cc
(N_Record_Definition
, Node_Kind
,
1592 (Sy
(End_Label
, Node_Id
, Default_Empty
),
1593 Sy
(Abstract_Present
, Flag
),
1594 Sy
(Tagged_Present
, Flag
),
1595 Sy
(Limited_Present
, Flag
),
1596 Sy
(Component_List
, Node_Id
),
1597 Sy
(Null_Present
, Flag
),
1598 Sy
(Task_Present
, Flag
),
1599 Sy
(Protected_Present
, Flag
),
1600 Sy
(Synchronized_Present
, Flag
),
1601 Sy
(Interface_Present
, Flag
),
1602 Sy
(Interface_List
, List_Id
, Default_No_List
)));
1604 Cc
(N_Signed_Integer_Type_Definition
, Node_Kind
,
1605 (Sy
(Low_Bound
, Node_Id
),
1606 Sy
(High_Bound
, Node_Id
)));
1608 Cc
(N_Single_Protected_Declaration
, Node_Kind
,
1609 (Sy
(Defining_Identifier
, Node_Id
),
1610 Sy
(Interface_List
, List_Id
, Default_No_List
),
1611 Sy
(Protected_Definition
, Node_Id
),
1612 Sy
(Aspect_Specifications
, List_Id
, Default_No_List
)));
1614 Cc
(N_Subunit
, Node_Kind
,
1615 (Sy
(Name
, Node_Id
, Default_Empty
),
1616 Sy
(Proper_Body
, Node_Id
),
1617 Sm
(Corresponding_Stub
, Node_Id
)));
1619 Cc
(N_Task_Definition
, Node_Kind
,
1620 (Sy
(Visible_Declarations
, List_Id
),
1621 Sy
(Private_Declarations
, List_Id
, Default_No_List
),
1622 Sy
(End_Label
, Node_Id
, Default_Empty
),
1623 Sm
(Has_Relative_Deadline_Pragma
, Flag
),
1624 Sm
(Has_Storage_Size_Pragma
, Flag
)));
1626 Cc
(N_Triggering_Alternative
, Node_Kind
,
1627 (Sy
(Triggering_Statement
, Node_Id
),
1628 Sy
(Statements
, List_Id
, Default_Empty_List
),
1629 Sy
(Pragmas_Before
, List_Id
, Default_No_List
)));
1631 Cc
(N_Use_Type_Clause
, Node_Kind
,
1632 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
1633 Sy
(Is_Effective_Use_Clause
, Flag
),
1634 Sy
(All_Present
, Flag
),
1635 Sm
(Hidden_By_Use_Clause
, Elist_Id
),
1636 Sm
(More_Ids
, Flag
),
1637 Sm
(Next_Use_Clause
, Node_Id
),
1638 Sm
(Prev_Ids
, Flag
),
1639 Sm
(Prev_Use_Clause
, Node_Id
),
1640 Sm
(Used_Operations
, Elist_Id
)));
1642 Cc
(N_Validate_Unchecked_Conversion
, Node_Kind
,
1643 (Sm
(Source_Type
, Node_Id
),
1644 Sm
(Target_Type
, Node_Id
)));
1646 Cc
(N_Variable_Reference_Marker
, Node_Kind
,
1647 (Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
1648 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
1650 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
1651 Sm
(Is_Write
, Flag
),
1652 Sm
(Target
, Node_Id
)));
1654 Cc
(N_Variant
, Node_Kind
,
1655 (Sy
(Discrete_Choices
, List_Id
),
1656 Sy
(Component_List
, Node_Id
),
1657 Sm
(Dcheck_Function
, Node_Id
),
1658 Sm
(Enclosing_Variant
, Node_Id
),
1659 Sm
(Has_SP_Choice
, Flag
),
1660 Sm
(Present_Expr
, Uint
)));
1662 Cc
(N_Variant_Part
, Node_Kind
,
1663 (Sy
(Name
, Node_Id
, Default_Empty
),
1664 Sy
(Variants
, List_Id
)));
1666 Cc
(N_With_Clause
, Node_Kind
,
1667 (Sy
(Name
, Node_Id
, Default_Empty
),
1668 Sy
(Private_Present
, Flag
),
1669 Sy
(Limited_Present
, Flag
),
1670 Sy
(First_Name
, Flag
, Default_True
),
1671 Sy
(Last_Name
, Flag
, Default_True
),
1672 Sm
(Context_Installed
, Flag
),
1673 Sm
(Corresponding_Spec
, Node_Id
),
1674 Sm
(Elaborate_All_Desirable
, Flag
),
1675 Sm
(Elaborate_All_Present
, Flag
),
1676 Sm
(Elaborate_Desirable
, Flag
),
1677 Sm
(Elaborate_Present
, Flag
),
1678 Sm
(Implicit_With
, Flag
),
1679 Sm
(Library_Unit
, Node_Id
),
1680 Sm
(Limited_View_Installed
, Flag
),
1681 Sm
(Next_Implicit_With
, Node_Id
),
1682 Sm
(No_Entities_Ref_In_Spec
, Flag
),
1683 Sm
(Parent_With
, Flag
),
1684 Sm
(Unreferenced_In_Spec
, Flag
)));
1686 Cc
(N_Unused_At_End
, Node_Kind
);
1688 -- Union types. These don't fit into the normal parent/child hierarchy
1693 (N_Attribute_Definition_Clause
,
1695 N_Pragma_Argument_Association
,
1701 N_Character_Literal
,
1704 Union
(N_Has_Condition
,
1708 N_Accept_Alternative
,
1709 N_Delay_Alternative
,
1711 N_Entry_Body_Formal_Part
,
1713 N_Terminate_Alternative
));
1714 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
1716 Union
(N_Has_Bounds
,
1719 N_Real_Range_Specification
,
1720 N_Signed_Integer_Type_Definition
));
1721 -- Nodes that have Low_Bound and High_Bound defined
1727 N_Subtype_Indication
));
1728 -- Nodes that can be an index of an array
1730 Union
(N_Entity_Name
,
1734 N_Operator_Symbol
));
1735 -- Nodes that are definitely representing an entity.
1736 -- Some N_Attribute_Reference nodes may also represent an entity. See
1744 N_Discriminant_Specification
,
1745 N_Entry_Index_Specification
,
1746 N_Enumeration_Type_Definition
,
1747 N_Exception_Handler
,
1748 N_Explicit_Dereference
,
1749 N_Expression_With_Actions
,
1750 N_Extension_Aggregate
,
1752 N_Iterated_Component_Association
,
1756 N_Number_Declaration
,
1757 N_Package_Specification
,
1758 N_Parameter_Specification
,
1759 N_Renaming_Declaration
,
1760 N_Quantified_Expression
));
1761 -- Nodes that can be returned by Declaration_Node; it can also return
1762 -- Empty. Not all of these are true "declarations", but Declaration_Node
1763 -- can return them in some cases.
1767 (N_Character_Literal
,
1771 N_Subtype_Indication
));
1772 -- Nodes that can be used to specify a range
1774 Union
(N_Is_Case_Choice
,
1778 -- Nodes that can be in the choices of a case statement
1780 Union
(N_Is_Exception_Choice
,
1784 -- Nodes that can be in the choices of an exception handler
1786 Union
(N_Alternative
,
1788 (N_Case_Statement_Alternative
,
1790 -- Nodes that can be alternatives in case contructs
1792 end Gen_IL
.Gen
.Gen_Nodes
;