(extendsfdf2): Add pattern accidentally deleted when cirrus instructions were
[official-gcc.git] / gcc / ada / nmake.adb
bloba16204c0ce79e00db40bcc50fb3464cacd69dbc3
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- N M A K E --
6 -- --
7 -- B o d y --
8 -- --
9 -- Generated by xnmake revision 1.29 using --
10 -- sinfo.ads revision 1.439 --
11 -- nmake.adt revision 1.12 --
12 -- --
13 -- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
14 -- --
15 -- GNAT is free software; you can redistribute it and/or modify it under --
16 -- terms of the GNU General Public License as published by the Free Soft- --
17 -- ware Foundation; either version 2, or (at your option) any later ver- --
18 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
19 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
20 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
21 -- for more details. You should have received a copy of the GNU General --
22 -- Public License distributed with GNAT; see file COPYING. If not, write --
23 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
24 -- MA 02111-1307, USA. --
25 -- --
26 -- GNAT was originally developed by the GNAT team at New York University. --
27 -- Extensive contributions were provided by Ada Core Technologies Inc. --
28 -- --
29 ------------------------------------------------------------------------------
31 pragma Style_Checks (All_Checks);
32 -- Turn off subprogram order checking, since the routines here are
33 -- generated automatically in order.
36 with Atree; use Atree;
37 with Sinfo; use Sinfo;
38 with Snames; use Snames;
39 with Stand; use Stand;
41 package body Nmake is
43 function Make_Unused_At_Start (Sloc : Source_Ptr)
44 return Node_Id
46 N : constant Node_Id :=
47 New_Node (N_Unused_At_Start, Sloc);
48 begin
49 return N;
50 end Make_Unused_At_Start;
52 function Make_Unused_At_End (Sloc : Source_Ptr)
53 return Node_Id
55 N : constant Node_Id :=
56 New_Node (N_Unused_At_End, Sloc);
57 begin
58 return N;
59 end Make_Unused_At_End;
61 function Make_Identifier (Sloc : Source_Ptr;
62 Chars : Name_Id)
63 return Node_Id
65 N : constant Node_Id :=
66 New_Node (N_Identifier, Sloc);
67 begin
68 Set_Chars (N, Chars);
69 return N;
70 end Make_Identifier;
72 function Make_Integer_Literal (Sloc : Source_Ptr;
73 Intval : Uint)
74 return Node_Id
76 N : constant Node_Id :=
77 New_Node (N_Integer_Literal, Sloc);
78 begin
79 Set_Intval (N, Intval);
80 return N;
81 end Make_Integer_Literal;
83 function Make_Real_Literal (Sloc : Source_Ptr;
84 Realval : Ureal)
85 return Node_Id
87 N : constant Node_Id :=
88 New_Node (N_Real_Literal, Sloc);
89 begin
90 Set_Realval (N, Realval);
91 return N;
92 end Make_Real_Literal;
94 function Make_Character_Literal (Sloc : Source_Ptr;
95 Chars : Name_Id;
96 Char_Literal_Value : Char_Code)
97 return Node_Id
99 N : constant Node_Id :=
100 New_Node (N_Character_Literal, Sloc);
101 begin
102 Set_Chars (N, Chars);
103 Set_Char_Literal_Value (N, Char_Literal_Value);
104 return N;
105 end Make_Character_Literal;
107 function Make_String_Literal (Sloc : Source_Ptr;
108 Strval : String_Id)
109 return Node_Id
111 N : constant Node_Id :=
112 New_Node (N_String_Literal, Sloc);
113 begin
114 Set_Strval (N, Strval);
115 return N;
116 end Make_String_Literal;
118 function Make_Pragma (Sloc : Source_Ptr;
119 Chars : Name_Id;
120 Pragma_Argument_Associations : List_Id := No_List;
121 Debug_Statement : Node_Id := Empty)
122 return Node_Id
124 N : constant Node_Id :=
125 New_Node (N_Pragma, Sloc);
126 begin
127 Set_Chars (N, Chars);
128 Set_Pragma_Argument_Associations
129 (N, Pragma_Argument_Associations);
130 Set_Debug_Statement (N, Debug_Statement);
131 return N;
132 end Make_Pragma;
134 function Make_Pragma_Argument_Association (Sloc : Source_Ptr;
135 Chars : Name_Id := No_Name;
136 Expression : Node_Id)
137 return Node_Id
139 N : constant Node_Id :=
140 New_Node (N_Pragma_Argument_Association, Sloc);
141 begin
142 Set_Chars (N, Chars);
143 Set_Expression (N, Expression);
144 return N;
145 end Make_Pragma_Argument_Association;
147 function Make_Defining_Identifier (Sloc : Source_Ptr;
148 Chars : Name_Id)
149 return Node_Id
151 N : constant Node_Id :=
152 New_Entity (N_Defining_Identifier, Sloc);
153 begin
154 Set_Chars (N, Chars);
155 return N;
156 end Make_Defining_Identifier;
158 function Make_Full_Type_Declaration (Sloc : Source_Ptr;
159 Defining_Identifier : Node_Id;
160 Discriminant_Specifications : List_Id := No_List;
161 Type_Definition : Node_Id)
162 return Node_Id
164 N : constant Node_Id :=
165 New_Node (N_Full_Type_Declaration, Sloc);
166 begin
167 Set_Defining_Identifier (N, Defining_Identifier);
168 Set_Discriminant_Specifications (N, Discriminant_Specifications);
169 Set_Type_Definition (N, Type_Definition);
170 return N;
171 end Make_Full_Type_Declaration;
173 function Make_Subtype_Declaration (Sloc : Source_Ptr;
174 Defining_Identifier : Node_Id;
175 Subtype_Indication : Node_Id)
176 return Node_Id
178 N : constant Node_Id :=
179 New_Node (N_Subtype_Declaration, Sloc);
180 begin
181 Set_Defining_Identifier (N, Defining_Identifier);
182 Set_Subtype_Indication (N, Subtype_Indication);
183 return N;
184 end Make_Subtype_Declaration;
186 function Make_Subtype_Indication (Sloc : Source_Ptr;
187 Subtype_Mark : Node_Id;
188 Constraint : Node_Id)
189 return Node_Id
191 N : constant Node_Id :=
192 New_Node (N_Subtype_Indication, Sloc);
193 begin
194 Set_Subtype_Mark (N, Subtype_Mark);
195 Set_Constraint (N, Constraint);
196 return N;
197 end Make_Subtype_Indication;
199 function Make_Object_Declaration (Sloc : Source_Ptr;
200 Defining_Identifier : Node_Id;
201 Aliased_Present : Boolean := False;
202 Constant_Present : Boolean := False;
203 Object_Definition : Node_Id;
204 Expression : Node_Id := Empty)
205 return Node_Id
207 N : constant Node_Id :=
208 New_Node (N_Object_Declaration, Sloc);
209 begin
210 Set_Defining_Identifier (N, Defining_Identifier);
211 Set_Aliased_Present (N, Aliased_Present);
212 Set_Constant_Present (N, Constant_Present);
213 Set_Object_Definition (N, Object_Definition);
214 Set_Expression (N, Expression);
215 return N;
216 end Make_Object_Declaration;
218 function Make_Number_Declaration (Sloc : Source_Ptr;
219 Defining_Identifier : Node_Id;
220 Expression : Node_Id)
221 return Node_Id
223 N : constant Node_Id :=
224 New_Node (N_Number_Declaration, Sloc);
225 begin
226 Set_Defining_Identifier (N, Defining_Identifier);
227 Set_Expression (N, Expression);
228 return N;
229 end Make_Number_Declaration;
231 function Make_Derived_Type_Definition (Sloc : Source_Ptr;
232 Abstract_Present : Boolean := False;
233 Subtype_Indication : Node_Id;
234 Record_Extension_Part : Node_Id := Empty)
235 return Node_Id
237 N : constant Node_Id :=
238 New_Node (N_Derived_Type_Definition, Sloc);
239 begin
240 Set_Abstract_Present (N, Abstract_Present);
241 Set_Subtype_Indication (N, Subtype_Indication);
242 Set_Record_Extension_Part (N, Record_Extension_Part);
243 return N;
244 end Make_Derived_Type_Definition;
246 function Make_Range_Constraint (Sloc : Source_Ptr;
247 Range_Expression : Node_Id)
248 return Node_Id
250 N : constant Node_Id :=
251 New_Node (N_Range_Constraint, Sloc);
252 begin
253 Set_Range_Expression (N, Range_Expression);
254 return N;
255 end Make_Range_Constraint;
257 function Make_Range (Sloc : Source_Ptr;
258 Low_Bound : Node_Id;
259 High_Bound : Node_Id;
260 Includes_Infinities : Boolean := False)
261 return Node_Id
263 N : constant Node_Id :=
264 New_Node (N_Range, Sloc);
265 begin
266 Set_Low_Bound (N, Low_Bound);
267 Set_High_Bound (N, High_Bound);
268 Set_Includes_Infinities (N, Includes_Infinities);
269 return N;
270 end Make_Range;
272 function Make_Enumeration_Type_Definition (Sloc : Source_Ptr;
273 Literals : List_Id;
274 End_Label : Node_Id := Empty)
275 return Node_Id
277 N : constant Node_Id :=
278 New_Node (N_Enumeration_Type_Definition, Sloc);
279 begin
280 Set_Literals (N, Literals);
281 Set_End_Label (N, End_Label);
282 return N;
283 end Make_Enumeration_Type_Definition;
285 function Make_Defining_Character_Literal (Sloc : Source_Ptr;
286 Chars : Name_Id)
287 return Node_Id
289 N : constant Node_Id :=
290 New_Entity (N_Defining_Character_Literal, Sloc);
291 begin
292 Set_Chars (N, Chars);
293 return N;
294 end Make_Defining_Character_Literal;
296 function Make_Signed_Integer_Type_Definition (Sloc : Source_Ptr;
297 Low_Bound : Node_Id;
298 High_Bound : Node_Id)
299 return Node_Id
301 N : constant Node_Id :=
302 New_Node (N_Signed_Integer_Type_Definition, Sloc);
303 begin
304 Set_Low_Bound (N, Low_Bound);
305 Set_High_Bound (N, High_Bound);
306 return N;
307 end Make_Signed_Integer_Type_Definition;
309 function Make_Modular_Type_Definition (Sloc : Source_Ptr;
310 Expression : Node_Id)
311 return Node_Id
313 N : constant Node_Id :=
314 New_Node (N_Modular_Type_Definition, Sloc);
315 begin
316 Set_Expression (N, Expression);
317 return N;
318 end Make_Modular_Type_Definition;
320 function Make_Floating_Point_Definition (Sloc : Source_Ptr;
321 Digits_Expression : Node_Id;
322 Real_Range_Specification : Node_Id := Empty)
323 return Node_Id
325 N : constant Node_Id :=
326 New_Node (N_Floating_Point_Definition, Sloc);
327 begin
328 Set_Digits_Expression (N, Digits_Expression);
329 Set_Real_Range_Specification (N, Real_Range_Specification);
330 return N;
331 end Make_Floating_Point_Definition;
333 function Make_Real_Range_Specification (Sloc : Source_Ptr;
334 Low_Bound : Node_Id;
335 High_Bound : Node_Id)
336 return Node_Id
338 N : constant Node_Id :=
339 New_Node (N_Real_Range_Specification, Sloc);
340 begin
341 Set_Low_Bound (N, Low_Bound);
342 Set_High_Bound (N, High_Bound);
343 return N;
344 end Make_Real_Range_Specification;
346 function Make_Ordinary_Fixed_Point_Definition (Sloc : Source_Ptr;
347 Delta_Expression : Node_Id;
348 Real_Range_Specification : Node_Id)
349 return Node_Id
351 N : constant Node_Id :=
352 New_Node (N_Ordinary_Fixed_Point_Definition, Sloc);
353 begin
354 Set_Delta_Expression (N, Delta_Expression);
355 Set_Real_Range_Specification (N, Real_Range_Specification);
356 return N;
357 end Make_Ordinary_Fixed_Point_Definition;
359 function Make_Decimal_Fixed_Point_Definition (Sloc : Source_Ptr;
360 Delta_Expression : Node_Id;
361 Digits_Expression : Node_Id;
362 Real_Range_Specification : Node_Id := Empty)
363 return Node_Id
365 N : constant Node_Id :=
366 New_Node (N_Decimal_Fixed_Point_Definition, Sloc);
367 begin
368 Set_Delta_Expression (N, Delta_Expression);
369 Set_Digits_Expression (N, Digits_Expression);
370 Set_Real_Range_Specification (N, Real_Range_Specification);
371 return N;
372 end Make_Decimal_Fixed_Point_Definition;
374 function Make_Digits_Constraint (Sloc : Source_Ptr;
375 Digits_Expression : Node_Id;
376 Range_Constraint : Node_Id := Empty)
377 return Node_Id
379 N : constant Node_Id :=
380 New_Node (N_Digits_Constraint, Sloc);
381 begin
382 Set_Digits_Expression (N, Digits_Expression);
383 Set_Range_Constraint (N, Range_Constraint);
384 return N;
385 end Make_Digits_Constraint;
387 function Make_Unconstrained_Array_Definition (Sloc : Source_Ptr;
388 Subtype_Marks : List_Id;
389 Aliased_Present : Boolean := False;
390 Subtype_Indication : Node_Id)
391 return Node_Id
393 N : constant Node_Id :=
394 New_Node (N_Unconstrained_Array_Definition, Sloc);
395 begin
396 Set_Subtype_Marks (N, Subtype_Marks);
397 Set_Aliased_Present (N, Aliased_Present);
398 Set_Subtype_Indication (N, Subtype_Indication);
399 return N;
400 end Make_Unconstrained_Array_Definition;
402 function Make_Constrained_Array_Definition (Sloc : Source_Ptr;
403 Discrete_Subtype_Definitions : List_Id;
404 Aliased_Present : Boolean := False;
405 Subtype_Indication : Node_Id)
406 return Node_Id
408 N : constant Node_Id :=
409 New_Node (N_Constrained_Array_Definition, Sloc);
410 begin
411 Set_Discrete_Subtype_Definitions
412 (N, Discrete_Subtype_Definitions);
413 Set_Aliased_Present (N, Aliased_Present);
414 Set_Subtype_Indication (N, Subtype_Indication);
415 return N;
416 end Make_Constrained_Array_Definition;
418 function Make_Discriminant_Specification (Sloc : Source_Ptr;
419 Defining_Identifier : Node_Id;
420 Discriminant_Type : Node_Id;
421 Expression : Node_Id := Empty)
422 return Node_Id
424 N : constant Node_Id :=
425 New_Node (N_Discriminant_Specification, Sloc);
426 begin
427 Set_Defining_Identifier (N, Defining_Identifier);
428 Set_Discriminant_Type (N, Discriminant_Type);
429 Set_Expression (N, Expression);
430 return N;
431 end Make_Discriminant_Specification;
433 function Make_Index_Or_Discriminant_Constraint (Sloc : Source_Ptr;
434 Constraints : List_Id)
435 return Node_Id
437 N : constant Node_Id :=
438 New_Node (N_Index_Or_Discriminant_Constraint, Sloc);
439 begin
440 Set_Constraints (N, Constraints);
441 return N;
442 end Make_Index_Or_Discriminant_Constraint;
444 function Make_Discriminant_Association (Sloc : Source_Ptr;
445 Selector_Names : List_Id;
446 Expression : Node_Id)
447 return Node_Id
449 N : constant Node_Id :=
450 New_Node (N_Discriminant_Association, Sloc);
451 begin
452 Set_Selector_Names (N, Selector_Names);
453 Set_Expression (N, Expression);
454 return N;
455 end Make_Discriminant_Association;
457 function Make_Record_Definition (Sloc : Source_Ptr;
458 End_Label : Node_Id := Empty;
459 Abstract_Present : Boolean := False;
460 Tagged_Present : Boolean := False;
461 Limited_Present : Boolean := False;
462 Component_List : Node_Id;
463 Null_Present : Boolean := False)
464 return Node_Id
466 N : constant Node_Id :=
467 New_Node (N_Record_Definition, Sloc);
468 begin
469 Set_End_Label (N, End_Label);
470 Set_Abstract_Present (N, Abstract_Present);
471 Set_Tagged_Present (N, Tagged_Present);
472 Set_Limited_Present (N, Limited_Present);
473 Set_Component_List (N, Component_List);
474 Set_Null_Present (N, Null_Present);
475 return N;
476 end Make_Record_Definition;
478 function Make_Component_List (Sloc : Source_Ptr;
479 Component_Items : List_Id;
480 Variant_Part : Node_Id := Empty;
481 Null_Present : Boolean := False)
482 return Node_Id
484 N : constant Node_Id :=
485 New_Node (N_Component_List, Sloc);
486 begin
487 Set_Component_Items (N, Component_Items);
488 Set_Variant_Part (N, Variant_Part);
489 Set_Null_Present (N, Null_Present);
490 return N;
491 end Make_Component_List;
493 function Make_Component_Declaration (Sloc : Source_Ptr;
494 Defining_Identifier : Node_Id;
495 Aliased_Present : Boolean := False;
496 Subtype_Indication : Node_Id;
497 Expression : Node_Id := Empty)
498 return Node_Id
500 N : constant Node_Id :=
501 New_Node (N_Component_Declaration, Sloc);
502 begin
503 Set_Defining_Identifier (N, Defining_Identifier);
504 Set_Aliased_Present (N, Aliased_Present);
505 Set_Subtype_Indication (N, Subtype_Indication);
506 Set_Expression (N, Expression);
507 return N;
508 end Make_Component_Declaration;
510 function Make_Variant_Part (Sloc : Source_Ptr;
511 Name : Node_Id;
512 Variants : List_Id)
513 return Node_Id
515 N : constant Node_Id :=
516 New_Node (N_Variant_Part, Sloc);
517 begin
518 Set_Name (N, Name);
519 Set_Variants (N, Variants);
520 return N;
521 end Make_Variant_Part;
523 function Make_Variant (Sloc : Source_Ptr;
524 Discrete_Choices : List_Id;
525 Component_List : Node_Id)
526 return Node_Id
528 N : constant Node_Id :=
529 New_Node (N_Variant, Sloc);
530 begin
531 Set_Discrete_Choices (N, Discrete_Choices);
532 Set_Component_List (N, Component_List);
533 return N;
534 end Make_Variant;
536 function Make_Others_Choice (Sloc : Source_Ptr)
537 return Node_Id
539 N : constant Node_Id :=
540 New_Node (N_Others_Choice, Sloc);
541 begin
542 return N;
543 end Make_Others_Choice;
545 function Make_Access_To_Object_Definition (Sloc : Source_Ptr;
546 All_Present : Boolean := False;
547 Subtype_Indication : Node_Id;
548 Constant_Present : Boolean := False)
549 return Node_Id
551 N : constant Node_Id :=
552 New_Node (N_Access_To_Object_Definition, Sloc);
553 begin
554 Set_All_Present (N, All_Present);
555 Set_Subtype_Indication (N, Subtype_Indication);
556 Set_Constant_Present (N, Constant_Present);
557 return N;
558 end Make_Access_To_Object_Definition;
560 function Make_Access_Function_Definition (Sloc : Source_Ptr;
561 Protected_Present : Boolean := False;
562 Parameter_Specifications : List_Id := No_List;
563 Subtype_Mark : Node_Id)
564 return Node_Id
566 N : constant Node_Id :=
567 New_Node (N_Access_Function_Definition, Sloc);
568 begin
569 Set_Protected_Present (N, Protected_Present);
570 Set_Parameter_Specifications (N, Parameter_Specifications);
571 Set_Subtype_Mark (N, Subtype_Mark);
572 return N;
573 end Make_Access_Function_Definition;
575 function Make_Access_Procedure_Definition (Sloc : Source_Ptr;
576 Protected_Present : Boolean := False;
577 Parameter_Specifications : List_Id := No_List)
578 return Node_Id
580 N : constant Node_Id :=
581 New_Node (N_Access_Procedure_Definition, Sloc);
582 begin
583 Set_Protected_Present (N, Protected_Present);
584 Set_Parameter_Specifications (N, Parameter_Specifications);
585 return N;
586 end Make_Access_Procedure_Definition;
588 function Make_Access_Definition (Sloc : Source_Ptr;
589 Subtype_Mark : Node_Id)
590 return Node_Id
592 N : constant Node_Id :=
593 New_Node (N_Access_Definition, Sloc);
594 begin
595 Set_Subtype_Mark (N, Subtype_Mark);
596 return N;
597 end Make_Access_Definition;
599 function Make_Incomplete_Type_Declaration (Sloc : Source_Ptr;
600 Defining_Identifier : Node_Id;
601 Discriminant_Specifications : List_Id := No_List;
602 Unknown_Discriminants_Present : Boolean := False)
603 return Node_Id
605 N : constant Node_Id :=
606 New_Node (N_Incomplete_Type_Declaration, Sloc);
607 begin
608 Set_Defining_Identifier (N, Defining_Identifier);
609 Set_Discriminant_Specifications (N, Discriminant_Specifications);
610 Set_Unknown_Discriminants_Present
611 (N, Unknown_Discriminants_Present);
612 return N;
613 end Make_Incomplete_Type_Declaration;
615 function Make_Explicit_Dereference (Sloc : Source_Ptr;
616 Prefix : Node_Id)
617 return Node_Id
619 N : constant Node_Id :=
620 New_Node (N_Explicit_Dereference, Sloc);
621 begin
622 Set_Prefix (N, Prefix);
623 return N;
624 end Make_Explicit_Dereference;
626 function Make_Indexed_Component (Sloc : Source_Ptr;
627 Prefix : Node_Id;
628 Expressions : List_Id)
629 return Node_Id
631 N : constant Node_Id :=
632 New_Node (N_Indexed_Component, Sloc);
633 begin
634 Set_Prefix (N, Prefix);
635 Set_Expressions (N, Expressions);
636 return N;
637 end Make_Indexed_Component;
639 function Make_Slice (Sloc : Source_Ptr;
640 Prefix : Node_Id;
641 Discrete_Range : Node_Id)
642 return Node_Id
644 N : constant Node_Id :=
645 New_Node (N_Slice, Sloc);
646 begin
647 Set_Prefix (N, Prefix);
648 Set_Discrete_Range (N, Discrete_Range);
649 return N;
650 end Make_Slice;
652 function Make_Selected_Component (Sloc : Source_Ptr;
653 Prefix : Node_Id;
654 Selector_Name : Node_Id)
655 return Node_Id
657 N : constant Node_Id :=
658 New_Node (N_Selected_Component, Sloc);
659 begin
660 Set_Prefix (N, Prefix);
661 Set_Selector_Name (N, Selector_Name);
662 return N;
663 end Make_Selected_Component;
665 function Make_Attribute_Reference (Sloc : Source_Ptr;
666 Prefix : Node_Id;
667 Attribute_Name : Name_Id;
668 Expressions : List_Id := No_List;
669 Must_Be_Byte_Aligned : Boolean := False)
670 return Node_Id
672 N : constant Node_Id :=
673 New_Node (N_Attribute_Reference, Sloc);
674 begin
675 Set_Prefix (N, Prefix);
676 Set_Attribute_Name (N, Attribute_Name);
677 Set_Expressions (N, Expressions);
678 Set_Must_Be_Byte_Aligned (N, Must_Be_Byte_Aligned);
679 return N;
680 end Make_Attribute_Reference;
682 function Make_Aggregate (Sloc : Source_Ptr;
683 Expressions : List_Id := No_List;
684 Component_Associations : List_Id := No_List;
685 Null_Record_Present : Boolean := False)
686 return Node_Id
688 N : constant Node_Id :=
689 New_Node (N_Aggregate, Sloc);
690 begin
691 Set_Expressions (N, Expressions);
692 Set_Component_Associations (N, Component_Associations);
693 Set_Null_Record_Present (N, Null_Record_Present);
694 return N;
695 end Make_Aggregate;
697 function Make_Component_Association (Sloc : Source_Ptr;
698 Choices : List_Id;
699 Expression : Node_Id)
700 return Node_Id
702 N : constant Node_Id :=
703 New_Node (N_Component_Association, Sloc);
704 begin
705 Set_Choices (N, Choices);
706 Set_Expression (N, Expression);
707 return N;
708 end Make_Component_Association;
710 function Make_Extension_Aggregate (Sloc : Source_Ptr;
711 Ancestor_Part : Node_Id;
712 Expressions : List_Id := No_List;
713 Component_Associations : List_Id := No_List;
714 Null_Record_Present : Boolean := False)
715 return Node_Id
717 N : constant Node_Id :=
718 New_Node (N_Extension_Aggregate, Sloc);
719 begin
720 Set_Ancestor_Part (N, Ancestor_Part);
721 Set_Expressions (N, Expressions);
722 Set_Component_Associations (N, Component_Associations);
723 Set_Null_Record_Present (N, Null_Record_Present);
724 return N;
725 end Make_Extension_Aggregate;
727 function Make_Null (Sloc : Source_Ptr)
728 return Node_Id
730 N : constant Node_Id :=
731 New_Node (N_Null, Sloc);
732 begin
733 return N;
734 end Make_Null;
736 function Make_And_Then (Sloc : Source_Ptr;
737 Left_Opnd : Node_Id;
738 Right_Opnd : Node_Id)
739 return Node_Id
741 N : constant Node_Id :=
742 New_Node (N_And_Then, Sloc);
743 begin
744 Set_Left_Opnd (N, Left_Opnd);
745 Set_Right_Opnd (N, Right_Opnd);
746 return N;
747 end Make_And_Then;
749 function Make_Or_Else (Sloc : Source_Ptr;
750 Left_Opnd : Node_Id;
751 Right_Opnd : Node_Id)
752 return Node_Id
754 N : constant Node_Id :=
755 New_Node (N_Or_Else, Sloc);
756 begin
757 Set_Left_Opnd (N, Left_Opnd);
758 Set_Right_Opnd (N, Right_Opnd);
759 return N;
760 end Make_Or_Else;
762 function Make_In (Sloc : Source_Ptr;
763 Left_Opnd : Node_Id;
764 Right_Opnd : Node_Id)
765 return Node_Id
767 N : constant Node_Id :=
768 New_Node (N_In, Sloc);
769 begin
770 Set_Left_Opnd (N, Left_Opnd);
771 Set_Right_Opnd (N, Right_Opnd);
772 return N;
773 end Make_In;
775 function Make_Not_In (Sloc : Source_Ptr;
776 Left_Opnd : Node_Id;
777 Right_Opnd : Node_Id)
778 return Node_Id
780 N : constant Node_Id :=
781 New_Node (N_Not_In, Sloc);
782 begin
783 Set_Left_Opnd (N, Left_Opnd);
784 Set_Right_Opnd (N, Right_Opnd);
785 return N;
786 end Make_Not_In;
788 function Make_Op_And (Sloc : Source_Ptr;
789 Left_Opnd : Node_Id;
790 Right_Opnd : Node_Id)
791 return Node_Id
793 N : constant Node_Id :=
794 New_Node (N_Op_And, Sloc);
795 begin
796 Set_Left_Opnd (N, Left_Opnd);
797 Set_Right_Opnd (N, Right_Opnd);
798 Set_Chars (N, Name_Op_And);
799 Set_Entity (N, Standard_Op_And);
800 return N;
801 end Make_Op_And;
803 function Make_Op_Or (Sloc : Source_Ptr;
804 Left_Opnd : Node_Id;
805 Right_Opnd : Node_Id)
806 return Node_Id
808 N : constant Node_Id :=
809 New_Node (N_Op_Or, Sloc);
810 begin
811 Set_Left_Opnd (N, Left_Opnd);
812 Set_Right_Opnd (N, Right_Opnd);
813 Set_Chars (N, Name_Op_Or);
814 Set_Entity (N, Standard_Op_Or);
815 return N;
816 end Make_Op_Or;
818 function Make_Op_Xor (Sloc : Source_Ptr;
819 Left_Opnd : Node_Id;
820 Right_Opnd : Node_Id)
821 return Node_Id
823 N : constant Node_Id :=
824 New_Node (N_Op_Xor, Sloc);
825 begin
826 Set_Left_Opnd (N, Left_Opnd);
827 Set_Right_Opnd (N, Right_Opnd);
828 Set_Chars (N, Name_Op_Xor);
829 Set_Entity (N, Standard_Op_Xor);
830 return N;
831 end Make_Op_Xor;
833 function Make_Op_Eq (Sloc : Source_Ptr;
834 Left_Opnd : Node_Id;
835 Right_Opnd : Node_Id)
836 return Node_Id
838 N : constant Node_Id :=
839 New_Node (N_Op_Eq, Sloc);
840 begin
841 Set_Left_Opnd (N, Left_Opnd);
842 Set_Right_Opnd (N, Right_Opnd);
843 Set_Chars (N, Name_Op_Eq);
844 Set_Entity (N, Standard_Op_Eq);
845 return N;
846 end Make_Op_Eq;
848 function Make_Op_Ne (Sloc : Source_Ptr;
849 Left_Opnd : Node_Id;
850 Right_Opnd : Node_Id)
851 return Node_Id
853 N : constant Node_Id :=
854 New_Node (N_Op_Ne, Sloc);
855 begin
856 Set_Left_Opnd (N, Left_Opnd);
857 Set_Right_Opnd (N, Right_Opnd);
858 Set_Chars (N, Name_Op_Ne);
859 Set_Entity (N, Standard_Op_Ne);
860 return N;
861 end Make_Op_Ne;
863 function Make_Op_Lt (Sloc : Source_Ptr;
864 Left_Opnd : Node_Id;
865 Right_Opnd : Node_Id)
866 return Node_Id
868 N : constant Node_Id :=
869 New_Node (N_Op_Lt, Sloc);
870 begin
871 Set_Left_Opnd (N, Left_Opnd);
872 Set_Right_Opnd (N, Right_Opnd);
873 Set_Chars (N, Name_Op_Lt);
874 Set_Entity (N, Standard_Op_Lt);
875 return N;
876 end Make_Op_Lt;
878 function Make_Op_Le (Sloc : Source_Ptr;
879 Left_Opnd : Node_Id;
880 Right_Opnd : Node_Id)
881 return Node_Id
883 N : constant Node_Id :=
884 New_Node (N_Op_Le, Sloc);
885 begin
886 Set_Left_Opnd (N, Left_Opnd);
887 Set_Right_Opnd (N, Right_Opnd);
888 Set_Chars (N, Name_Op_Le);
889 Set_Entity (N, Standard_Op_Le);
890 return N;
891 end Make_Op_Le;
893 function Make_Op_Gt (Sloc : Source_Ptr;
894 Left_Opnd : Node_Id;
895 Right_Opnd : Node_Id)
896 return Node_Id
898 N : constant Node_Id :=
899 New_Node (N_Op_Gt, Sloc);
900 begin
901 Set_Left_Opnd (N, Left_Opnd);
902 Set_Right_Opnd (N, Right_Opnd);
903 Set_Chars (N, Name_Op_Gt);
904 Set_Entity (N, Standard_Op_Gt);
905 return N;
906 end Make_Op_Gt;
908 function Make_Op_Ge (Sloc : Source_Ptr;
909 Left_Opnd : Node_Id;
910 Right_Opnd : Node_Id)
911 return Node_Id
913 N : constant Node_Id :=
914 New_Node (N_Op_Ge, Sloc);
915 begin
916 Set_Left_Opnd (N, Left_Opnd);
917 Set_Right_Opnd (N, Right_Opnd);
918 Set_Chars (N, Name_Op_Ge);
919 Set_Entity (N, Standard_Op_Ge);
920 return N;
921 end Make_Op_Ge;
923 function Make_Op_Add (Sloc : Source_Ptr;
924 Left_Opnd : Node_Id;
925 Right_Opnd : Node_Id)
926 return Node_Id
928 N : constant Node_Id :=
929 New_Node (N_Op_Add, Sloc);
930 begin
931 Set_Left_Opnd (N, Left_Opnd);
932 Set_Right_Opnd (N, Right_Opnd);
933 Set_Chars (N, Name_Op_Add);
934 Set_Entity (N, Standard_Op_Add);
935 return N;
936 end Make_Op_Add;
938 function Make_Op_Subtract (Sloc : Source_Ptr;
939 Left_Opnd : Node_Id;
940 Right_Opnd : Node_Id)
941 return Node_Id
943 N : constant Node_Id :=
944 New_Node (N_Op_Subtract, Sloc);
945 begin
946 Set_Left_Opnd (N, Left_Opnd);
947 Set_Right_Opnd (N, Right_Opnd);
948 Set_Chars (N, Name_Op_Subtract);
949 Set_Entity (N, Standard_Op_Subtract);
950 return N;
951 end Make_Op_Subtract;
953 function Make_Op_Concat (Sloc : Source_Ptr;
954 Left_Opnd : Node_Id;
955 Right_Opnd : Node_Id)
956 return Node_Id
958 N : constant Node_Id :=
959 New_Node (N_Op_Concat, Sloc);
960 begin
961 Set_Left_Opnd (N, Left_Opnd);
962 Set_Right_Opnd (N, Right_Opnd);
963 Set_Chars (N, Name_Op_Concat);
964 Set_Entity (N, Standard_Op_Concat);
965 return N;
966 end Make_Op_Concat;
968 function Make_Op_Multiply (Sloc : Source_Ptr;
969 Left_Opnd : Node_Id;
970 Right_Opnd : Node_Id)
971 return Node_Id
973 N : constant Node_Id :=
974 New_Node (N_Op_Multiply, Sloc);
975 begin
976 Set_Left_Opnd (N, Left_Opnd);
977 Set_Right_Opnd (N, Right_Opnd);
978 Set_Chars (N, Name_Op_Multiply);
979 Set_Entity (N, Standard_Op_Multiply);
980 return N;
981 end Make_Op_Multiply;
983 function Make_Op_Divide (Sloc : Source_Ptr;
984 Left_Opnd : Node_Id;
985 Right_Opnd : Node_Id)
986 return Node_Id
988 N : constant Node_Id :=
989 New_Node (N_Op_Divide, Sloc);
990 begin
991 Set_Left_Opnd (N, Left_Opnd);
992 Set_Right_Opnd (N, Right_Opnd);
993 Set_Chars (N, Name_Op_Divide);
994 Set_Entity (N, Standard_Op_Divide);
995 return N;
996 end Make_Op_Divide;
998 function Make_Op_Mod (Sloc : Source_Ptr;
999 Left_Opnd : Node_Id;
1000 Right_Opnd : Node_Id)
1001 return Node_Id
1003 N : constant Node_Id :=
1004 New_Node (N_Op_Mod, Sloc);
1005 begin
1006 Set_Left_Opnd (N, Left_Opnd);
1007 Set_Right_Opnd (N, Right_Opnd);
1008 Set_Chars (N, Name_Op_Mod);
1009 Set_Entity (N, Standard_Op_Mod);
1010 return N;
1011 end Make_Op_Mod;
1013 function Make_Op_Rem (Sloc : Source_Ptr;
1014 Left_Opnd : Node_Id;
1015 Right_Opnd : Node_Id)
1016 return Node_Id
1018 N : constant Node_Id :=
1019 New_Node (N_Op_Rem, Sloc);
1020 begin
1021 Set_Left_Opnd (N, Left_Opnd);
1022 Set_Right_Opnd (N, Right_Opnd);
1023 Set_Chars (N, Name_Op_Rem);
1024 Set_Entity (N, Standard_Op_Rem);
1025 return N;
1026 end Make_Op_Rem;
1028 function Make_Op_Expon (Sloc : Source_Ptr;
1029 Left_Opnd : Node_Id;
1030 Right_Opnd : Node_Id)
1031 return Node_Id
1033 N : constant Node_Id :=
1034 New_Node (N_Op_Expon, Sloc);
1035 begin
1036 Set_Left_Opnd (N, Left_Opnd);
1037 Set_Right_Opnd (N, Right_Opnd);
1038 Set_Chars (N, Name_Op_Expon);
1039 Set_Entity (N, Standard_Op_Expon);
1040 return N;
1041 end Make_Op_Expon;
1043 function Make_Op_Plus (Sloc : Source_Ptr;
1044 Right_Opnd : Node_Id)
1045 return Node_Id
1047 N : constant Node_Id :=
1048 New_Node (N_Op_Plus, Sloc);
1049 begin
1050 Set_Right_Opnd (N, Right_Opnd);
1051 Set_Chars (N, Name_Op_Add);
1052 Set_Entity (N, Standard_Op_Plus);
1053 return N;
1054 end Make_Op_Plus;
1056 function Make_Op_Minus (Sloc : Source_Ptr;
1057 Right_Opnd : Node_Id)
1058 return Node_Id
1060 N : constant Node_Id :=
1061 New_Node (N_Op_Minus, Sloc);
1062 begin
1063 Set_Right_Opnd (N, Right_Opnd);
1064 Set_Chars (N, Name_Op_Subtract);
1065 Set_Entity (N, Standard_Op_Minus);
1066 return N;
1067 end Make_Op_Minus;
1069 function Make_Op_Abs (Sloc : Source_Ptr;
1070 Right_Opnd : Node_Id)
1071 return Node_Id
1073 N : constant Node_Id :=
1074 New_Node (N_Op_Abs, Sloc);
1075 begin
1076 Set_Right_Opnd (N, Right_Opnd);
1077 Set_Chars (N, Name_Op_Abs);
1078 Set_Entity (N, Standard_Op_Abs);
1079 return N;
1080 end Make_Op_Abs;
1082 function Make_Op_Not (Sloc : Source_Ptr;
1083 Right_Opnd : Node_Id)
1084 return Node_Id
1086 N : constant Node_Id :=
1087 New_Node (N_Op_Not, Sloc);
1088 begin
1089 Set_Right_Opnd (N, Right_Opnd);
1090 Set_Chars (N, Name_Op_Not);
1091 Set_Entity (N, Standard_Op_Not);
1092 return N;
1093 end Make_Op_Not;
1095 function Make_Type_Conversion (Sloc : Source_Ptr;
1096 Subtype_Mark : Node_Id;
1097 Expression : Node_Id)
1098 return Node_Id
1100 N : constant Node_Id :=
1101 New_Node (N_Type_Conversion, Sloc);
1102 begin
1103 Set_Subtype_Mark (N, Subtype_Mark);
1104 Set_Expression (N, Expression);
1105 return N;
1106 end Make_Type_Conversion;
1108 function Make_Qualified_Expression (Sloc : Source_Ptr;
1109 Subtype_Mark : Node_Id;
1110 Expression : Node_Id)
1111 return Node_Id
1113 N : constant Node_Id :=
1114 New_Node (N_Qualified_Expression, Sloc);
1115 begin
1116 Set_Subtype_Mark (N, Subtype_Mark);
1117 Set_Expression (N, Expression);
1118 return N;
1119 end Make_Qualified_Expression;
1121 function Make_Allocator (Sloc : Source_Ptr;
1122 Expression : Node_Id)
1123 return Node_Id
1125 N : constant Node_Id :=
1126 New_Node (N_Allocator, Sloc);
1127 begin
1128 Set_Expression (N, Expression);
1129 return N;
1130 end Make_Allocator;
1132 function Make_Null_Statement (Sloc : Source_Ptr)
1133 return Node_Id
1135 N : constant Node_Id :=
1136 New_Node (N_Null_Statement, Sloc);
1137 begin
1138 return N;
1139 end Make_Null_Statement;
1141 function Make_Label (Sloc : Source_Ptr;
1142 Identifier : Node_Id)
1143 return Node_Id
1145 N : constant Node_Id :=
1146 New_Node (N_Label, Sloc);
1147 begin
1148 Set_Identifier (N, Identifier);
1149 return N;
1150 end Make_Label;
1152 function Make_Assignment_Statement (Sloc : Source_Ptr;
1153 Name : Node_Id;
1154 Expression : Node_Id)
1155 return Node_Id
1157 N : constant Node_Id :=
1158 New_Node (N_Assignment_Statement, Sloc);
1159 begin
1160 Set_Name (N, Name);
1161 Set_Expression (N, Expression);
1162 return N;
1163 end Make_Assignment_Statement;
1165 function Make_If_Statement (Sloc : Source_Ptr;
1166 Condition : Node_Id;
1167 Then_Statements : List_Id;
1168 Elsif_Parts : List_Id := No_List;
1169 Else_Statements : List_Id := No_List;
1170 End_Span : Uint := No_Uint)
1171 return Node_Id
1173 N : constant Node_Id :=
1174 New_Node (N_If_Statement, Sloc);
1175 begin
1176 Set_Condition (N, Condition);
1177 Set_Then_Statements (N, Then_Statements);
1178 Set_Elsif_Parts (N, Elsif_Parts);
1179 Set_Else_Statements (N, Else_Statements);
1180 Set_End_Span (N, End_Span);
1181 return N;
1182 end Make_If_Statement;
1184 function Make_Elsif_Part (Sloc : Source_Ptr;
1185 Condition : Node_Id;
1186 Then_Statements : List_Id)
1187 return Node_Id
1189 N : constant Node_Id :=
1190 New_Node (N_Elsif_Part, Sloc);
1191 begin
1192 Set_Condition (N, Condition);
1193 Set_Then_Statements (N, Then_Statements);
1194 return N;
1195 end Make_Elsif_Part;
1197 function Make_Case_Statement (Sloc : Source_Ptr;
1198 Expression : Node_Id;
1199 Alternatives : List_Id;
1200 End_Span : Uint := No_Uint)
1201 return Node_Id
1203 N : constant Node_Id :=
1204 New_Node (N_Case_Statement, Sloc);
1205 begin
1206 Set_Expression (N, Expression);
1207 Set_Alternatives (N, Alternatives);
1208 Set_End_Span (N, End_Span);
1209 return N;
1210 end Make_Case_Statement;
1212 function Make_Case_Statement_Alternative (Sloc : Source_Ptr;
1213 Discrete_Choices : List_Id;
1214 Statements : List_Id)
1215 return Node_Id
1217 N : constant Node_Id :=
1218 New_Node (N_Case_Statement_Alternative, Sloc);
1219 begin
1220 Set_Discrete_Choices (N, Discrete_Choices);
1221 Set_Statements (N, Statements);
1222 return N;
1223 end Make_Case_Statement_Alternative;
1225 function Make_Loop_Statement (Sloc : Source_Ptr;
1226 Identifier : Node_Id := Empty;
1227 Iteration_Scheme : Node_Id := Empty;
1228 Statements : List_Id;
1229 End_Label : Node_Id;
1230 Has_Created_Identifier : Boolean := False)
1231 return Node_Id
1233 N : constant Node_Id :=
1234 New_Node (N_Loop_Statement, Sloc);
1235 begin
1236 Set_Identifier (N, Identifier);
1237 Set_Iteration_Scheme (N, Iteration_Scheme);
1238 Set_Statements (N, Statements);
1239 Set_End_Label (N, End_Label);
1240 Set_Has_Created_Identifier (N, Has_Created_Identifier);
1241 return N;
1242 end Make_Loop_Statement;
1244 function Make_Iteration_Scheme (Sloc : Source_Ptr;
1245 Condition : Node_Id := Empty;
1246 Loop_Parameter_Specification : Node_Id := Empty)
1247 return Node_Id
1249 N : constant Node_Id :=
1250 New_Node (N_Iteration_Scheme, Sloc);
1251 begin
1252 Set_Condition (N, Condition);
1253 Set_Loop_Parameter_Specification
1254 (N, Loop_Parameter_Specification);
1255 return N;
1256 end Make_Iteration_Scheme;
1258 function Make_Loop_Parameter_Specification (Sloc : Source_Ptr;
1259 Defining_Identifier : Node_Id;
1260 Reverse_Present : Boolean := False;
1261 Discrete_Subtype_Definition : Node_Id)
1262 return Node_Id
1264 N : constant Node_Id :=
1265 New_Node (N_Loop_Parameter_Specification, Sloc);
1266 begin
1267 Set_Defining_Identifier (N, Defining_Identifier);
1268 Set_Reverse_Present (N, Reverse_Present);
1269 Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
1270 return N;
1271 end Make_Loop_Parameter_Specification;
1273 function Make_Block_Statement (Sloc : Source_Ptr;
1274 Identifier : Node_Id := Empty;
1275 Declarations : List_Id := No_List;
1276 Handled_Statement_Sequence : Node_Id;
1277 Has_Created_Identifier : Boolean := False;
1278 Is_Task_Allocation_Block : Boolean := False;
1279 Is_Asynchronous_Call_Block : Boolean := False)
1280 return Node_Id
1282 N : constant Node_Id :=
1283 New_Node (N_Block_Statement, Sloc);
1284 begin
1285 Set_Identifier (N, Identifier);
1286 Set_Declarations (N, Declarations);
1287 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1288 Set_Has_Created_Identifier (N, Has_Created_Identifier);
1289 Set_Is_Task_Allocation_Block (N, Is_Task_Allocation_Block);
1290 Set_Is_Asynchronous_Call_Block (N, Is_Asynchronous_Call_Block);
1291 return N;
1292 end Make_Block_Statement;
1294 function Make_Exit_Statement (Sloc : Source_Ptr;
1295 Name : Node_Id := Empty;
1296 Condition : Node_Id := Empty)
1297 return Node_Id
1299 N : constant Node_Id :=
1300 New_Node (N_Exit_Statement, Sloc);
1301 begin
1302 Set_Name (N, Name);
1303 Set_Condition (N, Condition);
1304 return N;
1305 end Make_Exit_Statement;
1307 function Make_Goto_Statement (Sloc : Source_Ptr;
1308 Name : Node_Id)
1309 return Node_Id
1311 N : constant Node_Id :=
1312 New_Node (N_Goto_Statement, Sloc);
1313 begin
1314 Set_Name (N, Name);
1315 return N;
1316 end Make_Goto_Statement;
1318 function Make_Subprogram_Declaration (Sloc : Source_Ptr;
1319 Specification : Node_Id)
1320 return Node_Id
1322 N : constant Node_Id :=
1323 New_Node (N_Subprogram_Declaration, Sloc);
1324 begin
1325 Set_Specification (N, Specification);
1326 return N;
1327 end Make_Subprogram_Declaration;
1329 function Make_Abstract_Subprogram_Declaration (Sloc : Source_Ptr;
1330 Specification : Node_Id)
1331 return Node_Id
1333 N : constant Node_Id :=
1334 New_Node (N_Abstract_Subprogram_Declaration, Sloc);
1335 begin
1336 Set_Specification (N, Specification);
1337 return N;
1338 end Make_Abstract_Subprogram_Declaration;
1340 function Make_Function_Specification (Sloc : Source_Ptr;
1341 Defining_Unit_Name : Node_Id;
1342 Parameter_Specifications : List_Id := No_List;
1343 Subtype_Mark : Node_Id)
1344 return Node_Id
1346 N : constant Node_Id :=
1347 New_Node (N_Function_Specification, Sloc);
1348 begin
1349 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1350 Set_Parameter_Specifications (N, Parameter_Specifications);
1351 Set_Subtype_Mark (N, Subtype_Mark);
1352 return N;
1353 end Make_Function_Specification;
1355 function Make_Procedure_Specification (Sloc : Source_Ptr;
1356 Defining_Unit_Name : Node_Id;
1357 Parameter_Specifications : List_Id := No_List)
1358 return Node_Id
1360 N : constant Node_Id :=
1361 New_Node (N_Procedure_Specification, Sloc);
1362 begin
1363 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1364 Set_Parameter_Specifications (N, Parameter_Specifications);
1365 return N;
1366 end Make_Procedure_Specification;
1368 function Make_Designator (Sloc : Source_Ptr;
1369 Name : Node_Id;
1370 Identifier : Node_Id)
1371 return Node_Id
1373 N : constant Node_Id :=
1374 New_Node (N_Designator, Sloc);
1375 begin
1376 Set_Name (N, Name);
1377 Set_Identifier (N, Identifier);
1378 return N;
1379 end Make_Designator;
1381 function Make_Defining_Program_Unit_Name (Sloc : Source_Ptr;
1382 Name : Node_Id;
1383 Defining_Identifier : Node_Id)
1384 return Node_Id
1386 N : constant Node_Id :=
1387 New_Node (N_Defining_Program_Unit_Name, Sloc);
1388 begin
1389 Set_Name (N, Name);
1390 Set_Defining_Identifier (N, Defining_Identifier);
1391 return N;
1392 end Make_Defining_Program_Unit_Name;
1394 function Make_Operator_Symbol (Sloc : Source_Ptr;
1395 Chars : Name_Id;
1396 Strval : String_Id)
1397 return Node_Id
1399 N : constant Node_Id :=
1400 New_Node (N_Operator_Symbol, Sloc);
1401 begin
1402 Set_Chars (N, Chars);
1403 Set_Strval (N, Strval);
1404 return N;
1405 end Make_Operator_Symbol;
1407 function Make_Defining_Operator_Symbol (Sloc : Source_Ptr;
1408 Chars : Name_Id)
1409 return Node_Id
1411 N : constant Node_Id :=
1412 New_Entity (N_Defining_Operator_Symbol, Sloc);
1413 begin
1414 Set_Chars (N, Chars);
1415 return N;
1416 end Make_Defining_Operator_Symbol;
1418 function Make_Parameter_Specification (Sloc : Source_Ptr;
1419 Defining_Identifier : Node_Id;
1420 In_Present : Boolean := False;
1421 Out_Present : Boolean := False;
1422 Parameter_Type : Node_Id;
1423 Expression : Node_Id := Empty)
1424 return Node_Id
1426 N : constant Node_Id :=
1427 New_Node (N_Parameter_Specification, Sloc);
1428 begin
1429 Set_Defining_Identifier (N, Defining_Identifier);
1430 Set_In_Present (N, In_Present);
1431 Set_Out_Present (N, Out_Present);
1432 Set_Parameter_Type (N, Parameter_Type);
1433 Set_Expression (N, Expression);
1434 return N;
1435 end Make_Parameter_Specification;
1437 function Make_Subprogram_Body (Sloc : Source_Ptr;
1438 Specification : Node_Id;
1439 Declarations : List_Id;
1440 Handled_Statement_Sequence : Node_Id;
1441 Bad_Is_Detected : Boolean := False)
1442 return Node_Id
1444 N : constant Node_Id :=
1445 New_Node (N_Subprogram_Body, Sloc);
1446 begin
1447 Set_Specification (N, Specification);
1448 Set_Declarations (N, Declarations);
1449 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1450 Set_Bad_Is_Detected (N, Bad_Is_Detected);
1451 return N;
1452 end Make_Subprogram_Body;
1454 function Make_Procedure_Call_Statement (Sloc : Source_Ptr;
1455 Name : Node_Id;
1456 Parameter_Associations : List_Id := No_List)
1457 return Node_Id
1459 N : constant Node_Id :=
1460 New_Node (N_Procedure_Call_Statement, Sloc);
1461 begin
1462 Set_Name (N, Name);
1463 Set_Parameter_Associations (N, Parameter_Associations);
1464 return N;
1465 end Make_Procedure_Call_Statement;
1467 function Make_Function_Call (Sloc : Source_Ptr;
1468 Name : Node_Id;
1469 Parameter_Associations : List_Id := No_List)
1470 return Node_Id
1472 N : constant Node_Id :=
1473 New_Node (N_Function_Call, Sloc);
1474 begin
1475 Set_Name (N, Name);
1476 Set_Parameter_Associations (N, Parameter_Associations);
1477 return N;
1478 end Make_Function_Call;
1480 function Make_Parameter_Association (Sloc : Source_Ptr;
1481 Selector_Name : Node_Id;
1482 Explicit_Actual_Parameter : Node_Id)
1483 return Node_Id
1485 N : constant Node_Id :=
1486 New_Node (N_Parameter_Association, Sloc);
1487 begin
1488 Set_Selector_Name (N, Selector_Name);
1489 Set_Explicit_Actual_Parameter (N, Explicit_Actual_Parameter);
1490 return N;
1491 end Make_Parameter_Association;
1493 function Make_Return_Statement (Sloc : Source_Ptr;
1494 Expression : Node_Id := Empty)
1495 return Node_Id
1497 N : constant Node_Id :=
1498 New_Node (N_Return_Statement, Sloc);
1499 begin
1500 Set_Expression (N, Expression);
1501 return N;
1502 end Make_Return_Statement;
1504 function Make_Package_Declaration (Sloc : Source_Ptr;
1505 Specification : Node_Id)
1506 return Node_Id
1508 N : constant Node_Id :=
1509 New_Node (N_Package_Declaration, Sloc);
1510 begin
1511 Set_Specification (N, Specification);
1512 return N;
1513 end Make_Package_Declaration;
1515 function Make_Package_Specification (Sloc : Source_Ptr;
1516 Defining_Unit_Name : Node_Id;
1517 Visible_Declarations : List_Id;
1518 Private_Declarations : List_Id := No_List;
1519 End_Label : Node_Id)
1520 return Node_Id
1522 N : constant Node_Id :=
1523 New_Node (N_Package_Specification, Sloc);
1524 begin
1525 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1526 Set_Visible_Declarations (N, Visible_Declarations);
1527 Set_Private_Declarations (N, Private_Declarations);
1528 Set_End_Label (N, End_Label);
1529 return N;
1530 end Make_Package_Specification;
1532 function Make_Package_Body (Sloc : Source_Ptr;
1533 Defining_Unit_Name : Node_Id;
1534 Declarations : List_Id;
1535 Handled_Statement_Sequence : Node_Id := Empty)
1536 return Node_Id
1538 N : constant Node_Id :=
1539 New_Node (N_Package_Body, Sloc);
1540 begin
1541 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1542 Set_Declarations (N, Declarations);
1543 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1544 return N;
1545 end Make_Package_Body;
1547 function Make_Private_Type_Declaration (Sloc : Source_Ptr;
1548 Defining_Identifier : Node_Id;
1549 Discriminant_Specifications : List_Id := No_List;
1550 Unknown_Discriminants_Present : Boolean := False;
1551 Abstract_Present : Boolean := False;
1552 Tagged_Present : Boolean := False;
1553 Limited_Present : Boolean := False)
1554 return Node_Id
1556 N : constant Node_Id :=
1557 New_Node (N_Private_Type_Declaration, Sloc);
1558 begin
1559 Set_Defining_Identifier (N, Defining_Identifier);
1560 Set_Discriminant_Specifications (N, Discriminant_Specifications);
1561 Set_Unknown_Discriminants_Present
1562 (N, Unknown_Discriminants_Present);
1563 Set_Abstract_Present (N, Abstract_Present);
1564 Set_Tagged_Present (N, Tagged_Present);
1565 Set_Limited_Present (N, Limited_Present);
1566 return N;
1567 end Make_Private_Type_Declaration;
1569 function Make_Private_Extension_Declaration (Sloc : Source_Ptr;
1570 Defining_Identifier : Node_Id;
1571 Discriminant_Specifications : List_Id := No_List;
1572 Unknown_Discriminants_Present : Boolean := False;
1573 Abstract_Present : Boolean := False;
1574 Subtype_Indication : Node_Id)
1575 return Node_Id
1577 N : constant Node_Id :=
1578 New_Node (N_Private_Extension_Declaration, Sloc);
1579 begin
1580 Set_Defining_Identifier (N, Defining_Identifier);
1581 Set_Discriminant_Specifications (N, Discriminant_Specifications);
1582 Set_Unknown_Discriminants_Present
1583 (N, Unknown_Discriminants_Present);
1584 Set_Abstract_Present (N, Abstract_Present);
1585 Set_Subtype_Indication (N, Subtype_Indication);
1586 return N;
1587 end Make_Private_Extension_Declaration;
1589 function Make_Use_Package_Clause (Sloc : Source_Ptr;
1590 Names : List_Id)
1591 return Node_Id
1593 N : constant Node_Id :=
1594 New_Node (N_Use_Package_Clause, Sloc);
1595 begin
1596 Set_Names (N, Names);
1597 return N;
1598 end Make_Use_Package_Clause;
1600 function Make_Use_Type_Clause (Sloc : Source_Ptr;
1601 Subtype_Marks : List_Id)
1602 return Node_Id
1604 N : constant Node_Id :=
1605 New_Node (N_Use_Type_Clause, Sloc);
1606 begin
1607 Set_Subtype_Marks (N, Subtype_Marks);
1608 return N;
1609 end Make_Use_Type_Clause;
1611 function Make_Object_Renaming_Declaration (Sloc : Source_Ptr;
1612 Defining_Identifier : Node_Id;
1613 Subtype_Mark : Node_Id;
1614 Name : Node_Id)
1615 return Node_Id
1617 N : constant Node_Id :=
1618 New_Node (N_Object_Renaming_Declaration, Sloc);
1619 begin
1620 Set_Defining_Identifier (N, Defining_Identifier);
1621 Set_Subtype_Mark (N, Subtype_Mark);
1622 Set_Name (N, Name);
1623 return N;
1624 end Make_Object_Renaming_Declaration;
1626 function Make_Exception_Renaming_Declaration (Sloc : Source_Ptr;
1627 Defining_Identifier : Node_Id;
1628 Name : Node_Id)
1629 return Node_Id
1631 N : constant Node_Id :=
1632 New_Node (N_Exception_Renaming_Declaration, Sloc);
1633 begin
1634 Set_Defining_Identifier (N, Defining_Identifier);
1635 Set_Name (N, Name);
1636 return N;
1637 end Make_Exception_Renaming_Declaration;
1639 function Make_Package_Renaming_Declaration (Sloc : Source_Ptr;
1640 Defining_Unit_Name : Node_Id;
1641 Name : Node_Id)
1642 return Node_Id
1644 N : constant Node_Id :=
1645 New_Node (N_Package_Renaming_Declaration, Sloc);
1646 begin
1647 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1648 Set_Name (N, Name);
1649 return N;
1650 end Make_Package_Renaming_Declaration;
1652 function Make_Subprogram_Renaming_Declaration (Sloc : Source_Ptr;
1653 Specification : Node_Id;
1654 Name : Node_Id)
1655 return Node_Id
1657 N : constant Node_Id :=
1658 New_Node (N_Subprogram_Renaming_Declaration, Sloc);
1659 begin
1660 Set_Specification (N, Specification);
1661 Set_Name (N, Name);
1662 return N;
1663 end Make_Subprogram_Renaming_Declaration;
1665 function Make_Generic_Package_Renaming_Declaration (Sloc : Source_Ptr;
1666 Defining_Unit_Name : Node_Id;
1667 Name : Node_Id)
1668 return Node_Id
1670 N : constant Node_Id :=
1671 New_Node (N_Generic_Package_Renaming_Declaration, Sloc);
1672 begin
1673 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1674 Set_Name (N, Name);
1675 return N;
1676 end Make_Generic_Package_Renaming_Declaration;
1678 function Make_Generic_Procedure_Renaming_Declaration (Sloc : Source_Ptr;
1679 Defining_Unit_Name : Node_Id;
1680 Name : Node_Id)
1681 return Node_Id
1683 N : constant Node_Id :=
1684 New_Node (N_Generic_Procedure_Renaming_Declaration, Sloc);
1685 begin
1686 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1687 Set_Name (N, Name);
1688 return N;
1689 end Make_Generic_Procedure_Renaming_Declaration;
1691 function Make_Generic_Function_Renaming_Declaration (Sloc : Source_Ptr;
1692 Defining_Unit_Name : Node_Id;
1693 Name : Node_Id)
1694 return Node_Id
1696 N : constant Node_Id :=
1697 New_Node (N_Generic_Function_Renaming_Declaration, Sloc);
1698 begin
1699 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1700 Set_Name (N, Name);
1701 return N;
1702 end Make_Generic_Function_Renaming_Declaration;
1704 function Make_Task_Type_Declaration (Sloc : Source_Ptr;
1705 Defining_Identifier : Node_Id;
1706 Discriminant_Specifications : List_Id := No_List;
1707 Task_Definition : Node_Id := Empty)
1708 return Node_Id
1710 N : constant Node_Id :=
1711 New_Node (N_Task_Type_Declaration, Sloc);
1712 begin
1713 Set_Defining_Identifier (N, Defining_Identifier);
1714 Set_Discriminant_Specifications (N, Discriminant_Specifications);
1715 Set_Task_Definition (N, Task_Definition);
1716 return N;
1717 end Make_Task_Type_Declaration;
1719 function Make_Single_Task_Declaration (Sloc : Source_Ptr;
1720 Defining_Identifier : Node_Id;
1721 Task_Definition : Node_Id := Empty)
1722 return Node_Id
1724 N : constant Node_Id :=
1725 New_Node (N_Single_Task_Declaration, Sloc);
1726 begin
1727 Set_Defining_Identifier (N, Defining_Identifier);
1728 Set_Task_Definition (N, Task_Definition);
1729 return N;
1730 end Make_Single_Task_Declaration;
1732 function Make_Task_Definition (Sloc : Source_Ptr;
1733 Visible_Declarations : List_Id;
1734 Private_Declarations : List_Id := No_List;
1735 End_Label : Node_Id)
1736 return Node_Id
1738 N : constant Node_Id :=
1739 New_Node (N_Task_Definition, Sloc);
1740 begin
1741 Set_Visible_Declarations (N, Visible_Declarations);
1742 Set_Private_Declarations (N, Private_Declarations);
1743 Set_End_Label (N, End_Label);
1744 return N;
1745 end Make_Task_Definition;
1747 function Make_Task_Body (Sloc : Source_Ptr;
1748 Defining_Identifier : Node_Id;
1749 Declarations : List_Id;
1750 Handled_Statement_Sequence : Node_Id)
1751 return Node_Id
1753 N : constant Node_Id :=
1754 New_Node (N_Task_Body, Sloc);
1755 begin
1756 Set_Defining_Identifier (N, Defining_Identifier);
1757 Set_Declarations (N, Declarations);
1758 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1759 return N;
1760 end Make_Task_Body;
1762 function Make_Protected_Type_Declaration (Sloc : Source_Ptr;
1763 Defining_Identifier : Node_Id;
1764 Discriminant_Specifications : List_Id := No_List;
1765 Protected_Definition : Node_Id)
1766 return Node_Id
1768 N : constant Node_Id :=
1769 New_Node (N_Protected_Type_Declaration, Sloc);
1770 begin
1771 Set_Defining_Identifier (N, Defining_Identifier);
1772 Set_Discriminant_Specifications (N, Discriminant_Specifications);
1773 Set_Protected_Definition (N, Protected_Definition);
1774 return N;
1775 end Make_Protected_Type_Declaration;
1777 function Make_Single_Protected_Declaration (Sloc : Source_Ptr;
1778 Defining_Identifier : Node_Id;
1779 Protected_Definition : Node_Id)
1780 return Node_Id
1782 N : constant Node_Id :=
1783 New_Node (N_Single_Protected_Declaration, Sloc);
1784 begin
1785 Set_Defining_Identifier (N, Defining_Identifier);
1786 Set_Protected_Definition (N, Protected_Definition);
1787 return N;
1788 end Make_Single_Protected_Declaration;
1790 function Make_Protected_Definition (Sloc : Source_Ptr;
1791 Visible_Declarations : List_Id;
1792 Private_Declarations : List_Id := No_List;
1793 End_Label : Node_Id)
1794 return Node_Id
1796 N : constant Node_Id :=
1797 New_Node (N_Protected_Definition, Sloc);
1798 begin
1799 Set_Visible_Declarations (N, Visible_Declarations);
1800 Set_Private_Declarations (N, Private_Declarations);
1801 Set_End_Label (N, End_Label);
1802 return N;
1803 end Make_Protected_Definition;
1805 function Make_Protected_Body (Sloc : Source_Ptr;
1806 Defining_Identifier : Node_Id;
1807 Declarations : List_Id;
1808 End_Label : Node_Id)
1809 return Node_Id
1811 N : constant Node_Id :=
1812 New_Node (N_Protected_Body, Sloc);
1813 begin
1814 Set_Defining_Identifier (N, Defining_Identifier);
1815 Set_Declarations (N, Declarations);
1816 Set_End_Label (N, End_Label);
1817 return N;
1818 end Make_Protected_Body;
1820 function Make_Entry_Declaration (Sloc : Source_Ptr;
1821 Defining_Identifier : Node_Id;
1822 Discrete_Subtype_Definition : Node_Id := Empty;
1823 Parameter_Specifications : List_Id := No_List)
1824 return Node_Id
1826 N : constant Node_Id :=
1827 New_Node (N_Entry_Declaration, Sloc);
1828 begin
1829 Set_Defining_Identifier (N, Defining_Identifier);
1830 Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
1831 Set_Parameter_Specifications (N, Parameter_Specifications);
1832 return N;
1833 end Make_Entry_Declaration;
1835 function Make_Accept_Statement (Sloc : Source_Ptr;
1836 Entry_Direct_Name : Node_Id;
1837 Entry_Index : Node_Id := Empty;
1838 Parameter_Specifications : List_Id := No_List;
1839 Handled_Statement_Sequence : Node_Id;
1840 Declarations : List_Id := No_List)
1841 return Node_Id
1843 N : constant Node_Id :=
1844 New_Node (N_Accept_Statement, Sloc);
1845 begin
1846 Set_Entry_Direct_Name (N, Entry_Direct_Name);
1847 Set_Entry_Index (N, Entry_Index);
1848 Set_Parameter_Specifications (N, Parameter_Specifications);
1849 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1850 Set_Declarations (N, Declarations);
1851 return N;
1852 end Make_Accept_Statement;
1854 function Make_Entry_Body (Sloc : Source_Ptr;
1855 Defining_Identifier : Node_Id;
1856 Entry_Body_Formal_Part : Node_Id;
1857 Declarations : List_Id;
1858 Handled_Statement_Sequence : Node_Id)
1859 return Node_Id
1861 N : constant Node_Id :=
1862 New_Node (N_Entry_Body, Sloc);
1863 begin
1864 Set_Defining_Identifier (N, Defining_Identifier);
1865 Set_Entry_Body_Formal_Part (N, Entry_Body_Formal_Part);
1866 Set_Declarations (N, Declarations);
1867 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1868 return N;
1869 end Make_Entry_Body;
1871 function Make_Entry_Body_Formal_Part (Sloc : Source_Ptr;
1872 Entry_Index_Specification : Node_Id := Empty;
1873 Parameter_Specifications : List_Id := No_List;
1874 Condition : Node_Id)
1875 return Node_Id
1877 N : constant Node_Id :=
1878 New_Node (N_Entry_Body_Formal_Part, Sloc);
1879 begin
1880 Set_Entry_Index_Specification (N, Entry_Index_Specification);
1881 Set_Parameter_Specifications (N, Parameter_Specifications);
1882 Set_Condition (N, Condition);
1883 return N;
1884 end Make_Entry_Body_Formal_Part;
1886 function Make_Entry_Index_Specification (Sloc : Source_Ptr;
1887 Defining_Identifier : Node_Id;
1888 Discrete_Subtype_Definition : Node_Id)
1889 return Node_Id
1891 N : constant Node_Id :=
1892 New_Node (N_Entry_Index_Specification, Sloc);
1893 begin
1894 Set_Defining_Identifier (N, Defining_Identifier);
1895 Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
1896 return N;
1897 end Make_Entry_Index_Specification;
1899 function Make_Entry_Call_Statement (Sloc : Source_Ptr;
1900 Name : Node_Id;
1901 Parameter_Associations : List_Id := No_List)
1902 return Node_Id
1904 N : constant Node_Id :=
1905 New_Node (N_Entry_Call_Statement, Sloc);
1906 begin
1907 Set_Name (N, Name);
1908 Set_Parameter_Associations (N, Parameter_Associations);
1909 return N;
1910 end Make_Entry_Call_Statement;
1912 function Make_Requeue_Statement (Sloc : Source_Ptr;
1913 Name : Node_Id;
1914 Abort_Present : Boolean := False)
1915 return Node_Id
1917 N : constant Node_Id :=
1918 New_Node (N_Requeue_Statement, Sloc);
1919 begin
1920 Set_Name (N, Name);
1921 Set_Abort_Present (N, Abort_Present);
1922 return N;
1923 end Make_Requeue_Statement;
1925 function Make_Delay_Until_Statement (Sloc : Source_Ptr;
1926 Expression : Node_Id)
1927 return Node_Id
1929 N : constant Node_Id :=
1930 New_Node (N_Delay_Until_Statement, Sloc);
1931 begin
1932 Set_Expression (N, Expression);
1933 return N;
1934 end Make_Delay_Until_Statement;
1936 function Make_Delay_Relative_Statement (Sloc : Source_Ptr;
1937 Expression : Node_Id)
1938 return Node_Id
1940 N : constant Node_Id :=
1941 New_Node (N_Delay_Relative_Statement, Sloc);
1942 begin
1943 Set_Expression (N, Expression);
1944 return N;
1945 end Make_Delay_Relative_Statement;
1947 function Make_Selective_Accept (Sloc : Source_Ptr;
1948 Select_Alternatives : List_Id;
1949 Else_Statements : List_Id := No_List)
1950 return Node_Id
1952 N : constant Node_Id :=
1953 New_Node (N_Selective_Accept, Sloc);
1954 begin
1955 Set_Select_Alternatives (N, Select_Alternatives);
1956 Set_Else_Statements (N, Else_Statements);
1957 return N;
1958 end Make_Selective_Accept;
1960 function Make_Accept_Alternative (Sloc : Source_Ptr;
1961 Accept_Statement : Node_Id;
1962 Condition : Node_Id := Empty;
1963 Statements : List_Id := Empty_List;
1964 Pragmas_Before : List_Id := No_List)
1965 return Node_Id
1967 N : constant Node_Id :=
1968 New_Node (N_Accept_Alternative, Sloc);
1969 begin
1970 Set_Accept_Statement (N, Accept_Statement);
1971 Set_Condition (N, Condition);
1972 Set_Statements (N, Statements);
1973 Set_Pragmas_Before (N, Pragmas_Before);
1974 return N;
1975 end Make_Accept_Alternative;
1977 function Make_Delay_Alternative (Sloc : Source_Ptr;
1978 Delay_Statement : Node_Id;
1979 Condition : Node_Id := Empty;
1980 Statements : List_Id := Empty_List;
1981 Pragmas_Before : List_Id := No_List)
1982 return Node_Id
1984 N : constant Node_Id :=
1985 New_Node (N_Delay_Alternative, Sloc);
1986 begin
1987 Set_Delay_Statement (N, Delay_Statement);
1988 Set_Condition (N, Condition);
1989 Set_Statements (N, Statements);
1990 Set_Pragmas_Before (N, Pragmas_Before);
1991 return N;
1992 end Make_Delay_Alternative;
1994 function Make_Terminate_Alternative (Sloc : Source_Ptr;
1995 Condition : Node_Id := Empty;
1996 Pragmas_Before : List_Id := No_List;
1997 Pragmas_After : List_Id := No_List)
1998 return Node_Id
2000 N : constant Node_Id :=
2001 New_Node (N_Terminate_Alternative, Sloc);
2002 begin
2003 Set_Condition (N, Condition);
2004 Set_Pragmas_Before (N, Pragmas_Before);
2005 Set_Pragmas_After (N, Pragmas_After);
2006 return N;
2007 end Make_Terminate_Alternative;
2009 function Make_Timed_Entry_Call (Sloc : Source_Ptr;
2010 Entry_Call_Alternative : Node_Id;
2011 Delay_Alternative : Node_Id)
2012 return Node_Id
2014 N : constant Node_Id :=
2015 New_Node (N_Timed_Entry_Call, Sloc);
2016 begin
2017 Set_Entry_Call_Alternative (N, Entry_Call_Alternative);
2018 Set_Delay_Alternative (N, Delay_Alternative);
2019 return N;
2020 end Make_Timed_Entry_Call;
2022 function Make_Entry_Call_Alternative (Sloc : Source_Ptr;
2023 Entry_Call_Statement : Node_Id;
2024 Statements : List_Id := Empty_List;
2025 Pragmas_Before : List_Id := No_List)
2026 return Node_Id
2028 N : constant Node_Id :=
2029 New_Node (N_Entry_Call_Alternative, Sloc);
2030 begin
2031 Set_Entry_Call_Statement (N, Entry_Call_Statement);
2032 Set_Statements (N, Statements);
2033 Set_Pragmas_Before (N, Pragmas_Before);
2034 return N;
2035 end Make_Entry_Call_Alternative;
2037 function Make_Conditional_Entry_Call (Sloc : Source_Ptr;
2038 Entry_Call_Alternative : Node_Id;
2039 Else_Statements : List_Id)
2040 return Node_Id
2042 N : constant Node_Id :=
2043 New_Node (N_Conditional_Entry_Call, Sloc);
2044 begin
2045 Set_Entry_Call_Alternative (N, Entry_Call_Alternative);
2046 Set_Else_Statements (N, Else_Statements);
2047 return N;
2048 end Make_Conditional_Entry_Call;
2050 function Make_Asynchronous_Select (Sloc : Source_Ptr;
2051 Triggering_Alternative : Node_Id;
2052 Abortable_Part : Node_Id)
2053 return Node_Id
2055 N : constant Node_Id :=
2056 New_Node (N_Asynchronous_Select, Sloc);
2057 begin
2058 Set_Triggering_Alternative (N, Triggering_Alternative);
2059 Set_Abortable_Part (N, Abortable_Part);
2060 return N;
2061 end Make_Asynchronous_Select;
2063 function Make_Triggering_Alternative (Sloc : Source_Ptr;
2064 Triggering_Statement : Node_Id;
2065 Statements : List_Id := Empty_List;
2066 Pragmas_Before : List_Id := No_List)
2067 return Node_Id
2069 N : constant Node_Id :=
2070 New_Node (N_Triggering_Alternative, Sloc);
2071 begin
2072 Set_Triggering_Statement (N, Triggering_Statement);
2073 Set_Statements (N, Statements);
2074 Set_Pragmas_Before (N, Pragmas_Before);
2075 return N;
2076 end Make_Triggering_Alternative;
2078 function Make_Abortable_Part (Sloc : Source_Ptr;
2079 Statements : List_Id)
2080 return Node_Id
2082 N : constant Node_Id :=
2083 New_Node (N_Abortable_Part, Sloc);
2084 begin
2085 Set_Statements (N, Statements);
2086 return N;
2087 end Make_Abortable_Part;
2089 function Make_Abort_Statement (Sloc : Source_Ptr;
2090 Names : List_Id)
2091 return Node_Id
2093 N : constant Node_Id :=
2094 New_Node (N_Abort_Statement, Sloc);
2095 begin
2096 Set_Names (N, Names);
2097 return N;
2098 end Make_Abort_Statement;
2100 function Make_Compilation_Unit (Sloc : Source_Ptr;
2101 Context_Items : List_Id;
2102 Private_Present : Boolean := False;
2103 Unit : Node_Id;
2104 Aux_Decls_Node : Node_Id)
2105 return Node_Id
2107 N : constant Node_Id :=
2108 New_Node (N_Compilation_Unit, Sloc);
2109 begin
2110 Set_Context_Items (N, Context_Items);
2111 Set_Private_Present (N, Private_Present);
2112 Set_Unit (N, Unit);
2113 Set_Aux_Decls_Node (N, Aux_Decls_Node);
2114 return N;
2115 end Make_Compilation_Unit;
2117 function Make_Compilation_Unit_Aux (Sloc : Source_Ptr;
2118 Declarations : List_Id := No_List;
2119 Actions : List_Id := No_List;
2120 Pragmas_After : List_Id := No_List)
2121 return Node_Id
2123 N : constant Node_Id :=
2124 New_Node (N_Compilation_Unit_Aux, Sloc);
2125 begin
2126 Set_Declarations (N, Declarations);
2127 Set_Actions (N, Actions);
2128 Set_Pragmas_After (N, Pragmas_After);
2129 return N;
2130 end Make_Compilation_Unit_Aux;
2132 function Make_With_Clause (Sloc : Source_Ptr;
2133 Name : Node_Id;
2134 First_Name : Boolean := True;
2135 Last_Name : Boolean := True)
2136 return Node_Id
2138 N : constant Node_Id :=
2139 New_Node (N_With_Clause, Sloc);
2140 begin
2141 Set_Name (N, Name);
2142 Set_First_Name (N, First_Name);
2143 Set_Last_Name (N, Last_Name);
2144 return N;
2145 end Make_With_Clause;
2147 function Make_With_Type_Clause (Sloc : Source_Ptr;
2148 Name : Node_Id;
2149 Tagged_Present : Boolean := False)
2150 return Node_Id
2152 N : constant Node_Id :=
2153 New_Node (N_With_Type_Clause, Sloc);
2154 begin
2155 Set_Name (N, Name);
2156 Set_Tagged_Present (N, Tagged_Present);
2157 return N;
2158 end Make_With_Type_Clause;
2160 function Make_Subprogram_Body_Stub (Sloc : Source_Ptr;
2161 Specification : Node_Id)
2162 return Node_Id
2164 N : constant Node_Id :=
2165 New_Node (N_Subprogram_Body_Stub, Sloc);
2166 begin
2167 Set_Specification (N, Specification);
2168 return N;
2169 end Make_Subprogram_Body_Stub;
2171 function Make_Package_Body_Stub (Sloc : Source_Ptr;
2172 Defining_Identifier : Node_Id)
2173 return Node_Id
2175 N : constant Node_Id :=
2176 New_Node (N_Package_Body_Stub, Sloc);
2177 begin
2178 Set_Defining_Identifier (N, Defining_Identifier);
2179 return N;
2180 end Make_Package_Body_Stub;
2182 function Make_Task_Body_Stub (Sloc : Source_Ptr;
2183 Defining_Identifier : Node_Id)
2184 return Node_Id
2186 N : constant Node_Id :=
2187 New_Node (N_Task_Body_Stub, Sloc);
2188 begin
2189 Set_Defining_Identifier (N, Defining_Identifier);
2190 return N;
2191 end Make_Task_Body_Stub;
2193 function Make_Protected_Body_Stub (Sloc : Source_Ptr;
2194 Defining_Identifier : Node_Id)
2195 return Node_Id
2197 N : constant Node_Id :=
2198 New_Node (N_Protected_Body_Stub, Sloc);
2199 begin
2200 Set_Defining_Identifier (N, Defining_Identifier);
2201 return N;
2202 end Make_Protected_Body_Stub;
2204 function Make_Subunit (Sloc : Source_Ptr;
2205 Name : Node_Id;
2206 Proper_Body : Node_Id)
2207 return Node_Id
2209 N : constant Node_Id :=
2210 New_Node (N_Subunit, Sloc);
2211 begin
2212 Set_Name (N, Name);
2213 Set_Proper_Body (N, Proper_Body);
2214 return N;
2215 end Make_Subunit;
2217 function Make_Exception_Declaration (Sloc : Source_Ptr;
2218 Defining_Identifier : Node_Id)
2219 return Node_Id
2221 N : constant Node_Id :=
2222 New_Node (N_Exception_Declaration, Sloc);
2223 begin
2224 Set_Defining_Identifier (N, Defining_Identifier);
2225 return N;
2226 end Make_Exception_Declaration;
2228 function Make_Handled_Sequence_Of_Statements (Sloc : Source_Ptr;
2229 Statements : List_Id;
2230 End_Label : Node_Id := Empty;
2231 Exception_Handlers : List_Id := No_List;
2232 At_End_Proc : Node_Id := Empty)
2233 return Node_Id
2235 N : constant Node_Id :=
2236 New_Node (N_Handled_Sequence_Of_Statements, Sloc);
2237 begin
2238 Set_Statements (N, Statements);
2239 Set_End_Label (N, End_Label);
2240 Set_Exception_Handlers (N, Exception_Handlers);
2241 Set_At_End_Proc (N, At_End_Proc);
2242 return N;
2243 end Make_Handled_Sequence_Of_Statements;
2245 function Make_Exception_Handler (Sloc : Source_Ptr;
2246 Choice_Parameter : Node_Id := Empty;
2247 Exception_Choices : List_Id;
2248 Statements : List_Id)
2249 return Node_Id
2251 N : constant Node_Id :=
2252 New_Node (N_Exception_Handler, Sloc);
2253 begin
2254 Set_Choice_Parameter (N, Choice_Parameter);
2255 Set_Exception_Choices (N, Exception_Choices);
2256 Set_Statements (N, Statements);
2257 return N;
2258 end Make_Exception_Handler;
2260 function Make_Raise_Statement (Sloc : Source_Ptr;
2261 Name : Node_Id := Empty)
2262 return Node_Id
2264 N : constant Node_Id :=
2265 New_Node (N_Raise_Statement, Sloc);
2266 begin
2267 Set_Name (N, Name);
2268 return N;
2269 end Make_Raise_Statement;
2271 function Make_Generic_Subprogram_Declaration (Sloc : Source_Ptr;
2272 Specification : Node_Id;
2273 Generic_Formal_Declarations : List_Id)
2274 return Node_Id
2276 N : constant Node_Id :=
2277 New_Node (N_Generic_Subprogram_Declaration, Sloc);
2278 begin
2279 Set_Specification (N, Specification);
2280 Set_Generic_Formal_Declarations (N, Generic_Formal_Declarations);
2281 return N;
2282 end Make_Generic_Subprogram_Declaration;
2284 function Make_Generic_Package_Declaration (Sloc : Source_Ptr;
2285 Specification : Node_Id;
2286 Generic_Formal_Declarations : List_Id)
2287 return Node_Id
2289 N : constant Node_Id :=
2290 New_Node (N_Generic_Package_Declaration, Sloc);
2291 begin
2292 Set_Specification (N, Specification);
2293 Set_Generic_Formal_Declarations (N, Generic_Formal_Declarations);
2294 return N;
2295 end Make_Generic_Package_Declaration;
2297 function Make_Package_Instantiation (Sloc : Source_Ptr;
2298 Defining_Unit_Name : Node_Id;
2299 Name : Node_Id;
2300 Generic_Associations : List_Id := No_List)
2301 return Node_Id
2303 N : constant Node_Id :=
2304 New_Node (N_Package_Instantiation, Sloc);
2305 begin
2306 Set_Defining_Unit_Name (N, Defining_Unit_Name);
2307 Set_Name (N, Name);
2308 Set_Generic_Associations (N, Generic_Associations);
2309 return N;
2310 end Make_Package_Instantiation;
2312 function Make_Procedure_Instantiation (Sloc : Source_Ptr;
2313 Defining_Unit_Name : Node_Id;
2314 Name : Node_Id;
2315 Generic_Associations : List_Id := No_List)
2316 return Node_Id
2318 N : constant Node_Id :=
2319 New_Node (N_Procedure_Instantiation, Sloc);
2320 begin
2321 Set_Defining_Unit_Name (N, Defining_Unit_Name);
2322 Set_Name (N, Name);
2323 Set_Generic_Associations (N, Generic_Associations);
2324 return N;
2325 end Make_Procedure_Instantiation;
2327 function Make_Function_Instantiation (Sloc : Source_Ptr;
2328 Defining_Unit_Name : Node_Id;
2329 Name : Node_Id;
2330 Generic_Associations : List_Id := No_List)
2331 return Node_Id
2333 N : constant Node_Id :=
2334 New_Node (N_Function_Instantiation, Sloc);
2335 begin
2336 Set_Defining_Unit_Name (N, Defining_Unit_Name);
2337 Set_Name (N, Name);
2338 Set_Generic_Associations (N, Generic_Associations);
2339 return N;
2340 end Make_Function_Instantiation;
2342 function Make_Generic_Association (Sloc : Source_Ptr;
2343 Selector_Name : Node_Id := Empty;
2344 Explicit_Generic_Actual_Parameter : Node_Id)
2345 return Node_Id
2347 N : constant Node_Id :=
2348 New_Node (N_Generic_Association, Sloc);
2349 begin
2350 Set_Selector_Name (N, Selector_Name);
2351 Set_Explicit_Generic_Actual_Parameter
2352 (N, Explicit_Generic_Actual_Parameter);
2353 return N;
2354 end Make_Generic_Association;
2356 function Make_Formal_Object_Declaration (Sloc : Source_Ptr;
2357 Defining_Identifier : Node_Id;
2358 In_Present : Boolean := False;
2359 Out_Present : Boolean := False;
2360 Subtype_Mark : Node_Id;
2361 Expression : Node_Id := Empty)
2362 return Node_Id
2364 N : constant Node_Id :=
2365 New_Node (N_Formal_Object_Declaration, Sloc);
2366 begin
2367 Set_Defining_Identifier (N, Defining_Identifier);
2368 Set_In_Present (N, In_Present);
2369 Set_Out_Present (N, Out_Present);
2370 Set_Subtype_Mark (N, Subtype_Mark);
2371 Set_Expression (N, Expression);
2372 return N;
2373 end Make_Formal_Object_Declaration;
2375 function Make_Formal_Type_Declaration (Sloc : Source_Ptr;
2376 Defining_Identifier : Node_Id;
2377 Formal_Type_Definition : Node_Id;
2378 Discriminant_Specifications : List_Id := No_List;
2379 Unknown_Discriminants_Present : Boolean := False)
2380 return Node_Id
2382 N : constant Node_Id :=
2383 New_Node (N_Formal_Type_Declaration, Sloc);
2384 begin
2385 Set_Defining_Identifier (N, Defining_Identifier);
2386 Set_Formal_Type_Definition (N, Formal_Type_Definition);
2387 Set_Discriminant_Specifications (N, Discriminant_Specifications);
2388 Set_Unknown_Discriminants_Present
2389 (N, Unknown_Discriminants_Present);
2390 return N;
2391 end Make_Formal_Type_Declaration;
2393 function Make_Formal_Private_Type_Definition (Sloc : Source_Ptr;
2394 Abstract_Present : Boolean := False;
2395 Tagged_Present : Boolean := False;
2396 Limited_Present : Boolean := False)
2397 return Node_Id
2399 N : constant Node_Id :=
2400 New_Node (N_Formal_Private_Type_Definition, Sloc);
2401 begin
2402 Set_Abstract_Present (N, Abstract_Present);
2403 Set_Tagged_Present (N, Tagged_Present);
2404 Set_Limited_Present (N, Limited_Present);
2405 return N;
2406 end Make_Formal_Private_Type_Definition;
2408 function Make_Formal_Derived_Type_Definition (Sloc : Source_Ptr;
2409 Subtype_Mark : Node_Id;
2410 Private_Present : Boolean := False;
2411 Abstract_Present : Boolean := False)
2412 return Node_Id
2414 N : constant Node_Id :=
2415 New_Node (N_Formal_Derived_Type_Definition, Sloc);
2416 begin
2417 Set_Subtype_Mark (N, Subtype_Mark);
2418 Set_Private_Present (N, Private_Present);
2419 Set_Abstract_Present (N, Abstract_Present);
2420 return N;
2421 end Make_Formal_Derived_Type_Definition;
2423 function Make_Formal_Discrete_Type_Definition (Sloc : Source_Ptr)
2424 return Node_Id
2426 N : constant Node_Id :=
2427 New_Node (N_Formal_Discrete_Type_Definition, Sloc);
2428 begin
2429 return N;
2430 end Make_Formal_Discrete_Type_Definition;
2432 function Make_Formal_Signed_Integer_Type_Definition (Sloc : Source_Ptr)
2433 return Node_Id
2435 N : constant Node_Id :=
2436 New_Node (N_Formal_Signed_Integer_Type_Definition, Sloc);
2437 begin
2438 return N;
2439 end Make_Formal_Signed_Integer_Type_Definition;
2441 function Make_Formal_Modular_Type_Definition (Sloc : Source_Ptr)
2442 return Node_Id
2444 N : constant Node_Id :=
2445 New_Node (N_Formal_Modular_Type_Definition, Sloc);
2446 begin
2447 return N;
2448 end Make_Formal_Modular_Type_Definition;
2450 function Make_Formal_Floating_Point_Definition (Sloc : Source_Ptr)
2451 return Node_Id
2453 N : constant Node_Id :=
2454 New_Node (N_Formal_Floating_Point_Definition, Sloc);
2455 begin
2456 return N;
2457 end Make_Formal_Floating_Point_Definition;
2459 function Make_Formal_Ordinary_Fixed_Point_Definition (Sloc : Source_Ptr)
2460 return Node_Id
2462 N : constant Node_Id :=
2463 New_Node (N_Formal_Ordinary_Fixed_Point_Definition, Sloc);
2464 begin
2465 return N;
2466 end Make_Formal_Ordinary_Fixed_Point_Definition;
2468 function Make_Formal_Decimal_Fixed_Point_Definition (Sloc : Source_Ptr)
2469 return Node_Id
2471 N : constant Node_Id :=
2472 New_Node (N_Formal_Decimal_Fixed_Point_Definition, Sloc);
2473 begin
2474 return N;
2475 end Make_Formal_Decimal_Fixed_Point_Definition;
2477 function Make_Formal_Subprogram_Declaration (Sloc : Source_Ptr;
2478 Specification : Node_Id;
2479 Default_Name : Node_Id := Empty;
2480 Box_Present : Boolean := False)
2481 return Node_Id
2483 N : constant Node_Id :=
2484 New_Node (N_Formal_Subprogram_Declaration, Sloc);
2485 begin
2486 Set_Specification (N, Specification);
2487 Set_Default_Name (N, Default_Name);
2488 Set_Box_Present (N, Box_Present);
2489 return N;
2490 end Make_Formal_Subprogram_Declaration;
2492 function Make_Formal_Package_Declaration (Sloc : Source_Ptr;
2493 Defining_Identifier : Node_Id;
2494 Name : Node_Id;
2495 Generic_Associations : List_Id := No_List;
2496 Box_Present : Boolean := False)
2497 return Node_Id
2499 N : constant Node_Id :=
2500 New_Node (N_Formal_Package_Declaration, Sloc);
2501 begin
2502 Set_Defining_Identifier (N, Defining_Identifier);
2503 Set_Name (N, Name);
2504 Set_Generic_Associations (N, Generic_Associations);
2505 Set_Box_Present (N, Box_Present);
2506 return N;
2507 end Make_Formal_Package_Declaration;
2509 function Make_Attribute_Definition_Clause (Sloc : Source_Ptr;
2510 Name : Node_Id;
2511 Chars : Name_Id;
2512 Expression : Node_Id)
2513 return Node_Id
2515 N : constant Node_Id :=
2516 New_Node (N_Attribute_Definition_Clause, Sloc);
2517 begin
2518 Set_Name (N, Name);
2519 Set_Chars (N, Chars);
2520 Set_Expression (N, Expression);
2521 return N;
2522 end Make_Attribute_Definition_Clause;
2524 function Make_Enumeration_Representation_Clause (Sloc : Source_Ptr;
2525 Identifier : Node_Id;
2526 Array_Aggregate : Node_Id)
2527 return Node_Id
2529 N : constant Node_Id :=
2530 New_Node (N_Enumeration_Representation_Clause, Sloc);
2531 begin
2532 Set_Identifier (N, Identifier);
2533 Set_Array_Aggregate (N, Array_Aggregate);
2534 return N;
2535 end Make_Enumeration_Representation_Clause;
2537 function Make_Record_Representation_Clause (Sloc : Source_Ptr;
2538 Identifier : Node_Id;
2539 Mod_Clause : Node_Id := Empty;
2540 Component_Clauses : List_Id)
2541 return Node_Id
2543 N : constant Node_Id :=
2544 New_Node (N_Record_Representation_Clause, Sloc);
2545 begin
2546 Set_Identifier (N, Identifier);
2547 Set_Mod_Clause (N, Mod_Clause);
2548 Set_Component_Clauses (N, Component_Clauses);
2549 return N;
2550 end Make_Record_Representation_Clause;
2552 function Make_Component_Clause (Sloc : Source_Ptr;
2553 Component_Name : Node_Id;
2554 Position : Node_Id;
2555 First_Bit : Node_Id;
2556 Last_Bit : Node_Id)
2557 return Node_Id
2559 N : constant Node_Id :=
2560 New_Node (N_Component_Clause, Sloc);
2561 begin
2562 Set_Component_Name (N, Component_Name);
2563 Set_Position (N, Position);
2564 Set_First_Bit (N, First_Bit);
2565 Set_Last_Bit (N, Last_Bit);
2566 return N;
2567 end Make_Component_Clause;
2569 function Make_Code_Statement (Sloc : Source_Ptr;
2570 Expression : Node_Id)
2571 return Node_Id
2573 N : constant Node_Id :=
2574 New_Node (N_Code_Statement, Sloc);
2575 begin
2576 Set_Expression (N, Expression);
2577 return N;
2578 end Make_Code_Statement;
2580 function Make_Op_Rotate_Left (Sloc : Source_Ptr;
2581 Left_Opnd : Node_Id;
2582 Right_Opnd : Node_Id)
2583 return Node_Id
2585 N : constant Node_Id :=
2586 New_Node (N_Op_Rotate_Left, Sloc);
2587 begin
2588 Set_Left_Opnd (N, Left_Opnd);
2589 Set_Right_Opnd (N, Right_Opnd);
2590 Set_Chars (N, Name_Rotate_Left);
2591 Set_Entity (N, Standard_Op_Rotate_Left);
2592 return N;
2593 end Make_Op_Rotate_Left;
2595 function Make_Op_Rotate_Right (Sloc : Source_Ptr;
2596 Left_Opnd : Node_Id;
2597 Right_Opnd : Node_Id)
2598 return Node_Id
2600 N : constant Node_Id :=
2601 New_Node (N_Op_Rotate_Right, Sloc);
2602 begin
2603 Set_Left_Opnd (N, Left_Opnd);
2604 Set_Right_Opnd (N, Right_Opnd);
2605 Set_Chars (N, Name_Rotate_Right);
2606 Set_Entity (N, Standard_Op_Rotate_Right);
2607 return N;
2608 end Make_Op_Rotate_Right;
2610 function Make_Op_Shift_Left (Sloc : Source_Ptr;
2611 Left_Opnd : Node_Id;
2612 Right_Opnd : Node_Id)
2613 return Node_Id
2615 N : constant Node_Id :=
2616 New_Node (N_Op_Shift_Left, Sloc);
2617 begin
2618 Set_Left_Opnd (N, Left_Opnd);
2619 Set_Right_Opnd (N, Right_Opnd);
2620 Set_Chars (N, Name_Shift_Left);
2621 Set_Entity (N, Standard_Op_Shift_Left);
2622 return N;
2623 end Make_Op_Shift_Left;
2625 function Make_Op_Shift_Right_Arithmetic (Sloc : Source_Ptr;
2626 Left_Opnd : Node_Id;
2627 Right_Opnd : Node_Id)
2628 return Node_Id
2630 N : constant Node_Id :=
2631 New_Node (N_Op_Shift_Right_Arithmetic, Sloc);
2632 begin
2633 Set_Left_Opnd (N, Left_Opnd);
2634 Set_Right_Opnd (N, Right_Opnd);
2635 Set_Chars (N, Name_Shift_Right_Arithmetic);
2636 Set_Entity (N, Standard_Op_Shift_Right_Arithmetic);
2637 return N;
2638 end Make_Op_Shift_Right_Arithmetic;
2640 function Make_Op_Shift_Right (Sloc : Source_Ptr;
2641 Left_Opnd : Node_Id;
2642 Right_Opnd : Node_Id)
2643 return Node_Id
2645 N : constant Node_Id :=
2646 New_Node (N_Op_Shift_Right, Sloc);
2647 begin
2648 Set_Left_Opnd (N, Left_Opnd);
2649 Set_Right_Opnd (N, Right_Opnd);
2650 Set_Chars (N, Name_Shift_Right);
2651 Set_Entity (N, Standard_Op_Shift_Right);
2652 return N;
2653 end Make_Op_Shift_Right;
2655 function Make_Delta_Constraint (Sloc : Source_Ptr;
2656 Delta_Expression : Node_Id;
2657 Range_Constraint : Node_Id := Empty)
2658 return Node_Id
2660 N : constant Node_Id :=
2661 New_Node (N_Delta_Constraint, Sloc);
2662 begin
2663 Set_Delta_Expression (N, Delta_Expression);
2664 Set_Range_Constraint (N, Range_Constraint);
2665 return N;
2666 end Make_Delta_Constraint;
2668 function Make_At_Clause (Sloc : Source_Ptr;
2669 Identifier : Node_Id;
2670 Expression : Node_Id)
2671 return Node_Id
2673 N : constant Node_Id :=
2674 New_Node (N_At_Clause, Sloc);
2675 begin
2676 Set_Identifier (N, Identifier);
2677 Set_Expression (N, Expression);
2678 return N;
2679 end Make_At_Clause;
2681 function Make_Mod_Clause (Sloc : Source_Ptr;
2682 Expression : Node_Id;
2683 Pragmas_Before : List_Id)
2684 return Node_Id
2686 N : constant Node_Id :=
2687 New_Node (N_Mod_Clause, Sloc);
2688 begin
2689 Set_Expression (N, Expression);
2690 Set_Pragmas_Before (N, Pragmas_Before);
2691 return N;
2692 end Make_Mod_Clause;
2694 function Make_Conditional_Expression (Sloc : Source_Ptr;
2695 Expressions : List_Id)
2696 return Node_Id
2698 N : constant Node_Id :=
2699 New_Node (N_Conditional_Expression, Sloc);
2700 begin
2701 Set_Expressions (N, Expressions);
2702 return N;
2703 end Make_Conditional_Expression;
2705 function Make_Expanded_Name (Sloc : Source_Ptr;
2706 Chars : Name_Id;
2707 Prefix : Node_Id;
2708 Selector_Name : Node_Id)
2709 return Node_Id
2711 N : constant Node_Id :=
2712 New_Node (N_Expanded_Name, Sloc);
2713 begin
2714 Set_Chars (N, Chars);
2715 Set_Prefix (N, Prefix);
2716 Set_Selector_Name (N, Selector_Name);
2717 return N;
2718 end Make_Expanded_Name;
2720 function Make_Free_Statement (Sloc : Source_Ptr;
2721 Expression : Node_Id)
2722 return Node_Id
2724 N : constant Node_Id :=
2725 New_Node (N_Free_Statement, Sloc);
2726 begin
2727 Set_Expression (N, Expression);
2728 return N;
2729 end Make_Free_Statement;
2731 function Make_Freeze_Entity (Sloc : Source_Ptr;
2732 Actions : List_Id := No_List)
2733 return Node_Id
2735 N : constant Node_Id :=
2736 New_Node (N_Freeze_Entity, Sloc);
2737 begin
2738 Set_Actions (N, Actions);
2739 return N;
2740 end Make_Freeze_Entity;
2742 function Make_Implicit_Label_Declaration (Sloc : Source_Ptr;
2743 Defining_Identifier : Node_Id)
2744 return Node_Id
2746 N : constant Node_Id :=
2747 New_Node (N_Implicit_Label_Declaration, Sloc);
2748 begin
2749 Set_Defining_Identifier (N, Defining_Identifier);
2750 return N;
2751 end Make_Implicit_Label_Declaration;
2753 function Make_Itype_Reference (Sloc : Source_Ptr)
2754 return Node_Id
2756 N : constant Node_Id :=
2757 New_Node (N_Itype_Reference, Sloc);
2758 begin
2759 return N;
2760 end Make_Itype_Reference;
2762 function Make_Raise_Constraint_Error (Sloc : Source_Ptr;
2763 Condition : Node_Id := Empty;
2764 Reason : Uint)
2765 return Node_Id
2767 N : constant Node_Id :=
2768 New_Node (N_Raise_Constraint_Error, Sloc);
2769 begin
2770 Set_Condition (N, Condition);
2771 Set_Reason (N, Reason);
2772 return N;
2773 end Make_Raise_Constraint_Error;
2775 function Make_Raise_Program_Error (Sloc : Source_Ptr;
2776 Condition : Node_Id := Empty;
2777 Reason : Uint)
2778 return Node_Id
2780 N : constant Node_Id :=
2781 New_Node (N_Raise_Program_Error, Sloc);
2782 begin
2783 Set_Condition (N, Condition);
2784 Set_Reason (N, Reason);
2785 return N;
2786 end Make_Raise_Program_Error;
2788 function Make_Raise_Storage_Error (Sloc : Source_Ptr;
2789 Condition : Node_Id := Empty;
2790 Reason : Uint)
2791 return Node_Id
2793 N : constant Node_Id :=
2794 New_Node (N_Raise_Storage_Error, Sloc);
2795 begin
2796 Set_Condition (N, Condition);
2797 Set_Reason (N, Reason);
2798 return N;
2799 end Make_Raise_Storage_Error;
2801 function Make_Reference (Sloc : Source_Ptr;
2802 Prefix : Node_Id)
2803 return Node_Id
2805 N : constant Node_Id :=
2806 New_Node (N_Reference, Sloc);
2807 begin
2808 Set_Prefix (N, Prefix);
2809 return N;
2810 end Make_Reference;
2812 function Make_Subprogram_Info (Sloc : Source_Ptr;
2813 Identifier : Node_Id)
2814 return Node_Id
2816 N : constant Node_Id :=
2817 New_Node (N_Subprogram_Info, Sloc);
2818 begin
2819 Set_Identifier (N, Identifier);
2820 return N;
2821 end Make_Subprogram_Info;
2823 function Make_Unchecked_Expression (Sloc : Source_Ptr;
2824 Expression : Node_Id)
2825 return Node_Id
2827 N : constant Node_Id :=
2828 New_Node (N_Unchecked_Expression, Sloc);
2829 begin
2830 Set_Expression (N, Expression);
2831 return N;
2832 end Make_Unchecked_Expression;
2834 function Make_Unchecked_Type_Conversion (Sloc : Source_Ptr;
2835 Subtype_Mark : Node_Id;
2836 Expression : Node_Id)
2837 return Node_Id
2839 N : constant Node_Id :=
2840 New_Node (N_Unchecked_Type_Conversion, Sloc);
2841 begin
2842 Set_Subtype_Mark (N, Subtype_Mark);
2843 Set_Expression (N, Expression);
2844 return N;
2845 end Make_Unchecked_Type_Conversion;
2847 function Make_Validate_Unchecked_Conversion (Sloc : Source_Ptr)
2848 return Node_Id
2850 N : constant Node_Id :=
2851 New_Node (N_Validate_Unchecked_Conversion, Sloc);
2852 begin
2853 return N;
2854 end Make_Validate_Unchecked_Conversion;
2856 end Nmake;