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
(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
)));
181 Cc
(N_Identifier
, N_Direct_Name
,
182 (Sy
(Chars
, Name_Id
, Default_No_Name
),
183 Sm
(Atomic_Sync_Required
, Flag
),
184 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
185 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
186 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
187 Sm
(Original_Discriminant
, Node_Id
),
188 Sm
(Redundant_Use
, Flag
)));
190 Cc
(N_Operator_Symbol
, N_Direct_Name
,
191 (Sy
(Chars
, Name_Id
, Default_No_Name
),
192 Sy
(Strval
, String_Id
)));
194 Cc
(N_Character_Literal
, N_Direct_Name
,
195 (Sy
(Chars
, Name_Id
, Default_No_Name
),
196 Sy
(Char_Literal_Value
, Unat
)));
198 Ab
(N_Op
, N_Has_Entity
,
199 (Sm
(Do_Overflow_Check
, Flag
),
200 Sm
(Has_Private_View
, Flag
)));
202 Ab
(N_Binary_Op
, N_Op
);
204 Cc
(N_Op_Add
, N_Binary_Op
,
205 (Sm
(Chars
, Name_Id
),
206 Sy
(Left_Opnd
, Node_Id
),
207 Sy
(Right_Opnd
, Node_Id
)));
209 Cc
(N_Op_Concat
, N_Binary_Op
,
210 (Sm
(Chars
, Name_Id
),
211 Sy
(Left_Opnd
, Node_Id
),
212 Sy
(Right_Opnd
, Node_Id
),
213 Sm
(Is_Component_Left_Opnd
, Flag
),
214 Sm
(Is_Component_Right_Opnd
, Flag
)));
216 Cc
(N_Op_Expon
, N_Binary_Op
,
217 (Sm
(Chars
, Name_Id
),
218 Sy
(Left_Opnd
, Node_Id
),
219 Sy
(Right_Opnd
, Node_Id
),
220 Sm
(Is_Power_Of_2_For_Shift
, Flag
)));
222 Cc
(N_Op_Subtract
, N_Binary_Op
,
223 (Sm
(Chars
, Name_Id
),
224 Sy
(Left_Opnd
, Node_Id
),
225 Sy
(Right_Opnd
, Node_Id
)));
227 Ab
(N_Multiplying_Operator
, N_Binary_Op
);
229 Cc
(N_Op_Divide
, N_Multiplying_Operator
,
230 (Sm
(Chars
, Name_Id
),
231 Sy
(Left_Opnd
, Node_Id
),
232 Sy
(Right_Opnd
, Node_Id
),
233 Sm
(Do_Division_Check
, Flag
),
234 Sm
(Rounded_Result
, Flag
)));
236 Cc
(N_Op_Mod
, N_Multiplying_Operator
,
237 (Sm
(Chars
, Name_Id
),
238 Sy
(Left_Opnd
, Node_Id
),
239 Sy
(Right_Opnd
, Node_Id
),
240 Sm
(Do_Division_Check
, Flag
)));
242 Cc
(N_Op_Multiply
, N_Multiplying_Operator
,
243 (Sm
(Chars
, Name_Id
),
244 Sy
(Left_Opnd
, Node_Id
),
245 Sy
(Right_Opnd
, Node_Id
),
246 Sm
(Rounded_Result
, Flag
)));
248 Cc
(N_Op_Rem
, N_Multiplying_Operator
,
249 (Sm
(Chars
, Name_Id
),
250 Sy
(Left_Opnd
, Node_Id
),
251 Sy
(Right_Opnd
, Node_Id
),
252 Sm
(Do_Division_Check
, Flag
)));
254 Ab
(N_Op_Boolean
, N_Binary_Op
);
255 -- Binary operators that take operands of a boolean type, and yield a
256 -- result of a boolean type.
258 Cc
(N_Op_And
, N_Op_Boolean
,
259 (Sm
(Chars
, Name_Id
),
260 Sy
(Left_Opnd
, Node_Id
),
261 Sy
(Right_Opnd
, Node_Id
),
262 Sm
(Do_Length_Check
, Flag
)));
264 Ab
(N_Op_Compare
, N_Op_Boolean
);
266 Cc
(N_Op_Eq
, N_Op_Compare
,
267 (Sm
(Chars
, Name_Id
),
268 Sy
(Left_Opnd
, Node_Id
),
269 Sy
(Right_Opnd
, Node_Id
)));
271 Cc
(N_Op_Ge
, N_Op_Compare
,
272 (Sm
(Chars
, Name_Id
),
273 Sy
(Left_Opnd
, Node_Id
),
274 Sy
(Right_Opnd
, Node_Id
)));
276 Cc
(N_Op_Gt
, N_Op_Compare
,
277 (Sm
(Chars
, Name_Id
),
278 Sy
(Left_Opnd
, Node_Id
),
279 Sy
(Right_Opnd
, Node_Id
)));
281 Cc
(N_Op_Le
, N_Op_Compare
,
282 (Sm
(Chars
, Name_Id
),
283 Sy
(Left_Opnd
, Node_Id
),
284 Sy
(Right_Opnd
, Node_Id
)));
286 Cc
(N_Op_Lt
, N_Op_Compare
,
287 (Sm
(Chars
, Name_Id
),
288 Sy
(Left_Opnd
, Node_Id
),
289 Sy
(Right_Opnd
, Node_Id
)));
291 Cc
(N_Op_Ne
, N_Op_Compare
,
292 (Sm
(Chars
, Name_Id
),
293 Sy
(Left_Opnd
, Node_Id
),
294 Sy
(Right_Opnd
, Node_Id
)));
296 Cc
(N_Op_Or
, N_Op_Boolean
,
297 (Sm
(Chars
, Name_Id
),
298 Sy
(Left_Opnd
, Node_Id
),
299 Sy
(Right_Opnd
, Node_Id
),
300 Sm
(Do_Length_Check
, Flag
)));
302 Cc
(N_Op_Xor
, N_Op_Boolean
,
303 (Sm
(Chars
, Name_Id
),
304 Sy
(Left_Opnd
, Node_Id
),
305 Sy
(Right_Opnd
, Node_Id
),
306 Sm
(Do_Length_Check
, Flag
)));
308 Ab
(N_Op_Shift
, N_Binary_Op
,
309 (Sm
(Shift_Count_OK
, Flag
)));
311 Cc
(N_Op_Rotate_Left
, N_Op_Shift
,
312 (Sm
(Chars
, Name_Id
),
313 Sy
(Left_Opnd
, Node_Id
),
314 Sy
(Right_Opnd
, Node_Id
)));
316 Cc
(N_Op_Rotate_Right
, N_Op_Shift
,
317 (Sm
(Chars
, Name_Id
),
318 Sy
(Left_Opnd
, Node_Id
),
319 Sy
(Right_Opnd
, Node_Id
)));
321 Cc
(N_Op_Shift_Left
, N_Op_Shift
,
322 (Sm
(Chars
, Name_Id
),
323 Sy
(Left_Opnd
, Node_Id
),
324 Sy
(Right_Opnd
, Node_Id
)));
326 Cc
(N_Op_Shift_Right
, N_Op_Shift
,
327 (Sm
(Chars
, Name_Id
),
328 Sy
(Left_Opnd
, Node_Id
),
329 Sy
(Right_Opnd
, Node_Id
)));
331 Cc
(N_Op_Shift_Right_Arithmetic
, N_Op_Shift
,
332 (Sm
(Chars
, Name_Id
),
333 Sy
(Left_Opnd
, Node_Id
),
334 Sy
(Right_Opnd
, Node_Id
)));
336 Ab
(N_Unary_Op
, N_Op
);
338 Cc
(N_Op_Abs
, N_Unary_Op
,
339 (Sm
(Chars
, Name_Id
),
340 Sy
(Right_Opnd
, Node_Id
)));
342 Cc
(N_Op_Minus
, N_Unary_Op
,
343 (Sm
(Chars
, Name_Id
),
344 Sy
(Right_Opnd
, Node_Id
)));
346 Cc
(N_Op_Not
, N_Unary_Op
,
347 (Sm
(Chars
, Name_Id
),
348 Sy
(Right_Opnd
, Node_Id
)));
350 Cc
(N_Op_Plus
, N_Unary_Op
,
351 (Sm
(Chars
, Name_Id
),
352 Sy
(Right_Opnd
, Node_Id
)));
354 Cc
(N_Attribute_Reference
, N_Has_Entity
,
355 (Sy
(Prefix
, Node_Id
),
356 Sy
(Attribute_Name
, Name_Id
),
357 Sy
(Expressions
, List_Id
, Default_No_List
),
358 Sm
(Do_Overflow_Check
, Flag
),
359 Sm
(Header_Size_Added
, Flag
),
360 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
361 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
362 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
363 Sm
(Must_Be_Byte_Aligned
, Flag
),
364 Sm
(Redundant_Use
, Flag
)));
366 Ab
(N_Membership_Test
, N_Subexpr
);
368 Cc
(N_In
, N_Membership_Test
,
369 (Sy
(Left_Opnd
, Node_Id
),
370 Sy
(Right_Opnd
, Node_Id
),
371 Sy
(Alternatives
, List_Id
, Default_No_List
),
372 Sy
(No_Minimize_Eliminate
, Flag
)));
374 Cc
(N_Not_In
, N_Membership_Test
,
375 (Sy
(Left_Opnd
, Node_Id
),
376 Sy
(Right_Opnd
, Node_Id
),
377 Sy
(Alternatives
, List_Id
, Default_No_List
),
378 Sy
(No_Minimize_Eliminate
, Flag
)));
380 Ab
(N_Short_Circuit
, N_Subexpr
);
382 Cc
(N_And_Then
, N_Short_Circuit
,
383 (Sy
(Left_Opnd
, Node_Id
),
384 Sy
(Right_Opnd
, Node_Id
),
385 Sm
(Actions
, List_Id
)));
387 Cc
(N_Or_Else
, N_Short_Circuit
,
388 (Sy
(Left_Opnd
, Node_Id
),
389 Sy
(Right_Opnd
, Node_Id
),
390 Sm
(Actions
, List_Id
)));
392 Ab
(N_Subprogram_Call
, N_Subexpr
,
393 (Sm
(Controlling_Argument
, Node_Id
),
394 Sm
(First_Named_Actual
, Node_Id
),
395 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
396 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
397 Sm
(Is_Known_Guaranteed_ABE
, Flag
),
398 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
399 Sm
(No_Elaboration_Check
, Flag
)));
401 Cc
(N_Function_Call
, N_Subprogram_Call
,
402 (Sy
(Name
, Node_Id
, Default_Empty
),
403 Sy
(Parameter_Associations
, List_Id
, Default_No_List
),
404 Sm
(Is_Expanded_Build_In_Place_Call
, Flag
),
405 Sm
(No_Side_Effect_Removal
, Flag
)));
407 Cc
(N_Procedure_Call_Statement
, N_Subprogram_Call
,
408 (Sy
(Name
, Node_Id
, Default_Empty
),
409 Sy
(Parameter_Associations
, List_Id
, Default_No_List
)));
411 Ab
(N_Raise_xxx_Error
, N_Subexpr
);
413 Cc
(N_Raise_Constraint_Error
, N_Raise_xxx_Error
,
414 (Sy
(Condition
, Node_Id
, Default_Empty
),
417 Cc
(N_Raise_Program_Error
, N_Raise_xxx_Error
,
418 (Sy
(Condition
, Node_Id
, Default_Empty
),
421 Cc
(N_Raise_Storage_Error
, N_Raise_xxx_Error
,
422 (Sy
(Condition
, Node_Id
, Default_Empty
),
425 Ab
(N_Numeric_Or_String_Literal
, N_Subexpr
);
427 Cc
(N_Integer_Literal
, N_Numeric_Or_String_Literal
,
428 (Sy
(Intval
, Valid_Uint
),
429 Sm
(Original_Entity
, Node_Id
),
430 Sm
(Print_In_Hex
, Flag
)));
432 Cc
(N_Real_Literal
, N_Numeric_Or_String_Literal
,
433 (Sy
(Realval
, Ureal
),
434 Sm
(Corresponding_Integer_Value
, Valid_Uint
),
435 Sm
(Is_Machine_Number
, Flag
),
436 Sm
(Original_Entity
, Node_Id
)));
438 Cc
(N_String_Literal
, N_Numeric_Or_String_Literal
,
439 (Sy
(Strval
, String_Id
),
440 Sy
(Is_Folded_In_Parser
, Flag
),
441 Sm
(Has_Wide_Character
, Flag
),
442 Sm
(Has_Wide_Wide_Character
, Flag
)));
444 Cc
(N_Interpolated_String_Literal
, N_Numeric_Or_String_Literal
,
445 (Sy
(Expressions
, List_Id
, Default_No_List
)));
447 Cc
(N_Explicit_Dereference
, N_Subexpr
,
448 (Sy
(Prefix
, Node_Id
),
449 Sm
(Actual_Designated_Subtype
, Node_Id
),
450 Sm
(Atomic_Sync_Required
, Flag
),
451 Sm
(Has_Dereference_Action
, Flag
)));
453 Cc
(N_Expression_With_Actions
, N_Subexpr
,
454 (Sy
(Actions
, List_Id
, Default_No_List
),
455 Sy
(Expression
, Node_Id
, Default_Empty
)));
457 Cc
(N_If_Expression
, N_Subexpr
,
458 (Sy
(Expressions
, List_Id
, Default_No_List
),
460 Sm
(Do_Overflow_Check
, Flag
),
461 Sm
(Else_Actions
, List_Id
),
462 Sm
(Then_Actions
, List_Id
)));
464 Cc
(N_Indexed_Component
, N_Subexpr
,
465 (Sy
(Prefix
, Node_Id
),
466 Sy
(Expressions
, List_Id
, Default_No_List
),
467 Sm
(Atomic_Sync_Required
, Flag
),
468 Sm
(Generalized_Indexing
, Node_Id
)));
470 Cc
(N_Null
, N_Subexpr
);
472 Cc
(N_Qualified_Expression
, N_Subexpr
,
473 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
474 Sy
(Expression
, Node_Id
, Default_Empty
),
475 Sm
(Is_Qualified_Universal_Literal
, Flag
)));
477 Cc
(N_Quantified_Expression
, N_Subexpr
,
478 (Sy
(Iterator_Specification
, Node_Id
, Default_Empty
),
479 Sy
(Loop_Parameter_Specification
, Node_Id
, Default_Empty
),
480 Sy
(Condition
, Node_Id
, Default_Empty
),
481 Sy
(All_Present
, Flag
)));
483 Cc
(N_Aggregate
, N_Subexpr
,
484 (Sy
(Expressions
, List_Id
, Default_No_List
),
485 Sy
(Component_Associations
, List_Id
, Default_No_List
),
486 Sy
(Null_Record_Present
, Flag
),
487 Sy
(Is_Parenthesis_Aggregate
, Flag
),
488 Sy
(Is_Homogeneous_Aggregate
, Flag
),
489 Sy
(Is_Enum_Array_Aggregate
, Flag
),
490 Sm
(Aggregate_Bounds
, Node_Id
),
491 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Associated_Node
492 Sm
(Compile_Time_Known_Aggregate
, Flag
),
493 Sm
(Expansion_Delayed
, Flag
),
494 Sm
(Has_Self_Reference
, Flag
)));
496 Cc
(N_Allocator
, N_Subexpr
,
497 (Sy
(Expression
, Node_Id
, Default_Empty
),
498 Sy
(Subpool_Handle_Name
, Node_Id
, Default_Empty
),
499 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
500 Sm
(For_Special_Return_Object
, Flag
),
501 Sm
(Do_Storage_Check
, Flag
),
502 Sm
(Is_Dynamic_Coextension
, Flag
),
503 Sm
(Is_Static_Coextension
, Flag
),
504 Sm
(No_Initialization
, Flag
),
505 Sm
(Procedure_To_Call
, Node_Id
),
506 Sm
(Storage_Pool
, Node_Id
)));
508 Cc
(N_Case_Expression
, N_Subexpr
,
509 (Sy
(Expression
, Node_Id
, Default_Empty
),
510 Sy
(Alternatives
, List_Id
, Default_No_List
),
511 Sm
(Do_Overflow_Check
, Flag
)));
513 Cc
(N_Delta_Aggregate
, N_Subexpr
,
514 (Sy
(Expression
, Node_Id
, Default_Empty
),
515 Sy
(Is_Homogeneous_Aggregate
, Flag
),
516 Sy
(Component_Associations
, List_Id
, Default_No_List
)));
518 Cc
(N_Extension_Aggregate
, N_Subexpr
,
519 (Sy
(Ancestor_Part
, Node_Id
),
520 Sy
(Expressions
, List_Id
, Default_No_List
),
521 Sy
(Component_Associations
, List_Id
, Default_No_List
),
522 Sy
(Null_Record_Present
, Flag
),
523 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Associated_Node
524 Sm
(Expansion_Delayed
, Flag
),
525 Sm
(Has_Self_Reference
, Flag
)));
527 Cc
(N_Raise_Expression
, N_Subexpr
,
528 (Sy
(Name
, Node_Id
, Default_Empty
),
529 Sy
(Expression
, Node_Id
, Default_Empty
)));
531 Cc
(N_Range
, N_Subexpr
,
532 (Sy
(Low_Bound
, Node_Id
),
533 Sy
(High_Bound
, Node_Id
),
534 Sy
(Includes_Infinities
, Flag
)));
536 Cc
(N_Reference
, N_Subexpr
,
537 (Sy
(Prefix
, Node_Id
)));
539 Cc
(N_Selected_Component
, N_Subexpr
,
540 (Sy
(Prefix
, Node_Id
),
541 Sy
(Selector_Name
, Node_Id
, Default_Empty
),
542 Sm
(Atomic_Sync_Required
, Flag
),
543 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Associated_Node
544 Sm
(Do_Discriminant_Check
, Flag
),
545 Sm
(Is_In_Discriminant_Check
, Flag
),
546 Sm
(Is_Prefixed_Call
, Flag
)));
548 Cc
(N_Slice
, N_Subexpr
,
549 (Sy
(Prefix
, Node_Id
),
550 Sy
(Discrete_Range
, Node_Id
)));
552 Cc
(N_Target_Name
, N_Subexpr
);
554 Cc
(N_Type_Conversion
, N_Subexpr
,
555 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
556 Sy
(Expression
, Node_Id
, Default_Empty
),
557 Sm
(Conversion_OK
, Flag
),
558 Sm
(Do_Discriminant_Check
, Flag
),
559 Sm
(Do_Length_Check
, Flag
),
560 Sm
(Do_Overflow_Check
, Flag
),
561 Sm
(Float_Truncate
, Flag
),
562 Sm
(Rounded_Result
, Flag
)));
564 Cc
(N_Unchecked_Expression
, N_Subexpr
,
565 (Sy
(Expression
, Node_Id
, Default_Empty
)));
567 Cc
(N_Unchecked_Type_Conversion
, N_Subexpr
,
568 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
569 Sy
(Expression
, Node_Id
, Default_Empty
),
570 Sm
(Kill_Range_Check
, Flag
),
571 Sm
(No_Truncation
, Flag
)),
572 Nmake_Assert
=> "True or else Nkind (Expression) /= N_Unchecked_Type_Conversion");
573 -- Nmake_Assert => "Nkind (Expression) /= N_Unchecked_Type_Conversion");
574 -- Assert that we don't have unchecked conversions of unchecked
575 -- conversions; if Expression might be an unchecked conversion,
576 -- then Tbuild.Unchecked_Convert_To should be used.
578 Cc
(N_Subtype_Indication
, N_Has_Etype
,
579 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
580 Sy
(Constraint
, Node_Id
),
581 Sm
(Must_Not_Freeze
, Flag
)));
583 Ab
(N_Declaration
, Node_Kind
);
584 -- Note: this includes all constructs normally thought of as declarations
585 -- except those that are separately grouped in N_Later_Decl_Item. But
586 -- Declaration_Node may return yet more node types; see N_Is_Decl below.
588 Cc
(N_Component_Declaration
, N_Declaration
,
589 (Sy
(Defining_Identifier
, Node_Id
),
590 Sy
(Component_Definition
, Node_Id
),
591 Sy
(Expression
, Node_Id
, Default_Empty
),
593 Sm
(Prev_Ids
, Flag
)));
595 Cc
(N_Entry_Declaration
, N_Declaration
,
596 (Sy
(Defining_Identifier
, Node_Id
),
597 Sy
(Discrete_Subtype_Definition
, Node_Id
, Default_Empty
),
598 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
599 Sy
(Must_Override
, Flag
),
600 Sy
(Must_Not_Override
, Flag
),
601 Sm
(Corresponding_Body
, Node_Id
)));
603 Cc
(N_Expression_Function
, N_Declaration
,
604 (Sy
(Specification
, Node_Id
),
605 Sy
(Expression
, Node_Id
, Default_Empty
),
606 Sm
(Corresponding_Spec
, Node_Id
)));
608 Cc
(N_Formal_Object_Declaration
, N_Declaration
,
609 (Sy
(Defining_Identifier
, Node_Id
),
610 Sy
(In_Present
, Flag
),
611 Sy
(Out_Present
, Flag
),
612 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
613 Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
614 Sy
(Access_Definition
, Node_Id
, Default_Empty
),
615 Sy
(Default_Expression
, Node_Id
, Default_Empty
),
617 Sm
(Prev_Ids
, Flag
)));
619 Cc
(N_Formal_Type_Declaration
, N_Declaration
,
620 (Sy
(Defining_Identifier
, Node_Id
),
621 Sy
(Formal_Type_Definition
, Node_Id
),
622 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
623 Sy
(Unknown_Discriminants_Present
, Flag
),
624 Sy
(Default_Subtype_Mark
, Node_Id
)));
626 Cc
(N_Full_Type_Declaration
, N_Declaration
,
627 (Sy
(Defining_Identifier
, Node_Id
),
628 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
629 Sy
(Type_Definition
, Node_Id
),
630 Sm
(Discr_Check_Funcs_Built
, Flag
),
631 Sm
(Incomplete_View
, Node_Id
)));
633 Cc
(N_Incomplete_Type_Declaration
, N_Declaration
,
634 (Sy
(Defining_Identifier
, Node_Id
),
635 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
636 Sy
(Unknown_Discriminants_Present
, Flag
),
637 Sy
(Tagged_Present
, Flag
),
638 Sm
(Premature_Use
, Node_Id
)));
640 Cc
(N_Iterator_Specification
, N_Declaration
,
641 (Sy
(Defining_Identifier
, Node_Id
),
642 Sy
(Name
, Node_Id
, Default_Empty
),
643 Sy
(Reverse_Present
, Flag
),
644 Sy
(Of_Present
, Flag
),
645 Sy
(Iterator_Filter
, Node_Id
, Default_Empty
),
646 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
)));
648 Cc
(N_Loop_Parameter_Specification
, N_Declaration
,
649 (Sy
(Defining_Identifier
, Node_Id
),
650 Sy
(Reverse_Present
, Flag
),
651 Sy
(Iterator_Filter
, Node_Id
, Default_Empty
),
652 Sy
(Discrete_Subtype_Definition
, Node_Id
, Default_Empty
)));
654 Cc
(N_Object_Declaration
, N_Declaration
,
655 (Sy
(Defining_Identifier
, Node_Id
),
656 Sy
(Aliased_Present
, Flag
),
657 Sy
(Constant_Present
, Flag
),
658 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
659 Sy
(Object_Definition
, Node_Id
),
660 Sy
(Expression
, Node_Id
, Default_Empty
),
661 Sy
(Has_Init_Expression
, Flag
),
662 Sm
(Assignment_OK
, Flag
),
663 Sm
(Corresponding_Generic_Association
, Node_Id
),
664 Sm
(Exception_Junk
, Flag
),
665 Sm
(Handler_List_Entry
, Node_Id
),
666 Sm
(Is_Subprogram_Descriptor
, Flag
),
668 Sm
(No_Initialization
, Flag
),
670 Sm
(Suppress_Assignment_Checks
, Flag
)));
672 Cc
(N_Protected_Type_Declaration
, N_Declaration
,
673 (Sy
(Defining_Identifier
, Node_Id
),
674 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
675 Sy
(Interface_List
, List_Id
, Default_No_List
),
676 Sy
(Protected_Definition
, Node_Id
),
677 Sm
(Corresponding_Body
, Node_Id
)));
679 Cc
(N_Private_Extension_Declaration
, N_Declaration
,
680 (Sy
(Defining_Identifier
, Node_Id
),
681 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
682 Sy
(Unknown_Discriminants_Present
, Flag
),
683 Sy
(Abstract_Present
, Flag
),
684 Sy
(Limited_Present
, Flag
),
685 Sy
(Synchronized_Present
, Flag
),
686 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
),
687 Sy
(Interface_List
, List_Id
, Default_No_List
),
688 Sm
(Uninitialized_Variable
, Node_Id
)));
690 Cc
(N_Private_Type_Declaration
, N_Declaration
,
691 (Sy
(Defining_Identifier
, Node_Id
),
692 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
693 Sy
(Unknown_Discriminants_Present
, Flag
),
694 Sy
(Abstract_Present
, Flag
),
695 Sy
(Tagged_Present
, Flag
),
696 Sy
(Limited_Present
, Flag
)));
698 Cc
(N_Subtype_Declaration
, N_Declaration
,
699 (Sy
(Defining_Identifier
, Node_Id
),
700 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
701 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
),
702 Sm
(Exception_Junk
, Flag
),
703 Sm
(Generic_Parent_Type
, Node_Id
)));
705 Ab
(N_Subprogram_Specification
, N_Declaration
,
706 (Sm
(Generic_Parent
, Node_Id
)));
708 Cc
(N_Function_Specification
, N_Subprogram_Specification
,
709 (Sy
(Defining_Unit_Name
, Node_Id
),
710 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
711 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
712 Sy
(Result_Definition
, Node_Id
),
713 Sy
(Must_Override
, Flag
),
714 Sy
(Must_Not_Override
, Flag
)));
716 Cc
(N_Procedure_Specification
, N_Subprogram_Specification
,
717 (Sy
(Defining_Unit_Name
, Node_Id
),
718 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
719 Sy
(Null_Present
, Flag
),
720 Sy
(Must_Override
, Flag
),
721 Sy
(Must_Not_Override
, Flag
),
722 Sm
(Null_Statement
, Node_Id
)));
724 Ab
(N_Access_To_Subprogram_Definition
, Node_Kind
);
726 Cc
(N_Access_Function_Definition
, N_Access_To_Subprogram_Definition
,
727 (Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
728 Sy
(Null_Exclusion_In_Return_Present
, Flag
),
729 Sy
(Protected_Present
, Flag
),
730 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
731 Sy
(Result_Definition
, Node_Id
)));
733 Cc
(N_Access_Procedure_Definition
, N_Access_To_Subprogram_Definition
,
734 (Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
735 Sy
(Protected_Present
, Flag
),
736 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
)));
738 Ab
(N_Later_Decl_Item
, Node_Kind
);
739 -- Note: this is Ada 83 relevant only (see Ada 83 RM 3.9 (2)) and includes
740 -- only those items which can appear as later declarative items. This also
741 -- includes N_Implicit_Label_Declaration which is not specifically in the
742 -- grammar but may appear as a valid later declarative items. It does NOT
743 -- include N_Pragma which can also appear among later declarative items.
744 -- It does however include N_Protected_Body, which is a bit peculiar, but
745 -- harmless since this cannot appear in Ada 83 mode anyway.
747 Cc
(N_Task_Type_Declaration
, N_Later_Decl_Item
,
748 (Sy
(Defining_Identifier
, Node_Id
),
749 Sy
(Discriminant_Specifications
, List_Id
, Default_No_List
),
750 Sy
(Interface_List
, List_Id
, Default_No_List
),
751 Sy
(Task_Definition
, Node_Id
, Default_Empty
),
752 Sm
(Corresponding_Body
, Node_Id
)));
754 Ab
(N_Body_Stub
, N_Later_Decl_Item
,
755 (Sm
(Corresponding_Body
, Node_Id
),
756 Sm
(Corresponding_Spec_Of_Stub
, Node_Id
),
757 Sm
(Library_Unit
, Node_Id
)));
759 Cc
(N_Package_Body_Stub
, N_Body_Stub
,
760 (Sy
(Defining_Identifier
, Node_Id
)));
762 Cc
(N_Protected_Body_Stub
, N_Body_Stub
,
763 (Sy
(Defining_Identifier
, Node_Id
)));
765 Cc
(N_Subprogram_Body_Stub
, N_Body_Stub
,
766 (Sy
(Specification
, Node_Id
)));
768 Cc
(N_Task_Body_Stub
, N_Body_Stub
,
769 (Sy
(Defining_Identifier
, Node_Id
)));
771 Ab
(N_Generic_Instantiation
, N_Later_Decl_Item
,
772 (Sm
(Instance_Spec
, Node_Id
),
773 Sm
(Is_Declaration_Level_Node
, Flag
),
774 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
775 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
776 Sm
(Is_Known_Guaranteed_ABE
, Flag
),
777 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
778 Sm
(Parent_Spec
, Node_Id
)));
780 Ab
(N_Subprogram_Instantiation
, N_Generic_Instantiation
);
782 Cc
(N_Function_Instantiation
, N_Subprogram_Instantiation
,
783 (Sy
(Defining_Unit_Name
, Node_Id
),
784 Sy
(Name
, Node_Id
, Default_Empty
),
785 Sy
(Generic_Associations
, List_Id
, Default_No_List
),
786 Sy
(Must_Override
, Flag
),
787 Sy
(Must_Not_Override
, Flag
)));
789 Cc
(N_Procedure_Instantiation
, N_Subprogram_Instantiation
,
790 (Sy
(Defining_Unit_Name
, Node_Id
),
791 Sy
(Name
, Node_Id
, Default_Empty
),
792 Sy
(Generic_Associations
, List_Id
, Default_No_List
),
793 Sy
(Must_Override
, Flag
),
794 Sy
(Must_Not_Override
, Flag
)));
796 Cc
(N_Package_Instantiation
, N_Generic_Instantiation
,
797 (Sy
(Defining_Unit_Name
, Node_Id
),
798 Sy
(Name
, Node_Id
, Default_Empty
),
799 Sy
(Generic_Associations
, List_Id
, Default_No_List
)));
801 Ab
(N_Proper_Body
, N_Later_Decl_Item
,
802 (Sm
(Corresponding_Spec
, Node_Id
),
803 Sm
(Was_Originally_Stub
, Flag
)));
805 Ab
(N_Unit_Body
, N_Proper_Body
);
807 Cc
(N_Package_Body
, N_Unit_Body
,
808 (Sy
(Defining_Unit_Name
, Node_Id
),
809 Sy
(Declarations
, List_Id
, Default_No_List
),
810 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
811 Sy
(At_End_Proc
, Node_Id
, Default_Empty
)));
813 Cc
(N_Subprogram_Body
, N_Unit_Body
,
814 (Sy
(Specification
, Node_Id
),
815 Sy
(Declarations
, List_Id
, Default_No_List
),
816 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
817 Sy
(Bad_Is_Detected
, Flag
),
818 Sy
(At_End_Proc
, Node_Id
, Default_Empty
),
819 Sm
(Activation_Chain_Entity
, Node_Id
),
820 Sm
(Acts_As_Spec
, Flag
),
821 Sm
(Corresponding_Entry_Body
, Node_Id
),
822 Sm
(Do_Storage_Check
, Flag
),
823 Sm
(Has_Relative_Deadline_Pragma
, Flag
),
824 Sm
(Is_Entry_Barrier_Function
, Flag
),
825 Sm
(Is_Protected_Subprogram_Body
, Flag
),
826 Sm
(Is_Task_Body_Procedure
, Flag
),
827 Sm
(Is_Task_Master
, Flag
),
828 Sm
(Was_Attribute_Reference
, Flag
),
829 Sm
(Was_Expression_Function
, Flag
)));
831 Cc
(N_Protected_Body
, N_Proper_Body
,
832 (Sy
(Defining_Identifier
, Node_Id
),
833 Sy
(Declarations
, List_Id
, Default_No_List
),
834 Sy
(End_Label
, Node_Id
, Default_Empty
)));
836 Cc
(N_Task_Body
, N_Proper_Body
,
837 (Sy
(Defining_Identifier
, Node_Id
),
838 Sy
(Declarations
, List_Id
, Default_No_List
),
839 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
840 Sy
(At_End_Proc
, Node_Id
, Default_Empty
),
841 Sm
(Activation_Chain_Entity
, Node_Id
),
842 Sm
(Is_Task_Master
, Flag
)));
844 Cc
(N_Implicit_Label_Declaration
, N_Later_Decl_Item
,
845 (Sy
(Defining_Identifier
, Node_Id
),
846 Sm
(Label_Construct
, Node_Id
)));
848 Cc
(N_Package_Declaration
, N_Later_Decl_Item
,
849 (Sy
(Specification
, Node_Id
),
850 Sm
(Activation_Chain_Entity
, Node_Id
),
851 Sm
(Corresponding_Body
, Node_Id
),
852 Sm
(Parent_Spec
, Node_Id
)));
854 Cc
(N_Single_Task_Declaration
, N_Later_Decl_Item
,
855 (Sy
(Defining_Identifier
, Node_Id
),
856 Sy
(Interface_List
, List_Id
, Default_No_List
),
857 Sy
(Task_Definition
, Node_Id
, Default_Empty
)));
859 Cc
(N_Subprogram_Declaration
, N_Later_Decl_Item
,
860 (Sy
(Specification
, Node_Id
),
861 Sm
(Body_To_Inline
, Node_Id
),
862 Sm
(Corresponding_Body
, Node_Id
),
863 Sm
(Is_Entry_Barrier_Function
, Flag
),
864 Sm
(Is_Task_Body_Procedure
, Flag
),
865 Sm
(Parent_Spec
, Node_Id
)));
867 Cc
(N_Use_Package_Clause
, N_Later_Decl_Item
,
868 (Sy
(Name
, Node_Id
, Default_Empty
),
869 Sy
(Is_Effective_Use_Clause
, Flag
),
870 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Associated_Node
871 Sm
(Hidden_By_Use_Clause
, Elist_Id
),
873 Sm
(Next_Use_Clause
, Node_Id
),
875 Sm
(Prev_Use_Clause
, Node_Id
)));
877 Ab
(N_Generic_Declaration
, N_Later_Decl_Item
,
878 (Sm
(Corresponding_Body
, Node_Id
),
879 Sm
(Parent_Spec
, Node_Id
)));
881 Cc
(N_Generic_Package_Declaration
, N_Generic_Declaration
,
882 (Sy
(Specification
, Node_Id
),
883 Sy
(Generic_Formal_Declarations
, List_Id
),
884 Sm
(Activation_Chain_Entity
, Node_Id
)));
886 Cc
(N_Generic_Subprogram_Declaration
, N_Generic_Declaration
,
887 (Sy
(Specification
, Node_Id
),
888 Sy
(Generic_Formal_Declarations
, List_Id
)));
890 Ab
(N_Array_Type_Definition
, Node_Kind
);
892 Cc
(N_Constrained_Array_Definition
, N_Array_Type_Definition
,
893 (Sy
(Discrete_Subtype_Definitions
, List_Id
),
894 Sy
(Component_Definition
, Node_Id
)));
896 Cc
(N_Unconstrained_Array_Definition
, N_Array_Type_Definition
,
897 (Sy
(Subtype_Marks
, List_Id
),
898 Sy
(Component_Definition
, Node_Id
)));
900 Ab
(N_Renaming_Declaration
, Node_Kind
);
902 Cc
(N_Exception_Renaming_Declaration
, N_Renaming_Declaration
,
903 (Sy
(Defining_Identifier
, Node_Id
),
904 Sy
(Name
, Node_Id
, Default_Empty
)));
906 Cc
(N_Object_Renaming_Declaration
, N_Renaming_Declaration
,
907 (Sy
(Defining_Identifier
, Node_Id
),
908 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
909 Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
910 Sy
(Access_Definition
, Node_Id
, Default_Empty
),
911 Sy
(Name
, Node_Id
, Default_Empty
),
912 Sm
(Comes_From_Iterator
, Flag
),
913 Sm
(Corresponding_Generic_Association
, Node_Id
)));
915 Cc
(N_Package_Renaming_Declaration
, N_Renaming_Declaration
,
916 (Sy
(Defining_Unit_Name
, Node_Id
),
917 Sy
(Name
, Node_Id
, Default_Empty
),
918 Sm
(Parent_Spec
, Node_Id
)));
920 Cc
(N_Subprogram_Renaming_Declaration
, N_Renaming_Declaration
,
921 (Sy
(Specification
, Node_Id
),
922 Sy
(Name
, Node_Id
, Default_Empty
),
923 Sm
(Corresponding_Formal_Spec
, Node_Id
),
924 Sm
(Corresponding_Spec
, Node_Id
),
925 Sm
(From_Default
, Flag
),
926 Sm
(Parent_Spec
, Node_Id
)));
928 Ab
(N_Generic_Renaming_Declaration
, N_Renaming_Declaration
,
929 (Sm
(Parent_Spec
, Node_Id
)));
931 Cc
(N_Generic_Function_Renaming_Declaration
, N_Generic_Renaming_Declaration
,
932 (Sy
(Defining_Unit_Name
, Node_Id
),
933 Sy
(Name
, Node_Id
, Default_Empty
)));
935 Cc
(N_Generic_Package_Renaming_Declaration
, N_Generic_Renaming_Declaration
,
936 (Sy
(Defining_Unit_Name
, Node_Id
),
937 Sy
(Name
, Node_Id
, Default_Empty
)));
939 Cc
(N_Generic_Procedure_Renaming_Declaration
, N_Generic_Renaming_Declaration
,
940 (Sy
(Defining_Unit_Name
, Node_Id
),
941 Sy
(Name
, Node_Id
, Default_Empty
)));
943 Ab
(N_Statement_Other_Than_Procedure_Call
, Node_Kind
);
944 -- Note that this includes all statement types except for the cases of the
945 -- N_Procedure_Call_Statement which is considered to be a subexpression
946 -- (since overloading is possible, so it needs to go through the normal
947 -- overloading resolution for expressions).
949 Cc
(N_Abort_Statement
, N_Statement_Other_Than_Procedure_Call
,
950 (Sy
(Names
, List_Id
)));
952 Cc
(N_Accept_Statement
, N_Statement_Other_Than_Procedure_Call
,
953 (Sy
(Entry_Direct_Name
, Node_Id
),
954 Sy
(Entry_Index
, Node_Id
, Default_Empty
),
955 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
956 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
957 Sy
(Declarations
, List_Id
, Default_No_List
)));
959 Cc
(N_Assignment_Statement
, N_Statement_Other_Than_Procedure_Call
,
960 (Sy
(Name
, Node_Id
, Default_Empty
),
961 Sy
(Expression
, Node_Id
, Default_Empty
),
962 Sm
(Backwards_OK
, Flag
),
963 Sm
(Componentwise_Assignment
, Flag
),
964 Sm
(Do_Discriminant_Check
, Flag
),
965 Sm
(Do_Length_Check
, Flag
),
966 Sm
(Forwards_OK
, Flag
),
967 Sm
(Has_Target_Names
, Flag
),
968 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
969 Sm
(Is_Elaboration_Code
, Flag
),
970 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
971 Sm
(No_Ctrl_Actions
, Flag
),
972 Sm
(Suppress_Assignment_Checks
, Flag
)));
974 Cc
(N_Asynchronous_Select
, N_Statement_Other_Than_Procedure_Call
,
975 (Sy
(Triggering_Alternative
, Node_Id
),
976 Sy
(Abortable_Part
, Node_Id
)));
978 Cc
(N_Block_Statement
, N_Statement_Other_Than_Procedure_Call
,
979 (Sy
(Identifier
, Node_Id
, Default_Empty
),
980 Sy
(Declarations
, List_Id
, Default_No_List
),
981 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
982 Sy
(Has_Created_Identifier
, Flag
),
983 Sy
(Is_Asynchronous_Call_Block
, Flag
),
984 Sy
(Is_Task_Allocation_Block
, Flag
),
985 Sy
(At_End_Proc
, Node_Id
, Default_Empty
),
986 Sm
(Activation_Chain_Entity
, Node_Id
),
987 Sm
(Cleanup_Actions
, List_Id
),
988 Sm
(Exception_Junk
, Flag
),
989 Sm
(Is_Abort_Block
, Flag
),
990 Sm
(Is_Finalization_Wrapper
, Flag
),
991 Sm
(Is_Initialization_Block
, Flag
),
992 Sm
(Is_Task_Master
, Flag
)));
994 Cc
(N_Case_Statement
, N_Statement_Other_Than_Procedure_Call
,
995 (Sy
(Expression
, Node_Id
, Default_Empty
),
996 Sy
(Alternatives
, List_Id
, Default_No_List
),
997 Sy
(End_Span
, Unat
, Default_Uint_0
),
998 Sm
(From_Conditional_Expression
, Flag
)));
1000 Cc
(N_Code_Statement
, N_Statement_Other_Than_Procedure_Call
,
1001 (Sy
(Expression
, Node_Id
, Default_Empty
)));
1003 Cc
(N_Compound_Statement
, N_Statement_Other_Than_Procedure_Call
,
1004 (Sy
(Actions
, List_Id
, Default_No_List
)));
1006 Cc
(N_Conditional_Entry_Call
, N_Statement_Other_Than_Procedure_Call
,
1007 (Sy
(Entry_Call_Alternative
, Node_Id
),
1008 Sy
(Else_Statements
, List_Id
, Default_No_List
)));
1010 Ab
(N_Delay_Statement
, N_Statement_Other_Than_Procedure_Call
);
1012 Cc
(N_Delay_Relative_Statement
, N_Delay_Statement
,
1013 (Sy
(Expression
, Node_Id
, Default_Empty
)));
1015 Cc
(N_Delay_Until_Statement
, N_Delay_Statement
,
1016 (Sy
(Expression
, Node_Id
, Default_Empty
)));
1018 Cc
(N_Entry_Call_Statement
, N_Statement_Other_Than_Procedure_Call
,
1019 (Sy
(Name
, Node_Id
, Default_Empty
),
1020 Sy
(Parameter_Associations
, List_Id
, Default_No_List
),
1021 Sm
(First_Named_Actual
, Node_Id
),
1022 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
1023 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
1024 Sm
(Is_SPARK_Mode_On_Node
, Flag
)));
1026 Cc
(N_Free_Statement
, N_Statement_Other_Than_Procedure_Call
,
1027 (Sy
(Expression
, Node_Id
, Default_Empty
),
1028 Sm
(Actual_Designated_Subtype
, Node_Id
),
1029 Sm
(Procedure_To_Call
, Node_Id
),
1030 Sm
(Storage_Pool
, Node_Id
)));
1032 Cc
(N_Goto_Statement
, N_Statement_Other_Than_Procedure_Call
,
1033 (Sy
(Name
, Node_Id
, Default_Empty
),
1034 Sm
(Exception_Junk
, Flag
)));
1036 Cc
(N_Goto_When_Statement
, N_Statement_Other_Than_Procedure_Call
,
1037 (Sy
(Name
, Node_Id
, Default_Empty
),
1038 Sy
(Condition
, Node_Id
, Default_Empty
)));
1040 Cc
(N_Loop_Statement
, N_Statement_Other_Than_Procedure_Call
,
1041 (Sy
(Identifier
, Node_Id
, Default_Empty
),
1042 Sy
(Iteration_Scheme
, Node_Id
, Default_Empty
),
1043 Sy
(Statements
, List_Id
, Default_Empty_List
),
1044 Sy
(End_Label
, Node_Id
, Default_Empty
),
1045 Sy
(Has_Created_Identifier
, Flag
),
1046 Sy
(Is_Null_Loop
, Flag
),
1047 Sy
(Suppress_Loop_Warnings
, Flag
)));
1049 Cc
(N_Null_Statement
, N_Statement_Other_Than_Procedure_Call
,
1050 (Sm
(Next_Rep_Item
, Node_Id
)));
1052 Cc
(N_Raise_Statement
, N_Statement_Other_Than_Procedure_Call
,
1053 (Sy
(Name
, Node_Id
, Default_Empty
),
1054 Sy
(Expression
, Node_Id
, Default_Empty
)));
1056 Cc
(N_Raise_When_Statement
, N_Statement_Other_Than_Procedure_Call
,
1057 (Sy
(Name
, Node_Id
, Default_Empty
),
1058 Sy
(Expression
, Node_Id
, Default_Empty
),
1059 Sy
(Condition
, Node_Id
, Default_Empty
)));
1061 Cc
(N_Requeue_Statement
, N_Statement_Other_Than_Procedure_Call
,
1062 (Sy
(Name
, Node_Id
, Default_Empty
),
1063 Sy
(Abort_Present
, Flag
),
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_Simple_Return_Statement
, N_Statement_Other_Than_Procedure_Call
,
1069 (Sy
(Expression
, Node_Id
, Default_Empty
),
1070 Sm
(Comes_From_Extended_Return_Statement
, Flag
),
1071 Sm
(Procedure_To_Call
, Node_Id
),
1072 Sm
(Return_Statement_Entity
, Node_Id
),
1073 Sm
(Storage_Pool
, Node_Id
)));
1075 Cc
(N_Extended_Return_Statement
, N_Statement_Other_Than_Procedure_Call
,
1076 (Sy
(Return_Object_Declarations
, List_Id
),
1077 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
1078 Sm
(Procedure_To_Call
, Node_Id
),
1079 Sm
(Return_Statement_Entity
, Node_Id
),
1080 Sm
(Storage_Pool
, Node_Id
)));
1082 Cc
(N_Return_When_Statement
, N_Statement_Other_Than_Procedure_Call
,
1083 (Sy
(Expression
, Node_Id
, Default_Empty
),
1084 Sy
(Condition
, Node_Id
, Default_Empty
)));
1086 Cc
(N_Selective_Accept
, N_Statement_Other_Than_Procedure_Call
,
1087 (Sy
(Select_Alternatives
, List_Id
),
1088 Sy
(Else_Statements
, List_Id
, Default_No_List
)));
1090 Cc
(N_Timed_Entry_Call
, N_Statement_Other_Than_Procedure_Call
,
1091 (Sy
(Entry_Call_Alternative
, Node_Id
),
1092 Sy
(Delay_Alternative
, Node_Id
)));
1094 Cc
(N_Exit_Statement
, N_Statement_Other_Than_Procedure_Call
,
1095 (Sy
(Name
, Node_Id
, Default_Empty
),
1096 Sy
(Condition
, Node_Id
, Default_Empty
),
1097 Sm
(Next_Exit_Statement
, Node_Id
)));
1099 Cc
(N_If_Statement
, N_Statement_Other_Than_Procedure_Call
,
1100 (Sy
(Condition
, Node_Id
, Default_Empty
),
1101 Sy
(Then_Statements
, List_Id
),
1102 Sy
(Elsif_Parts
, List_Id
, Default_No_List
),
1103 Sy
(Else_Statements
, List_Id
, Default_No_List
),
1104 Sy
(End_Span
, Unat
, Default_Uint_0
),
1105 Sm
(From_Conditional_Expression
, Flag
),
1106 Sm
(Comes_From_Check_Or_Contract
, Flag
)));
1108 Cc
(N_Accept_Alternative
, Node_Kind
,
1109 (Sy
(Accept_Statement
, Node_Id
),
1110 Sy
(Condition
, Node_Id
, Default_Empty
),
1111 Sy
(Statements
, List_Id
, Default_Empty_List
),
1112 Sy
(Pragmas_Before
, List_Id
, Default_No_List
),
1113 Sm
(Accept_Handler_Records
, List_Id
)));
1115 Cc
(N_Delay_Alternative
, Node_Kind
,
1116 (Sy
(Delay_Statement
, Node_Id
),
1117 Sy
(Condition
, Node_Id
, Default_Empty
),
1118 Sy
(Statements
, List_Id
, Default_Empty_List
),
1119 Sy
(Pragmas_Before
, List_Id
, Default_No_List
)));
1121 Cc
(N_Elsif_Part
, Node_Kind
,
1122 (Sy
(Condition
, Node_Id
, Default_Empty
),
1123 Sy
(Then_Statements
, List_Id
),
1124 Sm
(Condition_Actions
, List_Id
)));
1126 Cc
(N_Entry_Body_Formal_Part
, Node_Kind
,
1127 (Sy
(Entry_Index_Specification
, Node_Id
, Default_Empty
),
1128 Sy
(Parameter_Specifications
, List_Id
, Default_No_List
),
1129 Sy
(Condition
, Node_Id
, Default_Empty
)));
1131 Cc
(N_Iteration_Scheme
, Node_Kind
,
1132 (Sy
(Condition
, Node_Id
, Default_Empty
),
1133 Sy
(Iterator_Specification
, Node_Id
, Default_Empty
),
1134 Sy
(Loop_Parameter_Specification
, Node_Id
, Default_Empty
),
1135 Sm
(Condition_Actions
, List_Id
)));
1137 Cc
(N_Terminate_Alternative
, Node_Kind
,
1138 (Sy
(Condition
, Node_Id
, Default_Empty
),
1139 Sy
(Pragmas_Before
, List_Id
, Default_No_List
),
1140 Sy
(Pragmas_After
, List_Id
, Default_No_List
)));
1142 Ab
(N_Formal_Subprogram_Declaration
, Node_Kind
);
1144 Cc
(N_Formal_Abstract_Subprogram_Declaration
, N_Formal_Subprogram_Declaration
,
1145 (Sy
(Specification
, Node_Id
),
1146 Sy
(Default_Name
, Node_Id
, Default_Empty
),
1147 Sy
(Expression
, Node_Id
, Default_Empty
),
1148 Sy
(Box_Present
, Flag
)));
1150 Cc
(N_Formal_Concrete_Subprogram_Declaration
, N_Formal_Subprogram_Declaration
,
1151 (Sy
(Specification
, Node_Id
),
1152 Sy
(Default_Name
, Node_Id
, Default_Empty
),
1153 Sy
(Expression
, Node_Id
, Default_Empty
),
1154 Sy
(Box_Present
, Flag
)));
1156 Ab
(N_Push_Pop_xxx_Label
, Node_Kind
);
1158 Ab
(N_Push_xxx_Label
, N_Push_Pop_xxx_Label
,
1159 (Sm
(Exception_Label
, Node_Id
)));
1161 Cc
(N_Push_Constraint_Error_Label
, N_Push_xxx_Label
);
1163 Cc
(N_Push_Program_Error_Label
, N_Push_xxx_Label
);
1165 Cc
(N_Push_Storage_Error_Label
, N_Push_xxx_Label
);
1167 Ab
(N_Pop_xxx_Label
, N_Push_Pop_xxx_Label
);
1169 Cc
(N_Pop_Constraint_Error_Label
, N_Pop_xxx_Label
);
1171 Cc
(N_Pop_Program_Error_Label
, N_Pop_xxx_Label
);
1173 Cc
(N_Pop_Storage_Error_Label
, N_Pop_xxx_Label
);
1175 Ab
(N_SCIL_Node
, Node_Kind
,
1176 (Sm
(SCIL_Entity
, Node_Id
)));
1178 Cc
(N_SCIL_Dispatch_Table_Tag_Init
, N_SCIL_Node
);
1180 Cc
(N_SCIL_Dispatching_Call
, N_SCIL_Node
,
1181 (Sm
(SCIL_Controlling_Tag
, Node_Id
),
1182 Sm
(SCIL_Target_Prim
, Node_Id
)));
1184 Cc
(N_SCIL_Membership_Test
, N_SCIL_Node
,
1185 (Sm
(SCIL_Tag_Value
, Node_Id
)));
1187 Cc
(N_Abortable_Part
, Node_Kind
,
1188 (Sy
(Statements
, List_Id
, Default_Empty_List
)));
1190 Cc
(N_Abstract_Subprogram_Declaration
, Node_Kind
,
1191 (Sy
(Specification
, Node_Id
)));
1193 Cc
(N_Access_Definition
, Node_Kind
,
1194 (Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1195 Sy
(All_Present
, Flag
),
1196 Sy
(Constant_Present
, Flag
),
1197 Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
1198 Sy
(Access_To_Subprogram_Definition
, Node_Id
, Default_Empty
)));
1200 Cc
(N_Access_To_Object_Definition
, Node_Kind
,
1201 (Sy
(All_Present
, Flag
),
1202 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1203 Sy
(Null_Excluding_Subtype
, Flag
),
1204 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
),
1205 Sy
(Constant_Present
, Flag
)));
1207 Cc
(N_Aspect_Specification
, Node_Kind
,
1208 (Sy
(Identifier
, Node_Id
, Default_Empty
),
1209 Sy
(Expression
, Node_Id
, Default_Empty
),
1210 Sy
(Class_Present
, Flag
),
1211 Sy
(Split_PPC
, Flag
),
1212 Sm
(Aspect_On_Partial_View
, Flag
),
1213 Sm
(Aspect_Rep_Item
, Node_Id
),
1214 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Entity
1215 Sm
(Is_Boolean_Aspect
, Flag
),
1216 Sm
(Is_Checked
, Flag
),
1217 Sm
(Is_Delayed_Aspect
, Flag
),
1218 Sm
(Is_Disabled
, Flag
),
1219 Sm
(Is_Ignored
, Flag
),
1220 Sm
(Next_Rep_Item
, Node_Id
)));
1222 Cc
(N_Call_Marker
, Node_Kind
,
1223 (Sm
(Is_Declaration_Level_Node
, Flag
),
1224 Sm
(Is_Dispatching_Call
, Flag
),
1225 Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
1226 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
1227 Sm
(Is_Known_Guaranteed_ABE
, Flag
),
1228 Sm
(Is_Preelaborable_Call
, Flag
),
1229 Sm
(Is_Source_Call
, Flag
),
1230 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
1231 Sm
(Target
, Node_Id
)));
1233 Cc
(N_Case_Expression_Alternative
, Node_Kind
,
1234 (Sm
(Actions
, List_Id
),
1235 Sy
(Discrete_Choices
, List_Id
),
1236 Sy
(Expression
, Node_Id
, Default_Empty
),
1237 Sm
(Has_SP_Choice
, Flag
)));
1239 Cc
(N_Case_Statement_Alternative
, Node_Kind
,
1240 (Sy
(Discrete_Choices
, List_Id
),
1241 Sy
(Statements
, List_Id
, Default_Empty_List
),
1242 Sm
(Has_SP_Choice
, Flag
),
1243 Sm
(Multidefined_Bindings
, Flag
)));
1245 Cc
(N_Compilation_Unit
, Node_Kind
,
1246 (Sy
(Context_Items
, List_Id
),
1247 Sy
(Private_Present
, Flag
),
1249 Sy
(Aux_Decls_Node
, Node_Id
),
1250 Sm
(Acts_As_Spec
, Flag
),
1251 Sm
(Body_Required
, Flag
),
1252 Sm
(Context_Pending
, Flag
),
1253 Sm
(First_Inlined_Subprogram
, Node_Id
),
1254 Sm
(Has_No_Elaboration_Code
, Flag
),
1255 Sm
(Has_Pragma_Suppress_All
, Flag
),
1256 Sm
(Library_Unit
, Node_Id
),
1257 Sm
(Save_Invocation_Graph_Of_Body
, Flag
)));
1259 Cc
(N_Compilation_Unit_Aux
, Node_Kind
,
1260 (Sy
(Declarations
, List_Id
, Default_No_List
),
1261 Sy
(Actions
, List_Id
, Default_No_List
),
1262 Sy
(Pragmas_After
, List_Id
, Default_No_List
),
1263 Sy
(Config_Pragmas
, List_Id
, Default_Empty_List
),
1264 Sm
(Default_Storage_Pool
, Node_Id
)));
1266 Cc
(N_Component_Association
, Node_Kind
,
1267 (Sy
(Choices
, List_Id
),
1268 Sy
(Expression
, Node_Id
, Default_Empty
),
1269 Sy
(Box_Present
, Flag
),
1270 Sy
(Inherited_Discriminant
, Flag
),
1271 Sy
(Binding_Chars
, Name_Id
, Default_No_Name
),
1272 Sm
(Loop_Actions
, List_Id
),
1273 Sm
(Was_Default_Init_Box_Association
, Flag
)));
1275 Cc
(N_Component_Definition
, Node_Kind
,
1276 (Sy
(Aliased_Present
, Flag
),
1277 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1278 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
),
1279 Sy
(Access_Definition
, Node_Id
, Default_Empty
)));
1281 Cc
(N_Component_List
, Node_Kind
,
1282 (Sy
(Component_Items
, List_Id
),
1283 Sy
(Variant_Part
, Node_Id
, Default_Empty
),
1284 Sy
(Null_Present
, Flag
)));
1286 Cc
(N_Contract
, Node_Kind
,
1287 (Sm
(Classifications
, Node_Id
),
1288 Sm
(Contract_Test_Cases
, Node_Id
),
1289 Sm
(Is_Expanded_Contract
, Flag
),
1290 Sm
(Pre_Post_Conditions
, Node_Id
)));
1292 Cc
(N_Derived_Type_Definition
, Node_Kind
,
1293 (Sy
(Abstract_Present
, Flag
),
1294 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1295 Sy
(Subtype_Indication
, Node_Id
, Default_Empty
),
1296 Sy
(Record_Extension_Part
, Node_Id
, Default_Empty
),
1297 Sy
(Limited_Present
, Flag
),
1298 Sy
(Task_Present
, Flag
),
1299 Sy
(Protected_Present
, Flag
),
1300 Sy
(Synchronized_Present
, Flag
),
1301 Sy
(Interface_List
, List_Id
, Default_No_List
),
1302 Sy
(Interface_Present
, Flag
)));
1304 Cc
(N_Decimal_Fixed_Point_Definition
, Node_Kind
,
1305 (Sy
(Delta_Expression
, Node_Id
),
1306 Sy
(Digits_Expression
, Node_Id
),
1307 Sy
(Real_Range_Specification
, Node_Id
, Default_Empty
)));
1309 Cc
(N_Defining_Program_Unit_Name
, Node_Kind
,
1310 (Sy
(Name
, Node_Id
, Default_Empty
),
1311 Sy
(Defining_Identifier
, Node_Id
)));
1313 Cc
(N_Delta_Constraint
, Node_Kind
,
1314 (Sy
(Delta_Expression
, Node_Id
),
1315 Sy
(Range_Constraint
, Node_Id
, Default_Empty
)));
1317 Cc
(N_Designator
, Node_Kind
,
1318 (Sy
(Name
, Node_Id
, Default_Empty
),
1319 Sy
(Identifier
, Node_Id
, Default_Empty
)));
1321 Cc
(N_Digits_Constraint
, Node_Kind
,
1322 (Sy
(Digits_Expression
, Node_Id
),
1323 Sy
(Range_Constraint
, Node_Id
, Default_Empty
)));
1325 Cc
(N_Discriminant_Association
, Node_Kind
,
1326 (Sy
(Selector_Names
, List_Id
),
1327 Sy
(Expression
, Node_Id
, Default_Empty
)));
1329 Cc
(N_Discriminant_Specification
, Node_Kind
,
1330 (Sy
(Defining_Identifier
, Node_Id
),
1331 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1332 Sy
(Discriminant_Type
, Node_Id
),
1333 Sy
(Expression
, Node_Id
, Default_Empty
),
1334 Sm
(More_Ids
, Flag
),
1335 Sm
(Prev_Ids
, Flag
)));
1337 Cc
(N_Enumeration_Type_Definition
, Node_Kind
,
1338 (Sy
(Literals
, List_Id
),
1339 Sy
(End_Label
, Node_Id
, Default_Empty
)));
1341 Cc
(N_Entry_Body
, Node_Kind
,
1342 (Sy
(Defining_Identifier
, Node_Id
),
1343 Sy
(Entry_Body_Formal_Part
, Node_Id
),
1344 Sy
(Declarations
, List_Id
, Default_No_List
),
1345 Sy
(Handled_Statement_Sequence
, Node_Id
, Default_Empty
),
1346 Sy
(At_End_Proc
, Node_Id
, Default_Empty
),
1347 Sm
(Activation_Chain_Entity
, Node_Id
)));
1349 Cc
(N_Entry_Call_Alternative
, Node_Kind
,
1350 (Sy
(Entry_Call_Statement
, Node_Id
),
1351 Sy
(Statements
, List_Id
, Default_Empty_List
),
1352 Sy
(Pragmas_Before
, List_Id
, Default_No_List
)));
1354 Cc
(N_Entry_Index_Specification
, Node_Kind
,
1355 (Sy
(Defining_Identifier
, Node_Id
),
1356 Sy
(Discrete_Subtype_Definition
, Node_Id
, Default_Empty
)));
1358 Cc
(N_Exception_Declaration
, N_Declaration
,
1359 (Sy
(Defining_Identifier
, Node_Id
),
1360 Sm
(Expression
, Node_Id
),
1361 Sm
(More_Ids
, Flag
),
1362 Sm
(Prev_Ids
, Flag
),
1363 Sm
(Renaming_Exception
, Node_Id
)));
1365 Cc
(N_Exception_Handler
, Node_Kind
,
1366 (Sy
(Choice_Parameter
, Node_Id
, Default_Empty
),
1367 Sy
(Exception_Choices
, List_Id
),
1368 Sy
(Statements
, List_Id
, Default_Empty_List
),
1369 Sm
(Exception_Label
, Node_Id
),
1370 Sm
(Has_Local_Raise
, Flag
),
1371 Sm
(Local_Raise_Not_OK
, Flag
),
1372 Sm
(Local_Raise_Statements
, Elist_Id
)));
1374 Cc
(N_Floating_Point_Definition
, Node_Kind
,
1375 (Sy
(Digits_Expression
, Node_Id
),
1376 Sy
(Real_Range_Specification
, Node_Id
, Default_Empty
)));
1378 Cc
(N_Formal_Decimal_Fixed_Point_Definition
, Node_Kind
);
1380 Cc
(N_Formal_Derived_Type_Definition
, Node_Kind
,
1381 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
1382 Sy
(Private_Present
, Flag
),
1383 Sy
(Abstract_Present
, Flag
),
1384 Sy
(Limited_Present
, Flag
),
1385 Sy
(Synchronized_Present
, Flag
),
1386 Sy
(Interface_List
, List_Id
, Default_No_List
)));
1388 Cc
(N_Formal_Discrete_Type_Definition
, Node_Kind
);
1390 Cc
(N_Formal_Floating_Point_Definition
, Node_Kind
);
1392 Cc
(N_Formal_Modular_Type_Definition
, Node_Kind
);
1394 Cc
(N_Formal_Ordinary_Fixed_Point_Definition
, Node_Kind
);
1396 Cc
(N_Formal_Package_Declaration
, Node_Kind
,
1397 (Sy
(Defining_Identifier
, Node_Id
),
1398 Sy
(Name
, Node_Id
, Default_Empty
),
1399 Sy
(Generic_Associations
, List_Id
, Default_No_List
),
1400 Sy
(Box_Present
, Flag
),
1401 Sm
(Instance_Spec
, Node_Id
),
1402 Sm
(Is_Known_Guaranteed_ABE
, Flag
)));
1404 Cc
(N_Formal_Private_Type_Definition
, Node_Kind
,
1405 (Sy
(Abstract_Present
, Flag
),
1406 Sy
(Tagged_Present
, Flag
),
1407 Sy
(Limited_Present
, Flag
),
1408 Sm
(Uninitialized_Variable
, Node_Id
)));
1410 Cc
(N_Formal_Incomplete_Type_Definition
, Node_Kind
,
1411 (Sy
(Tagged_Present
, Flag
)));
1413 Cc
(N_Formal_Signed_Integer_Type_Definition
, Node_Kind
);
1415 Cc
(N_Freeze_Entity
, Node_Kind
,
1416 (Sy
(Actions
, List_Id
, Default_No_List
),
1417 Sm
(Access_Types_To_Process
, Elist_Id
),
1418 Sm
(Entity_Or_Associated_Node
, Node_Id
), -- just Entity
1419 Sm
(First_Subtype_Link
, Node_Id
),
1420 Sm
(TSS_Elist
, Elist_Id
)));
1422 Cc
(N_Freeze_Generic_Entity
, Node_Kind
,
1423 Sm
(Entity_Or_Associated_Node
, Node_Id
)); -- just Entity
1425 Cc
(N_Generic_Association
, Node_Kind
,
1426 (Sy
(Selector_Name
, Node_Id
, Default_Empty
),
1427 Sy
(Explicit_Generic_Actual_Parameter
, Node_Id
),
1428 Sy
(Box_Present
, Flag
)));
1430 Cc
(N_Handled_Sequence_Of_Statements
, Node_Kind
,
1431 (Sy
(Statements
, List_Id
, Default_Empty_List
),
1432 Sy
(End_Label
, Node_Id
, Default_Empty
),
1433 Sy
(Exception_Handlers
, List_Id
, Default_No_List
),
1434 Sy
(At_End_Proc
, Node_Id
, Default_Empty
)));
1436 Cc
(N_Index_Or_Discriminant_Constraint
, Node_Kind
,
1437 (Sy
(Constraints
, List_Id
)));
1439 Cc
(N_Iterated_Component_Association
, Node_Kind
,
1440 (Sy
(Defining_Identifier
, Node_Id
),
1441 Sy
(Iterator_Specification
, Node_Id
, Default_Empty
),
1442 Sy
(Expression
, Node_Id
, Default_Empty
),
1443 Sy
(Discrete_Choices
, List_Id
),
1444 Sy
(Box_Present
, Flag
),
1445 Sm
(Loop_Actions
, List_Id
)));
1447 Cc
(N_Iterated_Element_Association
, Node_Kind
,
1448 (Sy
(Key_Expression
, Node_Id
),
1449 Sy
(Iterator_Specification
, Node_Id
, Default_Empty
),
1450 Sy
(Expression
, Node_Id
, Default_Empty
),
1451 Sy
(Loop_Parameter_Specification
, Node_Id
, Default_Empty
),
1452 Sy
(Box_Present
, Flag
),
1453 Sm
(Loop_Actions
, List_Id
)));
1455 Cc
(N_Itype_Reference
, Node_Kind
,
1456 (Sm
(Itype
, Node_Id
)));
1458 Cc
(N_Label
, Node_Kind
,
1459 (Sy
(Identifier
, Node_Id
, Default_Empty
),
1460 Sm
(Exception_Junk
, Flag
)));
1462 Cc
(N_Modular_Type_Definition
, Node_Kind
,
1463 (Sy
(Expression
, Node_Id
, Default_Empty
)));
1465 Cc
(N_Number_Declaration
, Node_Kind
,
1466 (Sy
(Defining_Identifier
, Node_Id
),
1467 Sy
(Expression
, Node_Id
, Default_Empty
),
1468 Sm
(More_Ids
, Flag
),
1469 Sm
(Prev_Ids
, Flag
)));
1471 Cc
(N_Ordinary_Fixed_Point_Definition
, Node_Kind
,
1472 (Sy
(Delta_Expression
, Node_Id
),
1473 Sy
(Real_Range_Specification
, Node_Id
, Default_Empty
)));
1475 Cc
(N_Others_Choice
, Node_Kind
,
1476 (Sm
(All_Others
, Flag
),
1477 Sm
(Others_Discrete_Choices
, List_Id
)));
1479 Cc
(N_Package_Specification
, Node_Kind
,
1480 (Sy
(Defining_Unit_Name
, Node_Id
),
1481 Sy
(Visible_Declarations
, List_Id
),
1482 Sy
(Private_Declarations
, List_Id
, Default_No_List
),
1483 Sy
(End_Label
, Node_Id
, Default_Empty
),
1484 Sm
(Generic_Parent
, Node_Id
),
1485 Sm
(Limited_View_Installed
, Flag
)));
1487 Cc
(N_Parameter_Association
, Node_Kind
,
1488 (Sy
(Selector_Name
, Node_Id
, Default_Empty
),
1489 Sy
(Explicit_Actual_Parameter
, Node_Id
),
1490 Sm
(Is_Accessibility_Actual
, Flag
),
1491 Sm
(Next_Named_Actual
, Node_Id
)));
1493 Cc
(N_Parameter_Specification
, Node_Kind
,
1494 (Sy
(Defining_Identifier
, Node_Id
),
1495 Sy
(Aliased_Present
, Flag
),
1496 Sy
(In_Present
, Flag
),
1497 Sy
(Out_Present
, Flag
),
1498 Sy
(Null_Exclusion_Present
, Flag
, Default_False
),
1499 Sy
(Parameter_Type
, Node_Id
),
1500 Sy
(Expression
, Node_Id
, Default_Empty
),
1501 Sm
(Default_Expression
, Node_Id
),
1502 Sm
(More_Ids
, Flag
),
1503 Sm
(Prev_Ids
, Flag
)));
1505 Cc
(N_Pragma
, Node_Kind
,
1506 (Sy
(Pragma_Argument_Associations
, List_Id
, Default_No_List
),
1507 Sy
(Pragma_Identifier
, Node_Id
),
1508 Sy
(Class_Present
, Flag
),
1509 Sy
(Split_PPC
, Flag
),
1510 Sm
(Corresponding_Aspect
, Node_Id
),
1511 Sm
(From_Aspect_Specification
, Flag
),
1512 Sm
(Import_Interface_Present
, Flag
),
1513 Sm
(Is_Analyzed_Pragma
, Flag
),
1514 Sm
(Is_Checked
, Flag
),
1515 Sm
(Is_Checked_Ghost_Pragma
, Flag
),
1516 Sm
(Is_Delayed_Aspect
, Flag
),
1517 Sm
(Is_Disabled
, Flag
),
1518 Sm
(Is_Generic_Contract_Pragma
, Flag
),
1519 Sm
(Is_Ignored
, Flag
),
1520 Sm
(Is_Ignored_Ghost_Pragma
, Flag
),
1521 Sm
(Is_Inherited_Pragma
, Flag
),
1522 Sm
(Next_Pragma
, Node_Id
),
1523 Sm
(Next_Rep_Item
, Node_Id
),
1524 Sm
(Uneval_Old_Accept
, Flag
),
1525 Sm
(Uneval_Old_Warn
, Flag
)));
1527 Cc
(N_Protected_Definition
, Node_Kind
,
1528 (Sy
(Visible_Declarations
, List_Id
),
1529 Sy
(Private_Declarations
, List_Id
, Default_No_List
),
1530 Sy
(End_Label
, Node_Id
, Default_Empty
)));
1532 Cc
(N_Range_Constraint
, Node_Kind
,
1533 (Sy
(Range_Expression
, Node_Id
)));
1535 Cc
(N_Real_Range_Specification
, Node_Kind
,
1536 (Sy
(Low_Bound
, Node_Id
),
1537 Sy
(High_Bound
, Node_Id
)));
1539 Cc
(N_Record_Definition
, Node_Kind
,
1540 (Sy
(End_Label
, Node_Id
, Default_Empty
),
1541 Sy
(Abstract_Present
, Flag
),
1542 Sy
(Tagged_Present
, Flag
),
1543 Sy
(Limited_Present
, Flag
),
1544 Sy
(Component_List
, Node_Id
),
1545 Sy
(Null_Present
, Flag
),
1546 Sy
(Task_Present
, Flag
),
1547 Sy
(Protected_Present
, Flag
),
1548 Sy
(Synchronized_Present
, Flag
),
1549 Sy
(Interface_Present
, Flag
),
1550 Sy
(Interface_List
, List_Id
, Default_No_List
)));
1552 Cc
(N_Signed_Integer_Type_Definition
, Node_Kind
,
1553 (Sy
(Low_Bound
, Node_Id
),
1554 Sy
(High_Bound
, Node_Id
)));
1556 Cc
(N_Single_Protected_Declaration
, Node_Kind
,
1557 (Sy
(Defining_Identifier
, Node_Id
),
1558 Sy
(Interface_List
, List_Id
, Default_No_List
),
1559 Sy
(Protected_Definition
, Node_Id
)));
1561 Cc
(N_Subunit
, Node_Kind
,
1562 (Sy
(Name
, Node_Id
, Default_Empty
),
1563 Sy
(Proper_Body
, Node_Id
),
1564 Sm
(Corresponding_Stub
, Node_Id
)));
1566 Cc
(N_Task_Definition
, Node_Kind
,
1567 (Sy
(Visible_Declarations
, List_Id
),
1568 Sy
(Private_Declarations
, List_Id
, Default_No_List
),
1569 Sy
(End_Label
, Node_Id
, Default_Empty
),
1570 Sm
(Has_Relative_Deadline_Pragma
, Flag
),
1571 Sm
(Has_Storage_Size_Pragma
, Flag
)));
1573 Cc
(N_Triggering_Alternative
, Node_Kind
,
1574 (Sy
(Triggering_Statement
, Node_Id
),
1575 Sy
(Statements
, List_Id
, Default_Empty_List
),
1576 Sy
(Pragmas_Before
, List_Id
, Default_No_List
)));
1578 Cc
(N_Use_Type_Clause
, Node_Kind
,
1579 (Sy
(Subtype_Mark
, Node_Id
, Default_Empty
),
1580 Sy
(Is_Effective_Use_Clause
, Flag
),
1581 Sy
(All_Present
, Flag
),
1582 Sm
(Hidden_By_Use_Clause
, Elist_Id
),
1583 Sm
(More_Ids
, Flag
),
1584 Sm
(Next_Use_Clause
, Node_Id
),
1585 Sm
(Prev_Ids
, Flag
),
1586 Sm
(Prev_Use_Clause
, Node_Id
),
1587 Sm
(Used_Operations
, Elist_Id
)));
1589 Cc
(N_Validate_Unchecked_Conversion
, Node_Kind
,
1590 (Sm
(Source_Type
, Node_Id
),
1591 Sm
(Target_Type
, Node_Id
)));
1593 Cc
(N_Variable_Reference_Marker
, Node_Kind
,
1594 (Sm
(Is_Elaboration_Checks_OK_Node
, Flag
),
1595 Sm
(Is_Elaboration_Warnings_OK_Node
, Flag
),
1597 Sm
(Is_SPARK_Mode_On_Node
, Flag
),
1598 Sm
(Is_Write
, Flag
),
1599 Sm
(Target
, Node_Id
)));
1601 Cc
(N_Variant
, Node_Kind
,
1602 (Sy
(Discrete_Choices
, List_Id
),
1603 Sy
(Component_List
, Node_Id
),
1604 Sm
(Dcheck_Function
, Node_Id
),
1605 Sm
(Enclosing_Variant
, Node_Id
),
1606 Sm
(Has_SP_Choice
, Flag
),
1607 Sm
(Present_Expr
, Valid_Uint
)));
1609 Cc
(N_Variant_Part
, Node_Kind
,
1610 (Sy
(Name
, Node_Id
, Default_Empty
),
1611 Sy
(Variants
, List_Id
)));
1613 Cc
(N_With_Clause
, Node_Kind
,
1614 (Sy
(Name
, Node_Id
, Default_Empty
),
1615 Sy
(Private_Present
, Flag
),
1616 Sy
(Limited_Present
, Flag
),
1617 Sy
(First_Name
, Flag
, Default_True
),
1618 Sy
(Last_Name
, Flag
, Default_True
),
1619 Sm
(Context_Installed
, Flag
),
1620 Sm
(Corresponding_Spec
, Node_Id
),
1621 Sm
(Elaborate_All_Desirable
, Flag
),
1622 Sm
(Elaborate_All_Present
, Flag
),
1623 Sm
(Elaborate_Desirable
, Flag
),
1624 Sm
(Elaborate_Present
, Flag
),
1625 Sm
(Implicit_With
, Flag
),
1626 Sm
(Library_Unit
, Node_Id
),
1627 Sm
(Limited_View_Installed
, Flag
),
1628 Sm
(Next_Implicit_With
, Node_Id
),
1629 Sm
(No_Entities_Ref_In_Spec
, Flag
),
1630 Sm
(Parent_With
, Flag
),
1631 Sm
(Unreferenced_In_Spec
, Flag
)));
1633 Cc
(N_Unused_At_End
, Node_Kind
);
1635 -- Union types. These don't fit into the normal parent/child hierarchy
1640 (N_Attribute_Definition_Clause
,
1642 N_Pragma_Argument_Association
,
1648 N_Character_Literal
,
1651 Union
(N_Has_Condition
,
1655 N_Accept_Alternative
,
1656 N_Delay_Alternative
,
1658 N_Entry_Body_Formal_Part
,
1660 N_Terminate_Alternative
));
1661 -- Nodes with condition fields (does not include N_Raise_xxx_Error)
1663 Union
(N_Has_Bounds
,
1666 N_Real_Range_Specification
,
1667 N_Signed_Integer_Type_Definition
));
1668 -- Nodes that have Low_Bound and High_Bound defined
1674 N_Subtype_Indication
));
1675 -- Nodes that can be an index of an array
1677 Union
(N_Entity_Name
,
1681 N_Operator_Symbol
));
1682 -- Nodes that are definitely representing an entity.
1683 -- Some N_Attribute_Reference nodes may also represent an entity. See
1691 N_Discriminant_Specification
,
1692 N_Entry_Index_Specification
,
1693 N_Enumeration_Type_Definition
,
1694 N_Exception_Handler
,
1695 N_Explicit_Dereference
,
1696 N_Expression_With_Actions
,
1697 N_Extension_Aggregate
,
1699 N_Iterated_Component_Association
,
1703 N_Number_Declaration
,
1704 N_Package_Specification
,
1705 N_Parameter_Specification
,
1706 N_Renaming_Declaration
,
1707 N_Quantified_Expression
));
1708 -- Nodes that can be returned by Declaration_Node; it can also return
1709 -- Empty. Not all of these are true "declarations", but Declaration_Node
1710 -- can return them in some cases.
1714 (N_Character_Literal
,
1718 N_Subtype_Indication
));
1719 -- Nodes that can be used to specify a range
1721 Union
(N_Is_Case_Choice
,
1725 -- Nodes that can be in the choices of a case statement
1727 Union
(N_Is_Exception_Choice
,
1731 -- Nodes that can be in the choices of an exception handler
1733 Union
(N_Alternative
,
1735 (N_Case_Statement_Alternative
,
1737 -- Nodes that can be alternatives in case contructs
1739 end Gen_IL
.Gen
.Gen_Nodes
;