2003-11-27 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / ada / nmake.adb
bloba873763de688346bfd474d09cf22476228efb671
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- N M A K E --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
10 -- --
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 2, 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 COPYING. If not, write --
19 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
20 -- MA 02111-1307, USA. --
21 -- --
22 -- GNAT was originally developed by the GNAT team at New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 -- --
25 ------------------------------------------------------------------------------
27 pragma Style_Checks (All_Checks);
28 -- Turn off subprogram order checking, since the routines here are
29 -- generated automatically in order.
32 with Atree; use Atree;
33 with Sinfo; use Sinfo;
34 with Snames; use Snames;
35 with Stand; use Stand;
37 package body Nmake is
39 function Make_Unused_At_Start (Sloc : Source_Ptr)
40 return Node_Id
42 N : constant Node_Id :=
43 New_Node (N_Unused_At_Start, Sloc);
44 begin
45 return N;
46 end Make_Unused_At_Start;
48 function Make_Unused_At_End (Sloc : Source_Ptr)
49 return Node_Id
51 N : constant Node_Id :=
52 New_Node (N_Unused_At_End, Sloc);
53 begin
54 return N;
55 end Make_Unused_At_End;
57 function Make_Identifier (Sloc : Source_Ptr;
58 Chars : Name_Id)
59 return Node_Id
61 N : constant Node_Id :=
62 New_Node (N_Identifier, Sloc);
63 begin
64 Set_Chars (N, Chars);
65 return N;
66 end Make_Identifier;
68 function Make_Integer_Literal (Sloc : Source_Ptr;
69 Intval : Uint)
70 return Node_Id
72 N : constant Node_Id :=
73 New_Node (N_Integer_Literal, Sloc);
74 begin
75 Set_Intval (N, Intval);
76 return N;
77 end Make_Integer_Literal;
79 function Make_Real_Literal (Sloc : Source_Ptr;
80 Realval : Ureal)
81 return Node_Id
83 N : constant Node_Id :=
84 New_Node (N_Real_Literal, Sloc);
85 begin
86 Set_Realval (N, Realval);
87 return N;
88 end Make_Real_Literal;
90 function Make_Character_Literal (Sloc : Source_Ptr;
91 Chars : Name_Id;
92 Char_Literal_Value : Char_Code)
93 return Node_Id
95 N : constant Node_Id :=
96 New_Node (N_Character_Literal, Sloc);
97 begin
98 Set_Chars (N, Chars);
99 Set_Char_Literal_Value (N, Char_Literal_Value);
100 return N;
101 end Make_Character_Literal;
103 function Make_String_Literal (Sloc : Source_Ptr;
104 Strval : String_Id)
105 return Node_Id
107 N : constant Node_Id :=
108 New_Node (N_String_Literal, Sloc);
109 begin
110 Set_Strval (N, Strval);
111 return N;
112 end Make_String_Literal;
114 function Make_Pragma (Sloc : Source_Ptr;
115 Chars : Name_Id;
116 Pragma_Argument_Associations : List_Id := No_List;
117 Debug_Statement : Node_Id := Empty)
118 return Node_Id
120 N : constant Node_Id :=
121 New_Node (N_Pragma, Sloc);
122 begin
123 Set_Chars (N, Chars);
124 Set_Pragma_Argument_Associations
125 (N, Pragma_Argument_Associations);
126 Set_Debug_Statement (N, Debug_Statement);
127 return N;
128 end Make_Pragma;
130 function Make_Pragma_Argument_Association (Sloc : Source_Ptr;
131 Chars : Name_Id := No_Name;
132 Expression : Node_Id)
133 return Node_Id
135 N : constant Node_Id :=
136 New_Node (N_Pragma_Argument_Association, Sloc);
137 begin
138 Set_Chars (N, Chars);
139 Set_Expression (N, Expression);
140 return N;
141 end Make_Pragma_Argument_Association;
143 function Make_Defining_Identifier (Sloc : Source_Ptr;
144 Chars : Name_Id)
145 return Node_Id
147 N : constant Node_Id :=
148 New_Entity (N_Defining_Identifier, Sloc);
149 begin
150 Set_Chars (N, Chars);
151 return N;
152 end Make_Defining_Identifier;
154 function Make_Full_Type_Declaration (Sloc : Source_Ptr;
155 Defining_Identifier : Node_Id;
156 Discriminant_Specifications : List_Id := No_List;
157 Type_Definition : Node_Id)
158 return Node_Id
160 N : constant Node_Id :=
161 New_Node (N_Full_Type_Declaration, Sloc);
162 begin
163 Set_Defining_Identifier (N, Defining_Identifier);
164 Set_Discriminant_Specifications (N, Discriminant_Specifications);
165 Set_Type_Definition (N, Type_Definition);
166 return N;
167 end Make_Full_Type_Declaration;
169 function Make_Subtype_Declaration (Sloc : Source_Ptr;
170 Defining_Identifier : Node_Id;
171 Subtype_Indication : Node_Id)
172 return Node_Id
174 N : constant Node_Id :=
175 New_Node (N_Subtype_Declaration, Sloc);
176 begin
177 Set_Defining_Identifier (N, Defining_Identifier);
178 Set_Subtype_Indication (N, Subtype_Indication);
179 return N;
180 end Make_Subtype_Declaration;
182 function Make_Subtype_Indication (Sloc : Source_Ptr;
183 Subtype_Mark : Node_Id;
184 Constraint : Node_Id)
185 return Node_Id
187 N : constant Node_Id :=
188 New_Node (N_Subtype_Indication, Sloc);
189 begin
190 Set_Subtype_Mark (N, Subtype_Mark);
191 Set_Constraint (N, Constraint);
192 return N;
193 end Make_Subtype_Indication;
195 function Make_Object_Declaration (Sloc : Source_Ptr;
196 Defining_Identifier : Node_Id;
197 Aliased_Present : Boolean := False;
198 Constant_Present : Boolean := False;
199 Object_Definition : Node_Id;
200 Expression : Node_Id := Empty)
201 return Node_Id
203 N : constant Node_Id :=
204 New_Node (N_Object_Declaration, Sloc);
205 begin
206 Set_Defining_Identifier (N, Defining_Identifier);
207 Set_Aliased_Present (N, Aliased_Present);
208 Set_Constant_Present (N, Constant_Present);
209 Set_Object_Definition (N, Object_Definition);
210 Set_Expression (N, Expression);
211 return N;
212 end Make_Object_Declaration;
214 function Make_Number_Declaration (Sloc : Source_Ptr;
215 Defining_Identifier : Node_Id;
216 Expression : Node_Id)
217 return Node_Id
219 N : constant Node_Id :=
220 New_Node (N_Number_Declaration, Sloc);
221 begin
222 Set_Defining_Identifier (N, Defining_Identifier);
223 Set_Expression (N, Expression);
224 return N;
225 end Make_Number_Declaration;
227 function Make_Derived_Type_Definition (Sloc : Source_Ptr;
228 Abstract_Present : Boolean := False;
229 Subtype_Indication : Node_Id;
230 Record_Extension_Part : Node_Id := Empty)
231 return Node_Id
233 N : constant Node_Id :=
234 New_Node (N_Derived_Type_Definition, Sloc);
235 begin
236 Set_Abstract_Present (N, Abstract_Present);
237 Set_Subtype_Indication (N, Subtype_Indication);
238 Set_Record_Extension_Part (N, Record_Extension_Part);
239 return N;
240 end Make_Derived_Type_Definition;
242 function Make_Range_Constraint (Sloc : Source_Ptr;
243 Range_Expression : Node_Id)
244 return Node_Id
246 N : constant Node_Id :=
247 New_Node (N_Range_Constraint, Sloc);
248 begin
249 Set_Range_Expression (N, Range_Expression);
250 return N;
251 end Make_Range_Constraint;
253 function Make_Range (Sloc : Source_Ptr;
254 Low_Bound : Node_Id;
255 High_Bound : Node_Id;
256 Includes_Infinities : Boolean := False)
257 return Node_Id
259 N : constant Node_Id :=
260 New_Node (N_Range, Sloc);
261 begin
262 Set_Low_Bound (N, Low_Bound);
263 Set_High_Bound (N, High_Bound);
264 Set_Includes_Infinities (N, Includes_Infinities);
265 return N;
266 end Make_Range;
268 function Make_Enumeration_Type_Definition (Sloc : Source_Ptr;
269 Literals : List_Id;
270 End_Label : Node_Id := Empty)
271 return Node_Id
273 N : constant Node_Id :=
274 New_Node (N_Enumeration_Type_Definition, Sloc);
275 begin
276 Set_Literals (N, Literals);
277 Set_End_Label (N, End_Label);
278 return N;
279 end Make_Enumeration_Type_Definition;
281 function Make_Defining_Character_Literal (Sloc : Source_Ptr;
282 Chars : Name_Id)
283 return Node_Id
285 N : constant Node_Id :=
286 New_Entity (N_Defining_Character_Literal, Sloc);
287 begin
288 Set_Chars (N, Chars);
289 return N;
290 end Make_Defining_Character_Literal;
292 function Make_Signed_Integer_Type_Definition (Sloc : Source_Ptr;
293 Low_Bound : Node_Id;
294 High_Bound : Node_Id)
295 return Node_Id
297 N : constant Node_Id :=
298 New_Node (N_Signed_Integer_Type_Definition, Sloc);
299 begin
300 Set_Low_Bound (N, Low_Bound);
301 Set_High_Bound (N, High_Bound);
302 return N;
303 end Make_Signed_Integer_Type_Definition;
305 function Make_Modular_Type_Definition (Sloc : Source_Ptr;
306 Expression : Node_Id)
307 return Node_Id
309 N : constant Node_Id :=
310 New_Node (N_Modular_Type_Definition, Sloc);
311 begin
312 Set_Expression (N, Expression);
313 return N;
314 end Make_Modular_Type_Definition;
316 function Make_Floating_Point_Definition (Sloc : Source_Ptr;
317 Digits_Expression : Node_Id;
318 Real_Range_Specification : Node_Id := Empty)
319 return Node_Id
321 N : constant Node_Id :=
322 New_Node (N_Floating_Point_Definition, Sloc);
323 begin
324 Set_Digits_Expression (N, Digits_Expression);
325 Set_Real_Range_Specification (N, Real_Range_Specification);
326 return N;
327 end Make_Floating_Point_Definition;
329 function Make_Real_Range_Specification (Sloc : Source_Ptr;
330 Low_Bound : Node_Id;
331 High_Bound : Node_Id)
332 return Node_Id
334 N : constant Node_Id :=
335 New_Node (N_Real_Range_Specification, Sloc);
336 begin
337 Set_Low_Bound (N, Low_Bound);
338 Set_High_Bound (N, High_Bound);
339 return N;
340 end Make_Real_Range_Specification;
342 function Make_Ordinary_Fixed_Point_Definition (Sloc : Source_Ptr;
343 Delta_Expression : Node_Id;
344 Real_Range_Specification : Node_Id)
345 return Node_Id
347 N : constant Node_Id :=
348 New_Node (N_Ordinary_Fixed_Point_Definition, Sloc);
349 begin
350 Set_Delta_Expression (N, Delta_Expression);
351 Set_Real_Range_Specification (N, Real_Range_Specification);
352 return N;
353 end Make_Ordinary_Fixed_Point_Definition;
355 function Make_Decimal_Fixed_Point_Definition (Sloc : Source_Ptr;
356 Delta_Expression : Node_Id;
357 Digits_Expression : Node_Id;
358 Real_Range_Specification : Node_Id := Empty)
359 return Node_Id
361 N : constant Node_Id :=
362 New_Node (N_Decimal_Fixed_Point_Definition, Sloc);
363 begin
364 Set_Delta_Expression (N, Delta_Expression);
365 Set_Digits_Expression (N, Digits_Expression);
366 Set_Real_Range_Specification (N, Real_Range_Specification);
367 return N;
368 end Make_Decimal_Fixed_Point_Definition;
370 function Make_Digits_Constraint (Sloc : Source_Ptr;
371 Digits_Expression : Node_Id;
372 Range_Constraint : Node_Id := Empty)
373 return Node_Id
375 N : constant Node_Id :=
376 New_Node (N_Digits_Constraint, Sloc);
377 begin
378 Set_Digits_Expression (N, Digits_Expression);
379 Set_Range_Constraint (N, Range_Constraint);
380 return N;
381 end Make_Digits_Constraint;
383 function Make_Unconstrained_Array_Definition (Sloc : Source_Ptr;
384 Subtype_Marks : List_Id;
385 Aliased_Present : Boolean := False;
386 Subtype_Indication : Node_Id)
387 return Node_Id
389 N : constant Node_Id :=
390 New_Node (N_Unconstrained_Array_Definition, Sloc);
391 begin
392 Set_Subtype_Marks (N, Subtype_Marks);
393 Set_Aliased_Present (N, Aliased_Present);
394 Set_Subtype_Indication (N, Subtype_Indication);
395 return N;
396 end Make_Unconstrained_Array_Definition;
398 function Make_Constrained_Array_Definition (Sloc : Source_Ptr;
399 Discrete_Subtype_Definitions : List_Id;
400 Aliased_Present : Boolean := False;
401 Subtype_Indication : Node_Id)
402 return Node_Id
404 N : constant Node_Id :=
405 New_Node (N_Constrained_Array_Definition, Sloc);
406 begin
407 Set_Discrete_Subtype_Definitions
408 (N, Discrete_Subtype_Definitions);
409 Set_Aliased_Present (N, Aliased_Present);
410 Set_Subtype_Indication (N, Subtype_Indication);
411 return N;
412 end Make_Constrained_Array_Definition;
414 function Make_Discriminant_Specification (Sloc : Source_Ptr;
415 Defining_Identifier : Node_Id;
416 Discriminant_Type : Node_Id;
417 Expression : Node_Id := Empty)
418 return Node_Id
420 N : constant Node_Id :=
421 New_Node (N_Discriminant_Specification, Sloc);
422 begin
423 Set_Defining_Identifier (N, Defining_Identifier);
424 Set_Discriminant_Type (N, Discriminant_Type);
425 Set_Expression (N, Expression);
426 return N;
427 end Make_Discriminant_Specification;
429 function Make_Index_Or_Discriminant_Constraint (Sloc : Source_Ptr;
430 Constraints : List_Id)
431 return Node_Id
433 N : constant Node_Id :=
434 New_Node (N_Index_Or_Discriminant_Constraint, Sloc);
435 begin
436 Set_Constraints (N, Constraints);
437 return N;
438 end Make_Index_Or_Discriminant_Constraint;
440 function Make_Discriminant_Association (Sloc : Source_Ptr;
441 Selector_Names : List_Id;
442 Expression : Node_Id)
443 return Node_Id
445 N : constant Node_Id :=
446 New_Node (N_Discriminant_Association, Sloc);
447 begin
448 Set_Selector_Names (N, Selector_Names);
449 Set_Expression (N, Expression);
450 return N;
451 end Make_Discriminant_Association;
453 function Make_Record_Definition (Sloc : Source_Ptr;
454 End_Label : Node_Id := Empty;
455 Abstract_Present : Boolean := False;
456 Tagged_Present : Boolean := False;
457 Limited_Present : Boolean := False;
458 Component_List : Node_Id;
459 Null_Present : Boolean := False)
460 return Node_Id
462 N : constant Node_Id :=
463 New_Node (N_Record_Definition, Sloc);
464 begin
465 Set_End_Label (N, End_Label);
466 Set_Abstract_Present (N, Abstract_Present);
467 Set_Tagged_Present (N, Tagged_Present);
468 Set_Limited_Present (N, Limited_Present);
469 Set_Component_List (N, Component_List);
470 Set_Null_Present (N, Null_Present);
471 return N;
472 end Make_Record_Definition;
474 function Make_Component_List (Sloc : Source_Ptr;
475 Component_Items : List_Id;
476 Variant_Part : Node_Id := Empty;
477 Null_Present : Boolean := False)
478 return Node_Id
480 N : constant Node_Id :=
481 New_Node (N_Component_List, Sloc);
482 begin
483 Set_Component_Items (N, Component_Items);
484 Set_Variant_Part (N, Variant_Part);
485 Set_Null_Present (N, Null_Present);
486 return N;
487 end Make_Component_List;
489 function Make_Component_Declaration (Sloc : Source_Ptr;
490 Defining_Identifier : Node_Id;
491 Aliased_Present : Boolean := False;
492 Subtype_Indication : Node_Id;
493 Expression : Node_Id := Empty)
494 return Node_Id
496 N : constant Node_Id :=
497 New_Node (N_Component_Declaration, Sloc);
498 begin
499 Set_Defining_Identifier (N, Defining_Identifier);
500 Set_Aliased_Present (N, Aliased_Present);
501 Set_Subtype_Indication (N, Subtype_Indication);
502 Set_Expression (N, Expression);
503 return N;
504 end Make_Component_Declaration;
506 function Make_Variant_Part (Sloc : Source_Ptr;
507 Name : Node_Id;
508 Variants : List_Id)
509 return Node_Id
511 N : constant Node_Id :=
512 New_Node (N_Variant_Part, Sloc);
513 begin
514 Set_Name (N, Name);
515 Set_Variants (N, Variants);
516 return N;
517 end Make_Variant_Part;
519 function Make_Variant (Sloc : Source_Ptr;
520 Discrete_Choices : List_Id;
521 Component_List : Node_Id)
522 return Node_Id
524 N : constant Node_Id :=
525 New_Node (N_Variant, Sloc);
526 begin
527 Set_Discrete_Choices (N, Discrete_Choices);
528 Set_Component_List (N, Component_List);
529 return N;
530 end Make_Variant;
532 function Make_Others_Choice (Sloc : Source_Ptr)
533 return Node_Id
535 N : constant Node_Id :=
536 New_Node (N_Others_Choice, Sloc);
537 begin
538 return N;
539 end Make_Others_Choice;
541 function Make_Access_To_Object_Definition (Sloc : Source_Ptr;
542 All_Present : Boolean := False;
543 Subtype_Indication : Node_Id;
544 Constant_Present : Boolean := False)
545 return Node_Id
547 N : constant Node_Id :=
548 New_Node (N_Access_To_Object_Definition, Sloc);
549 begin
550 Set_All_Present (N, All_Present);
551 Set_Subtype_Indication (N, Subtype_Indication);
552 Set_Constant_Present (N, Constant_Present);
553 return N;
554 end Make_Access_To_Object_Definition;
556 function Make_Access_Function_Definition (Sloc : Source_Ptr;
557 Protected_Present : Boolean := False;
558 Parameter_Specifications : List_Id := No_List;
559 Subtype_Mark : Node_Id)
560 return Node_Id
562 N : constant Node_Id :=
563 New_Node (N_Access_Function_Definition, Sloc);
564 begin
565 Set_Protected_Present (N, Protected_Present);
566 Set_Parameter_Specifications (N, Parameter_Specifications);
567 Set_Subtype_Mark (N, Subtype_Mark);
568 return N;
569 end Make_Access_Function_Definition;
571 function Make_Access_Procedure_Definition (Sloc : Source_Ptr;
572 Protected_Present : Boolean := False;
573 Parameter_Specifications : List_Id := No_List)
574 return Node_Id
576 N : constant Node_Id :=
577 New_Node (N_Access_Procedure_Definition, Sloc);
578 begin
579 Set_Protected_Present (N, Protected_Present);
580 Set_Parameter_Specifications (N, Parameter_Specifications);
581 return N;
582 end Make_Access_Procedure_Definition;
584 function Make_Access_Definition (Sloc : Source_Ptr;
585 Subtype_Mark : Node_Id)
586 return Node_Id
588 N : constant Node_Id :=
589 New_Node (N_Access_Definition, Sloc);
590 begin
591 Set_Subtype_Mark (N, Subtype_Mark);
592 return N;
593 end Make_Access_Definition;
595 function Make_Incomplete_Type_Declaration (Sloc : Source_Ptr;
596 Defining_Identifier : Node_Id;
597 Discriminant_Specifications : List_Id := No_List;
598 Unknown_Discriminants_Present : Boolean := False)
599 return Node_Id
601 N : constant Node_Id :=
602 New_Node (N_Incomplete_Type_Declaration, Sloc);
603 begin
604 Set_Defining_Identifier (N, Defining_Identifier);
605 Set_Discriminant_Specifications (N, Discriminant_Specifications);
606 Set_Unknown_Discriminants_Present
607 (N, Unknown_Discriminants_Present);
608 return N;
609 end Make_Incomplete_Type_Declaration;
611 function Make_Explicit_Dereference (Sloc : Source_Ptr;
612 Prefix : Node_Id)
613 return Node_Id
615 N : constant Node_Id :=
616 New_Node (N_Explicit_Dereference, Sloc);
617 begin
618 Set_Prefix (N, Prefix);
619 return N;
620 end Make_Explicit_Dereference;
622 function Make_Indexed_Component (Sloc : Source_Ptr;
623 Prefix : Node_Id;
624 Expressions : List_Id)
625 return Node_Id
627 N : constant Node_Id :=
628 New_Node (N_Indexed_Component, Sloc);
629 begin
630 Set_Prefix (N, Prefix);
631 Set_Expressions (N, Expressions);
632 return N;
633 end Make_Indexed_Component;
635 function Make_Slice (Sloc : Source_Ptr;
636 Prefix : Node_Id;
637 Discrete_Range : Node_Id)
638 return Node_Id
640 N : constant Node_Id :=
641 New_Node (N_Slice, Sloc);
642 begin
643 Set_Prefix (N, Prefix);
644 Set_Discrete_Range (N, Discrete_Range);
645 return N;
646 end Make_Slice;
648 function Make_Selected_Component (Sloc : Source_Ptr;
649 Prefix : Node_Id;
650 Selector_Name : Node_Id)
651 return Node_Id
653 N : constant Node_Id :=
654 New_Node (N_Selected_Component, Sloc);
655 begin
656 Set_Prefix (N, Prefix);
657 Set_Selector_Name (N, Selector_Name);
658 return N;
659 end Make_Selected_Component;
661 function Make_Attribute_Reference (Sloc : Source_Ptr;
662 Prefix : Node_Id;
663 Attribute_Name : Name_Id;
664 Expressions : List_Id := No_List;
665 Must_Be_Byte_Aligned : Boolean := False)
666 return Node_Id
668 N : constant Node_Id :=
669 New_Node (N_Attribute_Reference, Sloc);
670 begin
671 Set_Prefix (N, Prefix);
672 Set_Attribute_Name (N, Attribute_Name);
673 Set_Expressions (N, Expressions);
674 Set_Must_Be_Byte_Aligned (N, Must_Be_Byte_Aligned);
675 return N;
676 end Make_Attribute_Reference;
678 function Make_Aggregate (Sloc : Source_Ptr;
679 Expressions : List_Id := No_List;
680 Component_Associations : List_Id := No_List;
681 Null_Record_Present : Boolean := False)
682 return Node_Id
684 N : constant Node_Id :=
685 New_Node (N_Aggregate, Sloc);
686 begin
687 Set_Expressions (N, Expressions);
688 Set_Component_Associations (N, Component_Associations);
689 Set_Null_Record_Present (N, Null_Record_Present);
690 return N;
691 end Make_Aggregate;
693 function Make_Component_Association (Sloc : Source_Ptr;
694 Choices : List_Id;
695 Expression : Node_Id;
696 Box_Present : Boolean := False)
697 return Node_Id
699 N : constant Node_Id :=
700 New_Node (N_Component_Association, Sloc);
701 begin
702 Set_Choices (N, Choices);
703 Set_Expression (N, Expression);
704 Set_Box_Present (N, Box_Present);
705 return N;
706 end Make_Component_Association;
708 function Make_Extension_Aggregate (Sloc : Source_Ptr;
709 Ancestor_Part : Node_Id;
710 Expressions : List_Id := No_List;
711 Component_Associations : List_Id := No_List;
712 Null_Record_Present : Boolean := False)
713 return Node_Id
715 N : constant Node_Id :=
716 New_Node (N_Extension_Aggregate, Sloc);
717 begin
718 Set_Ancestor_Part (N, Ancestor_Part);
719 Set_Expressions (N, Expressions);
720 Set_Component_Associations (N, Component_Associations);
721 Set_Null_Record_Present (N, Null_Record_Present);
722 return N;
723 end Make_Extension_Aggregate;
725 function Make_Null (Sloc : Source_Ptr)
726 return Node_Id
728 N : constant Node_Id :=
729 New_Node (N_Null, Sloc);
730 begin
731 return N;
732 end Make_Null;
734 function Make_And_Then (Sloc : Source_Ptr;
735 Left_Opnd : Node_Id;
736 Right_Opnd : Node_Id)
737 return Node_Id
739 N : constant Node_Id :=
740 New_Node (N_And_Then, Sloc);
741 begin
742 Set_Left_Opnd (N, Left_Opnd);
743 Set_Right_Opnd (N, Right_Opnd);
744 return N;
745 end Make_And_Then;
747 function Make_Or_Else (Sloc : Source_Ptr;
748 Left_Opnd : Node_Id;
749 Right_Opnd : Node_Id)
750 return Node_Id
752 N : constant Node_Id :=
753 New_Node (N_Or_Else, Sloc);
754 begin
755 Set_Left_Opnd (N, Left_Opnd);
756 Set_Right_Opnd (N, Right_Opnd);
757 return N;
758 end Make_Or_Else;
760 function Make_In (Sloc : Source_Ptr;
761 Left_Opnd : Node_Id;
762 Right_Opnd : Node_Id)
763 return Node_Id
765 N : constant Node_Id :=
766 New_Node (N_In, Sloc);
767 begin
768 Set_Left_Opnd (N, Left_Opnd);
769 Set_Right_Opnd (N, Right_Opnd);
770 return N;
771 end Make_In;
773 function Make_Not_In (Sloc : Source_Ptr;
774 Left_Opnd : Node_Id;
775 Right_Opnd : Node_Id)
776 return Node_Id
778 N : constant Node_Id :=
779 New_Node (N_Not_In, Sloc);
780 begin
781 Set_Left_Opnd (N, Left_Opnd);
782 Set_Right_Opnd (N, Right_Opnd);
783 return N;
784 end Make_Not_In;
786 function Make_Op_And (Sloc : Source_Ptr;
787 Left_Opnd : Node_Id;
788 Right_Opnd : Node_Id)
789 return Node_Id
791 N : constant Node_Id :=
792 New_Node (N_Op_And, Sloc);
793 begin
794 Set_Left_Opnd (N, Left_Opnd);
795 Set_Right_Opnd (N, Right_Opnd);
796 Set_Chars (N, Name_Op_And);
797 Set_Entity (N, Standard_Op_And);
798 return N;
799 end Make_Op_And;
801 function Make_Op_Or (Sloc : Source_Ptr;
802 Left_Opnd : Node_Id;
803 Right_Opnd : Node_Id)
804 return Node_Id
806 N : constant Node_Id :=
807 New_Node (N_Op_Or, Sloc);
808 begin
809 Set_Left_Opnd (N, Left_Opnd);
810 Set_Right_Opnd (N, Right_Opnd);
811 Set_Chars (N, Name_Op_Or);
812 Set_Entity (N, Standard_Op_Or);
813 return N;
814 end Make_Op_Or;
816 function Make_Op_Xor (Sloc : Source_Ptr;
817 Left_Opnd : Node_Id;
818 Right_Opnd : Node_Id)
819 return Node_Id
821 N : constant Node_Id :=
822 New_Node (N_Op_Xor, Sloc);
823 begin
824 Set_Left_Opnd (N, Left_Opnd);
825 Set_Right_Opnd (N, Right_Opnd);
826 Set_Chars (N, Name_Op_Xor);
827 Set_Entity (N, Standard_Op_Xor);
828 return N;
829 end Make_Op_Xor;
831 function Make_Op_Eq (Sloc : Source_Ptr;
832 Left_Opnd : Node_Id;
833 Right_Opnd : Node_Id)
834 return Node_Id
836 N : constant Node_Id :=
837 New_Node (N_Op_Eq, Sloc);
838 begin
839 Set_Left_Opnd (N, Left_Opnd);
840 Set_Right_Opnd (N, Right_Opnd);
841 Set_Chars (N, Name_Op_Eq);
842 Set_Entity (N, Standard_Op_Eq);
843 return N;
844 end Make_Op_Eq;
846 function Make_Op_Ne (Sloc : Source_Ptr;
847 Left_Opnd : Node_Id;
848 Right_Opnd : Node_Id)
849 return Node_Id
851 N : constant Node_Id :=
852 New_Node (N_Op_Ne, Sloc);
853 begin
854 Set_Left_Opnd (N, Left_Opnd);
855 Set_Right_Opnd (N, Right_Opnd);
856 Set_Chars (N, Name_Op_Ne);
857 Set_Entity (N, Standard_Op_Ne);
858 return N;
859 end Make_Op_Ne;
861 function Make_Op_Lt (Sloc : Source_Ptr;
862 Left_Opnd : Node_Id;
863 Right_Opnd : Node_Id)
864 return Node_Id
866 N : constant Node_Id :=
867 New_Node (N_Op_Lt, Sloc);
868 begin
869 Set_Left_Opnd (N, Left_Opnd);
870 Set_Right_Opnd (N, Right_Opnd);
871 Set_Chars (N, Name_Op_Lt);
872 Set_Entity (N, Standard_Op_Lt);
873 return N;
874 end Make_Op_Lt;
876 function Make_Op_Le (Sloc : Source_Ptr;
877 Left_Opnd : Node_Id;
878 Right_Opnd : Node_Id)
879 return Node_Id
881 N : constant Node_Id :=
882 New_Node (N_Op_Le, Sloc);
883 begin
884 Set_Left_Opnd (N, Left_Opnd);
885 Set_Right_Opnd (N, Right_Opnd);
886 Set_Chars (N, Name_Op_Le);
887 Set_Entity (N, Standard_Op_Le);
888 return N;
889 end Make_Op_Le;
891 function Make_Op_Gt (Sloc : Source_Ptr;
892 Left_Opnd : Node_Id;
893 Right_Opnd : Node_Id)
894 return Node_Id
896 N : constant Node_Id :=
897 New_Node (N_Op_Gt, Sloc);
898 begin
899 Set_Left_Opnd (N, Left_Opnd);
900 Set_Right_Opnd (N, Right_Opnd);
901 Set_Chars (N, Name_Op_Gt);
902 Set_Entity (N, Standard_Op_Gt);
903 return N;
904 end Make_Op_Gt;
906 function Make_Op_Ge (Sloc : Source_Ptr;
907 Left_Opnd : Node_Id;
908 Right_Opnd : Node_Id)
909 return Node_Id
911 N : constant Node_Id :=
912 New_Node (N_Op_Ge, Sloc);
913 begin
914 Set_Left_Opnd (N, Left_Opnd);
915 Set_Right_Opnd (N, Right_Opnd);
916 Set_Chars (N, Name_Op_Ge);
917 Set_Entity (N, Standard_Op_Ge);
918 return N;
919 end Make_Op_Ge;
921 function Make_Op_Add (Sloc : Source_Ptr;
922 Left_Opnd : Node_Id;
923 Right_Opnd : Node_Id)
924 return Node_Id
926 N : constant Node_Id :=
927 New_Node (N_Op_Add, Sloc);
928 begin
929 Set_Left_Opnd (N, Left_Opnd);
930 Set_Right_Opnd (N, Right_Opnd);
931 Set_Chars (N, Name_Op_Add);
932 Set_Entity (N, Standard_Op_Add);
933 return N;
934 end Make_Op_Add;
936 function Make_Op_Subtract (Sloc : Source_Ptr;
937 Left_Opnd : Node_Id;
938 Right_Opnd : Node_Id)
939 return Node_Id
941 N : constant Node_Id :=
942 New_Node (N_Op_Subtract, Sloc);
943 begin
944 Set_Left_Opnd (N, Left_Opnd);
945 Set_Right_Opnd (N, Right_Opnd);
946 Set_Chars (N, Name_Op_Subtract);
947 Set_Entity (N, Standard_Op_Subtract);
948 return N;
949 end Make_Op_Subtract;
951 function Make_Op_Concat (Sloc : Source_Ptr;
952 Left_Opnd : Node_Id;
953 Right_Opnd : Node_Id)
954 return Node_Id
956 N : constant Node_Id :=
957 New_Node (N_Op_Concat, Sloc);
958 begin
959 Set_Left_Opnd (N, Left_Opnd);
960 Set_Right_Opnd (N, Right_Opnd);
961 Set_Chars (N, Name_Op_Concat);
962 Set_Entity (N, Standard_Op_Concat);
963 return N;
964 end Make_Op_Concat;
966 function Make_Op_Multiply (Sloc : Source_Ptr;
967 Left_Opnd : Node_Id;
968 Right_Opnd : Node_Id)
969 return Node_Id
971 N : constant Node_Id :=
972 New_Node (N_Op_Multiply, Sloc);
973 begin
974 Set_Left_Opnd (N, Left_Opnd);
975 Set_Right_Opnd (N, Right_Opnd);
976 Set_Chars (N, Name_Op_Multiply);
977 Set_Entity (N, Standard_Op_Multiply);
978 return N;
979 end Make_Op_Multiply;
981 function Make_Op_Divide (Sloc : Source_Ptr;
982 Left_Opnd : Node_Id;
983 Right_Opnd : Node_Id)
984 return Node_Id
986 N : constant Node_Id :=
987 New_Node (N_Op_Divide, Sloc);
988 begin
989 Set_Left_Opnd (N, Left_Opnd);
990 Set_Right_Opnd (N, Right_Opnd);
991 Set_Chars (N, Name_Op_Divide);
992 Set_Entity (N, Standard_Op_Divide);
993 return N;
994 end Make_Op_Divide;
996 function Make_Op_Mod (Sloc : Source_Ptr;
997 Left_Opnd : Node_Id;
998 Right_Opnd : Node_Id)
999 return Node_Id
1001 N : constant Node_Id :=
1002 New_Node (N_Op_Mod, Sloc);
1003 begin
1004 Set_Left_Opnd (N, Left_Opnd);
1005 Set_Right_Opnd (N, Right_Opnd);
1006 Set_Chars (N, Name_Op_Mod);
1007 Set_Entity (N, Standard_Op_Mod);
1008 return N;
1009 end Make_Op_Mod;
1011 function Make_Op_Rem (Sloc : Source_Ptr;
1012 Left_Opnd : Node_Id;
1013 Right_Opnd : Node_Id)
1014 return Node_Id
1016 N : constant Node_Id :=
1017 New_Node (N_Op_Rem, Sloc);
1018 begin
1019 Set_Left_Opnd (N, Left_Opnd);
1020 Set_Right_Opnd (N, Right_Opnd);
1021 Set_Chars (N, Name_Op_Rem);
1022 Set_Entity (N, Standard_Op_Rem);
1023 return N;
1024 end Make_Op_Rem;
1026 function Make_Op_Expon (Sloc : Source_Ptr;
1027 Left_Opnd : Node_Id;
1028 Right_Opnd : Node_Id)
1029 return Node_Id
1031 N : constant Node_Id :=
1032 New_Node (N_Op_Expon, Sloc);
1033 begin
1034 Set_Left_Opnd (N, Left_Opnd);
1035 Set_Right_Opnd (N, Right_Opnd);
1036 Set_Chars (N, Name_Op_Expon);
1037 Set_Entity (N, Standard_Op_Expon);
1038 return N;
1039 end Make_Op_Expon;
1041 function Make_Op_Plus (Sloc : Source_Ptr;
1042 Right_Opnd : Node_Id)
1043 return Node_Id
1045 N : constant Node_Id :=
1046 New_Node (N_Op_Plus, Sloc);
1047 begin
1048 Set_Right_Opnd (N, Right_Opnd);
1049 Set_Chars (N, Name_Op_Add);
1050 Set_Entity (N, Standard_Op_Plus);
1051 return N;
1052 end Make_Op_Plus;
1054 function Make_Op_Minus (Sloc : Source_Ptr;
1055 Right_Opnd : Node_Id)
1056 return Node_Id
1058 N : constant Node_Id :=
1059 New_Node (N_Op_Minus, Sloc);
1060 begin
1061 Set_Right_Opnd (N, Right_Opnd);
1062 Set_Chars (N, Name_Op_Subtract);
1063 Set_Entity (N, Standard_Op_Minus);
1064 return N;
1065 end Make_Op_Minus;
1067 function Make_Op_Abs (Sloc : Source_Ptr;
1068 Right_Opnd : Node_Id)
1069 return Node_Id
1071 N : constant Node_Id :=
1072 New_Node (N_Op_Abs, Sloc);
1073 begin
1074 Set_Right_Opnd (N, Right_Opnd);
1075 Set_Chars (N, Name_Op_Abs);
1076 Set_Entity (N, Standard_Op_Abs);
1077 return N;
1078 end Make_Op_Abs;
1080 function Make_Op_Not (Sloc : Source_Ptr;
1081 Right_Opnd : Node_Id)
1082 return Node_Id
1084 N : constant Node_Id :=
1085 New_Node (N_Op_Not, Sloc);
1086 begin
1087 Set_Right_Opnd (N, Right_Opnd);
1088 Set_Chars (N, Name_Op_Not);
1089 Set_Entity (N, Standard_Op_Not);
1090 return N;
1091 end Make_Op_Not;
1093 function Make_Type_Conversion (Sloc : Source_Ptr;
1094 Subtype_Mark : Node_Id;
1095 Expression : Node_Id)
1096 return Node_Id
1098 N : constant Node_Id :=
1099 New_Node (N_Type_Conversion, Sloc);
1100 begin
1101 Set_Subtype_Mark (N, Subtype_Mark);
1102 Set_Expression (N, Expression);
1103 return N;
1104 end Make_Type_Conversion;
1106 function Make_Qualified_Expression (Sloc : Source_Ptr;
1107 Subtype_Mark : Node_Id;
1108 Expression : Node_Id)
1109 return Node_Id
1111 N : constant Node_Id :=
1112 New_Node (N_Qualified_Expression, Sloc);
1113 begin
1114 Set_Subtype_Mark (N, Subtype_Mark);
1115 Set_Expression (N, Expression);
1116 return N;
1117 end Make_Qualified_Expression;
1119 function Make_Allocator (Sloc : Source_Ptr;
1120 Expression : Node_Id)
1121 return Node_Id
1123 N : constant Node_Id :=
1124 New_Node (N_Allocator, Sloc);
1125 begin
1126 Set_Expression (N, Expression);
1127 return N;
1128 end Make_Allocator;
1130 function Make_Null_Statement (Sloc : Source_Ptr)
1131 return Node_Id
1133 N : constant Node_Id :=
1134 New_Node (N_Null_Statement, Sloc);
1135 begin
1136 return N;
1137 end Make_Null_Statement;
1139 function Make_Label (Sloc : Source_Ptr;
1140 Identifier : Node_Id)
1141 return Node_Id
1143 N : constant Node_Id :=
1144 New_Node (N_Label, Sloc);
1145 begin
1146 Set_Identifier (N, Identifier);
1147 return N;
1148 end Make_Label;
1150 function Make_Assignment_Statement (Sloc : Source_Ptr;
1151 Name : Node_Id;
1152 Expression : Node_Id)
1153 return Node_Id
1155 N : constant Node_Id :=
1156 New_Node (N_Assignment_Statement, Sloc);
1157 begin
1158 Set_Name (N, Name);
1159 Set_Expression (N, Expression);
1160 return N;
1161 end Make_Assignment_Statement;
1163 function Make_If_Statement (Sloc : Source_Ptr;
1164 Condition : Node_Id;
1165 Then_Statements : List_Id;
1166 Elsif_Parts : List_Id := No_List;
1167 Else_Statements : List_Id := No_List;
1168 End_Span : Uint := No_Uint)
1169 return Node_Id
1171 N : constant Node_Id :=
1172 New_Node (N_If_Statement, Sloc);
1173 begin
1174 Set_Condition (N, Condition);
1175 Set_Then_Statements (N, Then_Statements);
1176 Set_Elsif_Parts (N, Elsif_Parts);
1177 Set_Else_Statements (N, Else_Statements);
1178 Set_End_Span (N, End_Span);
1179 return N;
1180 end Make_If_Statement;
1182 function Make_Elsif_Part (Sloc : Source_Ptr;
1183 Condition : Node_Id;
1184 Then_Statements : List_Id)
1185 return Node_Id
1187 N : constant Node_Id :=
1188 New_Node (N_Elsif_Part, Sloc);
1189 begin
1190 Set_Condition (N, Condition);
1191 Set_Then_Statements (N, Then_Statements);
1192 return N;
1193 end Make_Elsif_Part;
1195 function Make_Case_Statement (Sloc : Source_Ptr;
1196 Expression : Node_Id;
1197 Alternatives : List_Id;
1198 End_Span : Uint := No_Uint)
1199 return Node_Id
1201 N : constant Node_Id :=
1202 New_Node (N_Case_Statement, Sloc);
1203 begin
1204 Set_Expression (N, Expression);
1205 Set_Alternatives (N, Alternatives);
1206 Set_End_Span (N, End_Span);
1207 return N;
1208 end Make_Case_Statement;
1210 function Make_Case_Statement_Alternative (Sloc : Source_Ptr;
1211 Discrete_Choices : List_Id;
1212 Statements : List_Id)
1213 return Node_Id
1215 N : constant Node_Id :=
1216 New_Node (N_Case_Statement_Alternative, Sloc);
1217 begin
1218 Set_Discrete_Choices (N, Discrete_Choices);
1219 Set_Statements (N, Statements);
1220 return N;
1221 end Make_Case_Statement_Alternative;
1223 function Make_Loop_Statement (Sloc : Source_Ptr;
1224 Identifier : Node_Id := Empty;
1225 Iteration_Scheme : Node_Id := Empty;
1226 Statements : List_Id;
1227 End_Label : Node_Id;
1228 Has_Created_Identifier : Boolean := False;
1229 Is_Null_Loop : Boolean := False)
1230 return Node_Id
1232 N : constant Node_Id :=
1233 New_Node (N_Loop_Statement, Sloc);
1234 begin
1235 Set_Identifier (N, Identifier);
1236 Set_Iteration_Scheme (N, Iteration_Scheme);
1237 Set_Statements (N, Statements);
1238 Set_End_Label (N, End_Label);
1239 Set_Has_Created_Identifier (N, Has_Created_Identifier);
1240 Set_Is_Null_Loop (N, Is_Null_Loop);
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 Config_Pragmas : List_Id := Empty_List)
2122 return Node_Id
2124 N : constant Node_Id :=
2125 New_Node (N_Compilation_Unit_Aux, Sloc);
2126 begin
2127 Set_Declarations (N, Declarations);
2128 Set_Actions (N, Actions);
2129 Set_Pragmas_After (N, Pragmas_After);
2130 Set_Config_Pragmas (N, Config_Pragmas);
2131 return N;
2132 end Make_Compilation_Unit_Aux;
2134 function Make_With_Clause (Sloc : Source_Ptr;
2135 Name : Node_Id;
2136 First_Name : Boolean := True;
2137 Last_Name : Boolean := True;
2138 Limited_Present : Boolean := False)
2139 return Node_Id
2141 N : constant Node_Id :=
2142 New_Node (N_With_Clause, Sloc);
2143 begin
2144 Set_Name (N, Name);
2145 Set_First_Name (N, First_Name);
2146 Set_Last_Name (N, Last_Name);
2147 Set_Limited_Present (N, Limited_Present);
2148 return N;
2149 end Make_With_Clause;
2151 function Make_With_Type_Clause (Sloc : Source_Ptr;
2152 Name : Node_Id;
2153 Tagged_Present : Boolean := False)
2154 return Node_Id
2156 N : constant Node_Id :=
2157 New_Node (N_With_Type_Clause, Sloc);
2158 begin
2159 Set_Name (N, Name);
2160 Set_Tagged_Present (N, Tagged_Present);
2161 return N;
2162 end Make_With_Type_Clause;
2164 function Make_Subprogram_Body_Stub (Sloc : Source_Ptr;
2165 Specification : Node_Id)
2166 return Node_Id
2168 N : constant Node_Id :=
2169 New_Node (N_Subprogram_Body_Stub, Sloc);
2170 begin
2171 Set_Specification (N, Specification);
2172 return N;
2173 end Make_Subprogram_Body_Stub;
2175 function Make_Package_Body_Stub (Sloc : Source_Ptr;
2176 Defining_Identifier : Node_Id)
2177 return Node_Id
2179 N : constant Node_Id :=
2180 New_Node (N_Package_Body_Stub, Sloc);
2181 begin
2182 Set_Defining_Identifier (N, Defining_Identifier);
2183 return N;
2184 end Make_Package_Body_Stub;
2186 function Make_Task_Body_Stub (Sloc : Source_Ptr;
2187 Defining_Identifier : Node_Id)
2188 return Node_Id
2190 N : constant Node_Id :=
2191 New_Node (N_Task_Body_Stub, Sloc);
2192 begin
2193 Set_Defining_Identifier (N, Defining_Identifier);
2194 return N;
2195 end Make_Task_Body_Stub;
2197 function Make_Protected_Body_Stub (Sloc : Source_Ptr;
2198 Defining_Identifier : Node_Id)
2199 return Node_Id
2201 N : constant Node_Id :=
2202 New_Node (N_Protected_Body_Stub, Sloc);
2203 begin
2204 Set_Defining_Identifier (N, Defining_Identifier);
2205 return N;
2206 end Make_Protected_Body_Stub;
2208 function Make_Subunit (Sloc : Source_Ptr;
2209 Name : Node_Id;
2210 Proper_Body : Node_Id)
2211 return Node_Id
2213 N : constant Node_Id :=
2214 New_Node (N_Subunit, Sloc);
2215 begin
2216 Set_Name (N, Name);
2217 Set_Proper_Body (N, Proper_Body);
2218 return N;
2219 end Make_Subunit;
2221 function Make_Exception_Declaration (Sloc : Source_Ptr;
2222 Defining_Identifier : Node_Id)
2223 return Node_Id
2225 N : constant Node_Id :=
2226 New_Node (N_Exception_Declaration, Sloc);
2227 begin
2228 Set_Defining_Identifier (N, Defining_Identifier);
2229 return N;
2230 end Make_Exception_Declaration;
2232 function Make_Handled_Sequence_Of_Statements (Sloc : Source_Ptr;
2233 Statements : List_Id;
2234 End_Label : Node_Id := Empty;
2235 Exception_Handlers : List_Id := No_List;
2236 At_End_Proc : Node_Id := Empty)
2237 return Node_Id
2239 N : constant Node_Id :=
2240 New_Node (N_Handled_Sequence_Of_Statements, Sloc);
2241 begin
2242 Set_Statements (N, Statements);
2243 Set_End_Label (N, End_Label);
2244 Set_Exception_Handlers (N, Exception_Handlers);
2245 Set_At_End_Proc (N, At_End_Proc);
2246 return N;
2247 end Make_Handled_Sequence_Of_Statements;
2249 function Make_Exception_Handler (Sloc : Source_Ptr;
2250 Choice_Parameter : Node_Id := Empty;
2251 Exception_Choices : List_Id;
2252 Statements : List_Id)
2253 return Node_Id
2255 N : constant Node_Id :=
2256 New_Node (N_Exception_Handler, Sloc);
2257 begin
2258 Set_Choice_Parameter (N, Choice_Parameter);
2259 Set_Exception_Choices (N, Exception_Choices);
2260 Set_Statements (N, Statements);
2261 return N;
2262 end Make_Exception_Handler;
2264 function Make_Raise_Statement (Sloc : Source_Ptr;
2265 Name : Node_Id := Empty)
2266 return Node_Id
2268 N : constant Node_Id :=
2269 New_Node (N_Raise_Statement, Sloc);
2270 begin
2271 Set_Name (N, Name);
2272 return N;
2273 end Make_Raise_Statement;
2275 function Make_Generic_Subprogram_Declaration (Sloc : Source_Ptr;
2276 Specification : Node_Id;
2277 Generic_Formal_Declarations : List_Id)
2278 return Node_Id
2280 N : constant Node_Id :=
2281 New_Node (N_Generic_Subprogram_Declaration, Sloc);
2282 begin
2283 Set_Specification (N, Specification);
2284 Set_Generic_Formal_Declarations (N, Generic_Formal_Declarations);
2285 return N;
2286 end Make_Generic_Subprogram_Declaration;
2288 function Make_Generic_Package_Declaration (Sloc : Source_Ptr;
2289 Specification : Node_Id;
2290 Generic_Formal_Declarations : List_Id)
2291 return Node_Id
2293 N : constant Node_Id :=
2294 New_Node (N_Generic_Package_Declaration, Sloc);
2295 begin
2296 Set_Specification (N, Specification);
2297 Set_Generic_Formal_Declarations (N, Generic_Formal_Declarations);
2298 return N;
2299 end Make_Generic_Package_Declaration;
2301 function Make_Package_Instantiation (Sloc : Source_Ptr;
2302 Defining_Unit_Name : Node_Id;
2303 Name : Node_Id;
2304 Generic_Associations : List_Id := No_List)
2305 return Node_Id
2307 N : constant Node_Id :=
2308 New_Node (N_Package_Instantiation, Sloc);
2309 begin
2310 Set_Defining_Unit_Name (N, Defining_Unit_Name);
2311 Set_Name (N, Name);
2312 Set_Generic_Associations (N, Generic_Associations);
2313 return N;
2314 end Make_Package_Instantiation;
2316 function Make_Procedure_Instantiation (Sloc : Source_Ptr;
2317 Defining_Unit_Name : Node_Id;
2318 Name : Node_Id;
2319 Generic_Associations : List_Id := No_List)
2320 return Node_Id
2322 N : constant Node_Id :=
2323 New_Node (N_Procedure_Instantiation, Sloc);
2324 begin
2325 Set_Defining_Unit_Name (N, Defining_Unit_Name);
2326 Set_Name (N, Name);
2327 Set_Generic_Associations (N, Generic_Associations);
2328 return N;
2329 end Make_Procedure_Instantiation;
2331 function Make_Function_Instantiation (Sloc : Source_Ptr;
2332 Defining_Unit_Name : Node_Id;
2333 Name : Node_Id;
2334 Generic_Associations : List_Id := No_List)
2335 return Node_Id
2337 N : constant Node_Id :=
2338 New_Node (N_Function_Instantiation, Sloc);
2339 begin
2340 Set_Defining_Unit_Name (N, Defining_Unit_Name);
2341 Set_Name (N, Name);
2342 Set_Generic_Associations (N, Generic_Associations);
2343 return N;
2344 end Make_Function_Instantiation;
2346 function Make_Generic_Association (Sloc : Source_Ptr;
2347 Selector_Name : Node_Id := Empty;
2348 Explicit_Generic_Actual_Parameter : Node_Id)
2349 return Node_Id
2351 N : constant Node_Id :=
2352 New_Node (N_Generic_Association, Sloc);
2353 begin
2354 Set_Selector_Name (N, Selector_Name);
2355 Set_Explicit_Generic_Actual_Parameter
2356 (N, Explicit_Generic_Actual_Parameter);
2357 return N;
2358 end Make_Generic_Association;
2360 function Make_Formal_Object_Declaration (Sloc : Source_Ptr;
2361 Defining_Identifier : Node_Id;
2362 In_Present : Boolean := False;
2363 Out_Present : Boolean := False;
2364 Subtype_Mark : Node_Id;
2365 Expression : Node_Id := Empty)
2366 return Node_Id
2368 N : constant Node_Id :=
2369 New_Node (N_Formal_Object_Declaration, Sloc);
2370 begin
2371 Set_Defining_Identifier (N, Defining_Identifier);
2372 Set_In_Present (N, In_Present);
2373 Set_Out_Present (N, Out_Present);
2374 Set_Subtype_Mark (N, Subtype_Mark);
2375 Set_Expression (N, Expression);
2376 return N;
2377 end Make_Formal_Object_Declaration;
2379 function Make_Formal_Type_Declaration (Sloc : Source_Ptr;
2380 Defining_Identifier : Node_Id;
2381 Formal_Type_Definition : Node_Id;
2382 Discriminant_Specifications : List_Id := No_List;
2383 Unknown_Discriminants_Present : Boolean := False)
2384 return Node_Id
2386 N : constant Node_Id :=
2387 New_Node (N_Formal_Type_Declaration, Sloc);
2388 begin
2389 Set_Defining_Identifier (N, Defining_Identifier);
2390 Set_Formal_Type_Definition (N, Formal_Type_Definition);
2391 Set_Discriminant_Specifications (N, Discriminant_Specifications);
2392 Set_Unknown_Discriminants_Present
2393 (N, Unknown_Discriminants_Present);
2394 return N;
2395 end Make_Formal_Type_Declaration;
2397 function Make_Formal_Private_Type_Definition (Sloc : Source_Ptr;
2398 Abstract_Present : Boolean := False;
2399 Tagged_Present : Boolean := False;
2400 Limited_Present : Boolean := False)
2401 return Node_Id
2403 N : constant Node_Id :=
2404 New_Node (N_Formal_Private_Type_Definition, Sloc);
2405 begin
2406 Set_Abstract_Present (N, Abstract_Present);
2407 Set_Tagged_Present (N, Tagged_Present);
2408 Set_Limited_Present (N, Limited_Present);
2409 return N;
2410 end Make_Formal_Private_Type_Definition;
2412 function Make_Formal_Derived_Type_Definition (Sloc : Source_Ptr;
2413 Subtype_Mark : Node_Id;
2414 Private_Present : Boolean := False;
2415 Abstract_Present : Boolean := False)
2416 return Node_Id
2418 N : constant Node_Id :=
2419 New_Node (N_Formal_Derived_Type_Definition, Sloc);
2420 begin
2421 Set_Subtype_Mark (N, Subtype_Mark);
2422 Set_Private_Present (N, Private_Present);
2423 Set_Abstract_Present (N, Abstract_Present);
2424 return N;
2425 end Make_Formal_Derived_Type_Definition;
2427 function Make_Formal_Discrete_Type_Definition (Sloc : Source_Ptr)
2428 return Node_Id
2430 N : constant Node_Id :=
2431 New_Node (N_Formal_Discrete_Type_Definition, Sloc);
2432 begin
2433 return N;
2434 end Make_Formal_Discrete_Type_Definition;
2436 function Make_Formal_Signed_Integer_Type_Definition (Sloc : Source_Ptr)
2437 return Node_Id
2439 N : constant Node_Id :=
2440 New_Node (N_Formal_Signed_Integer_Type_Definition, Sloc);
2441 begin
2442 return N;
2443 end Make_Formal_Signed_Integer_Type_Definition;
2445 function Make_Formal_Modular_Type_Definition (Sloc : Source_Ptr)
2446 return Node_Id
2448 N : constant Node_Id :=
2449 New_Node (N_Formal_Modular_Type_Definition, Sloc);
2450 begin
2451 return N;
2452 end Make_Formal_Modular_Type_Definition;
2454 function Make_Formal_Floating_Point_Definition (Sloc : Source_Ptr)
2455 return Node_Id
2457 N : constant Node_Id :=
2458 New_Node (N_Formal_Floating_Point_Definition, Sloc);
2459 begin
2460 return N;
2461 end Make_Formal_Floating_Point_Definition;
2463 function Make_Formal_Ordinary_Fixed_Point_Definition (Sloc : Source_Ptr)
2464 return Node_Id
2466 N : constant Node_Id :=
2467 New_Node (N_Formal_Ordinary_Fixed_Point_Definition, Sloc);
2468 begin
2469 return N;
2470 end Make_Formal_Ordinary_Fixed_Point_Definition;
2472 function Make_Formal_Decimal_Fixed_Point_Definition (Sloc : Source_Ptr)
2473 return Node_Id
2475 N : constant Node_Id :=
2476 New_Node (N_Formal_Decimal_Fixed_Point_Definition, Sloc);
2477 begin
2478 return N;
2479 end Make_Formal_Decimal_Fixed_Point_Definition;
2481 function Make_Formal_Subprogram_Declaration (Sloc : Source_Ptr;
2482 Specification : Node_Id;
2483 Default_Name : Node_Id := Empty;
2484 Box_Present : Boolean := False)
2485 return Node_Id
2487 N : constant Node_Id :=
2488 New_Node (N_Formal_Subprogram_Declaration, Sloc);
2489 begin
2490 Set_Specification (N, Specification);
2491 Set_Default_Name (N, Default_Name);
2492 Set_Box_Present (N, Box_Present);
2493 return N;
2494 end Make_Formal_Subprogram_Declaration;
2496 function Make_Formal_Package_Declaration (Sloc : Source_Ptr;
2497 Defining_Identifier : Node_Id;
2498 Name : Node_Id;
2499 Generic_Associations : List_Id := No_List;
2500 Box_Present : Boolean := False)
2501 return Node_Id
2503 N : constant Node_Id :=
2504 New_Node (N_Formal_Package_Declaration, Sloc);
2505 begin
2506 Set_Defining_Identifier (N, Defining_Identifier);
2507 Set_Name (N, Name);
2508 Set_Generic_Associations (N, Generic_Associations);
2509 Set_Box_Present (N, Box_Present);
2510 return N;
2511 end Make_Formal_Package_Declaration;
2513 function Make_Attribute_Definition_Clause (Sloc : Source_Ptr;
2514 Name : Node_Id;
2515 Chars : Name_Id;
2516 Expression : Node_Id)
2517 return Node_Id
2519 N : constant Node_Id :=
2520 New_Node (N_Attribute_Definition_Clause, Sloc);
2521 begin
2522 Set_Name (N, Name);
2523 Set_Chars (N, Chars);
2524 Set_Expression (N, Expression);
2525 return N;
2526 end Make_Attribute_Definition_Clause;
2528 function Make_Enumeration_Representation_Clause (Sloc : Source_Ptr;
2529 Identifier : Node_Id;
2530 Array_Aggregate : Node_Id)
2531 return Node_Id
2533 N : constant Node_Id :=
2534 New_Node (N_Enumeration_Representation_Clause, Sloc);
2535 begin
2536 Set_Identifier (N, Identifier);
2537 Set_Array_Aggregate (N, Array_Aggregate);
2538 return N;
2539 end Make_Enumeration_Representation_Clause;
2541 function Make_Record_Representation_Clause (Sloc : Source_Ptr;
2542 Identifier : Node_Id;
2543 Mod_Clause : Node_Id := Empty;
2544 Component_Clauses : List_Id)
2545 return Node_Id
2547 N : constant Node_Id :=
2548 New_Node (N_Record_Representation_Clause, Sloc);
2549 begin
2550 Set_Identifier (N, Identifier);
2551 Set_Mod_Clause (N, Mod_Clause);
2552 Set_Component_Clauses (N, Component_Clauses);
2553 return N;
2554 end Make_Record_Representation_Clause;
2556 function Make_Component_Clause (Sloc : Source_Ptr;
2557 Component_Name : Node_Id;
2558 Position : Node_Id;
2559 First_Bit : Node_Id;
2560 Last_Bit : Node_Id)
2561 return Node_Id
2563 N : constant Node_Id :=
2564 New_Node (N_Component_Clause, Sloc);
2565 begin
2566 Set_Component_Name (N, Component_Name);
2567 Set_Position (N, Position);
2568 Set_First_Bit (N, First_Bit);
2569 Set_Last_Bit (N, Last_Bit);
2570 return N;
2571 end Make_Component_Clause;
2573 function Make_Code_Statement (Sloc : Source_Ptr;
2574 Expression : Node_Id)
2575 return Node_Id
2577 N : constant Node_Id :=
2578 New_Node (N_Code_Statement, Sloc);
2579 begin
2580 Set_Expression (N, Expression);
2581 return N;
2582 end Make_Code_Statement;
2584 function Make_Op_Rotate_Left (Sloc : Source_Ptr;
2585 Left_Opnd : Node_Id;
2586 Right_Opnd : Node_Id)
2587 return Node_Id
2589 N : constant Node_Id :=
2590 New_Node (N_Op_Rotate_Left, Sloc);
2591 begin
2592 Set_Left_Opnd (N, Left_Opnd);
2593 Set_Right_Opnd (N, Right_Opnd);
2594 Set_Chars (N, Name_Rotate_Left);
2595 Set_Entity (N, Standard_Op_Rotate_Left);
2596 return N;
2597 end Make_Op_Rotate_Left;
2599 function Make_Op_Rotate_Right (Sloc : Source_Ptr;
2600 Left_Opnd : Node_Id;
2601 Right_Opnd : Node_Id)
2602 return Node_Id
2604 N : constant Node_Id :=
2605 New_Node (N_Op_Rotate_Right, Sloc);
2606 begin
2607 Set_Left_Opnd (N, Left_Opnd);
2608 Set_Right_Opnd (N, Right_Opnd);
2609 Set_Chars (N, Name_Rotate_Right);
2610 Set_Entity (N, Standard_Op_Rotate_Right);
2611 return N;
2612 end Make_Op_Rotate_Right;
2614 function Make_Op_Shift_Left (Sloc : Source_Ptr;
2615 Left_Opnd : Node_Id;
2616 Right_Opnd : Node_Id)
2617 return Node_Id
2619 N : constant Node_Id :=
2620 New_Node (N_Op_Shift_Left, Sloc);
2621 begin
2622 Set_Left_Opnd (N, Left_Opnd);
2623 Set_Right_Opnd (N, Right_Opnd);
2624 Set_Chars (N, Name_Shift_Left);
2625 Set_Entity (N, Standard_Op_Shift_Left);
2626 return N;
2627 end Make_Op_Shift_Left;
2629 function Make_Op_Shift_Right_Arithmetic (Sloc : Source_Ptr;
2630 Left_Opnd : Node_Id;
2631 Right_Opnd : Node_Id)
2632 return Node_Id
2634 N : constant Node_Id :=
2635 New_Node (N_Op_Shift_Right_Arithmetic, Sloc);
2636 begin
2637 Set_Left_Opnd (N, Left_Opnd);
2638 Set_Right_Opnd (N, Right_Opnd);
2639 Set_Chars (N, Name_Shift_Right_Arithmetic);
2640 Set_Entity (N, Standard_Op_Shift_Right_Arithmetic);
2641 return N;
2642 end Make_Op_Shift_Right_Arithmetic;
2644 function Make_Op_Shift_Right (Sloc : Source_Ptr;
2645 Left_Opnd : Node_Id;
2646 Right_Opnd : Node_Id)
2647 return Node_Id
2649 N : constant Node_Id :=
2650 New_Node (N_Op_Shift_Right, Sloc);
2651 begin
2652 Set_Left_Opnd (N, Left_Opnd);
2653 Set_Right_Opnd (N, Right_Opnd);
2654 Set_Chars (N, Name_Shift_Right);
2655 Set_Entity (N, Standard_Op_Shift_Right);
2656 return N;
2657 end Make_Op_Shift_Right;
2659 function Make_Delta_Constraint (Sloc : Source_Ptr;
2660 Delta_Expression : Node_Id;
2661 Range_Constraint : Node_Id := Empty)
2662 return Node_Id
2664 N : constant Node_Id :=
2665 New_Node (N_Delta_Constraint, Sloc);
2666 begin
2667 Set_Delta_Expression (N, Delta_Expression);
2668 Set_Range_Constraint (N, Range_Constraint);
2669 return N;
2670 end Make_Delta_Constraint;
2672 function Make_At_Clause (Sloc : Source_Ptr;
2673 Identifier : Node_Id;
2674 Expression : Node_Id)
2675 return Node_Id
2677 N : constant Node_Id :=
2678 New_Node (N_At_Clause, Sloc);
2679 begin
2680 Set_Identifier (N, Identifier);
2681 Set_Expression (N, Expression);
2682 return N;
2683 end Make_At_Clause;
2685 function Make_Mod_Clause (Sloc : Source_Ptr;
2686 Expression : Node_Id;
2687 Pragmas_Before : List_Id)
2688 return Node_Id
2690 N : constant Node_Id :=
2691 New_Node (N_Mod_Clause, Sloc);
2692 begin
2693 Set_Expression (N, Expression);
2694 Set_Pragmas_Before (N, Pragmas_Before);
2695 return N;
2696 end Make_Mod_Clause;
2698 function Make_Conditional_Expression (Sloc : Source_Ptr;
2699 Expressions : List_Id)
2700 return Node_Id
2702 N : constant Node_Id :=
2703 New_Node (N_Conditional_Expression, Sloc);
2704 begin
2705 Set_Expressions (N, Expressions);
2706 return N;
2707 end Make_Conditional_Expression;
2709 function Make_Expanded_Name (Sloc : Source_Ptr;
2710 Chars : Name_Id;
2711 Prefix : Node_Id;
2712 Selector_Name : Node_Id)
2713 return Node_Id
2715 N : constant Node_Id :=
2716 New_Node (N_Expanded_Name, Sloc);
2717 begin
2718 Set_Chars (N, Chars);
2719 Set_Prefix (N, Prefix);
2720 Set_Selector_Name (N, Selector_Name);
2721 return N;
2722 end Make_Expanded_Name;
2724 function Make_Free_Statement (Sloc : Source_Ptr;
2725 Expression : Node_Id)
2726 return Node_Id
2728 N : constant Node_Id :=
2729 New_Node (N_Free_Statement, Sloc);
2730 begin
2731 Set_Expression (N, Expression);
2732 return N;
2733 end Make_Free_Statement;
2735 function Make_Freeze_Entity (Sloc : Source_Ptr;
2736 Actions : List_Id := No_List)
2737 return Node_Id
2739 N : constant Node_Id :=
2740 New_Node (N_Freeze_Entity, Sloc);
2741 begin
2742 Set_Actions (N, Actions);
2743 return N;
2744 end Make_Freeze_Entity;
2746 function Make_Implicit_Label_Declaration (Sloc : Source_Ptr;
2747 Defining_Identifier : Node_Id)
2748 return Node_Id
2750 N : constant Node_Id :=
2751 New_Node (N_Implicit_Label_Declaration, Sloc);
2752 begin
2753 Set_Defining_Identifier (N, Defining_Identifier);
2754 return N;
2755 end Make_Implicit_Label_Declaration;
2757 function Make_Itype_Reference (Sloc : Source_Ptr)
2758 return Node_Id
2760 N : constant Node_Id :=
2761 New_Node (N_Itype_Reference, Sloc);
2762 begin
2763 return N;
2764 end Make_Itype_Reference;
2766 function Make_Raise_Constraint_Error (Sloc : Source_Ptr;
2767 Condition : Node_Id := Empty;
2768 Reason : Uint)
2769 return Node_Id
2771 N : constant Node_Id :=
2772 New_Node (N_Raise_Constraint_Error, Sloc);
2773 begin
2774 Set_Condition (N, Condition);
2775 Set_Reason (N, Reason);
2776 return N;
2777 end Make_Raise_Constraint_Error;
2779 function Make_Raise_Program_Error (Sloc : Source_Ptr;
2780 Condition : Node_Id := Empty;
2781 Reason : Uint)
2782 return Node_Id
2784 N : constant Node_Id :=
2785 New_Node (N_Raise_Program_Error, Sloc);
2786 begin
2787 Set_Condition (N, Condition);
2788 Set_Reason (N, Reason);
2789 return N;
2790 end Make_Raise_Program_Error;
2792 function Make_Raise_Storage_Error (Sloc : Source_Ptr;
2793 Condition : Node_Id := Empty;
2794 Reason : Uint)
2795 return Node_Id
2797 N : constant Node_Id :=
2798 New_Node (N_Raise_Storage_Error, Sloc);
2799 begin
2800 Set_Condition (N, Condition);
2801 Set_Reason (N, Reason);
2802 return N;
2803 end Make_Raise_Storage_Error;
2805 function Make_Reference (Sloc : Source_Ptr;
2806 Prefix : Node_Id)
2807 return Node_Id
2809 N : constant Node_Id :=
2810 New_Node (N_Reference, Sloc);
2811 begin
2812 Set_Prefix (N, Prefix);
2813 return N;
2814 end Make_Reference;
2816 function Make_Subprogram_Info (Sloc : Source_Ptr;
2817 Identifier : Node_Id)
2818 return Node_Id
2820 N : constant Node_Id :=
2821 New_Node (N_Subprogram_Info, Sloc);
2822 begin
2823 Set_Identifier (N, Identifier);
2824 return N;
2825 end Make_Subprogram_Info;
2827 function Make_Unchecked_Expression (Sloc : Source_Ptr;
2828 Expression : Node_Id)
2829 return Node_Id
2831 N : constant Node_Id :=
2832 New_Node (N_Unchecked_Expression, Sloc);
2833 begin
2834 Set_Expression (N, Expression);
2835 return N;
2836 end Make_Unchecked_Expression;
2838 function Make_Unchecked_Type_Conversion (Sloc : Source_Ptr;
2839 Subtype_Mark : Node_Id;
2840 Expression : Node_Id)
2841 return Node_Id
2843 N : constant Node_Id :=
2844 New_Node (N_Unchecked_Type_Conversion, Sloc);
2845 begin
2846 Set_Subtype_Mark (N, Subtype_Mark);
2847 Set_Expression (N, Expression);
2848 return N;
2849 end Make_Unchecked_Type_Conversion;
2851 function Make_Validate_Unchecked_Conversion (Sloc : Source_Ptr)
2852 return Node_Id
2854 N : constant Node_Id :=
2855 New_Node (N_Validate_Unchecked_Conversion, Sloc);
2856 begin
2857 return N;
2858 end Make_Validate_Unchecked_Conversion;
2860 end Nmake;