1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Generated by xnmake revision 1.29 using --
10 -- sinfo.ads revision 1.439 --
11 -- nmake.adt revision 1.12 --
13 -- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
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. --
26 -- GNAT was originally developed by the GNAT team at New York University. --
27 -- Extensive contributions were provided by Ada Core Technologies Inc. --
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;
43 function Make_Unused_At_Start (Sloc : Source_Ptr)
46 N : constant Node_Id :=
47 New_Node (N_Unused_At_Start, Sloc);
50 end Make_Unused_At_Start;
52 function Make_Unused_At_End (Sloc : Source_Ptr)
55 N : constant Node_Id :=
56 New_Node (N_Unused_At_End, Sloc);
59 end Make_Unused_At_End;
61 function Make_Identifier (Sloc : Source_Ptr;
65 N : constant Node_Id :=
66 New_Node (N_Identifier, Sloc);
72 function Make_Integer_Literal (Sloc : Source_Ptr;
76 N : constant Node_Id :=
77 New_Node (N_Integer_Literal, Sloc);
79 Set_Intval (N, Intval);
81 end Make_Integer_Literal;
83 function Make_Real_Literal (Sloc : Source_Ptr;
87 N : constant Node_Id :=
88 New_Node (N_Real_Literal, Sloc);
90 Set_Realval (N, Realval);
92 end Make_Real_Literal;
94 function Make_Character_Literal (Sloc : Source_Ptr;
96 Char_Literal_Value : Char_Code)
99 N : constant Node_Id :=
100 New_Node (N_Character_Literal, Sloc);
102 Set_Chars (N, Chars);
103 Set_Char_Literal_Value (N, Char_Literal_Value);
105 end Make_Character_Literal;
107 function Make_String_Literal (Sloc : Source_Ptr;
111 N : constant Node_Id :=
112 New_Node (N_String_Literal, Sloc);
114 Set_Strval (N, Strval);
116 end Make_String_Literal;
118 function Make_Pragma (Sloc : Source_Ptr;
120 Pragma_Argument_Associations : List_Id := No_List;
121 Debug_Statement : Node_Id := Empty)
124 N : constant Node_Id :=
125 New_Node (N_Pragma, Sloc);
127 Set_Chars (N, Chars);
128 Set_Pragma_Argument_Associations
129 (N, Pragma_Argument_Associations);
130 Set_Debug_Statement (N, Debug_Statement);
134 function Make_Pragma_Argument_Association (Sloc : Source_Ptr;
135 Chars : Name_Id := No_Name;
136 Expression : Node_Id)
139 N : constant Node_Id :=
140 New_Node (N_Pragma_Argument_Association, Sloc);
142 Set_Chars (N, Chars);
143 Set_Expression (N, Expression);
145 end Make_Pragma_Argument_Association;
147 function Make_Defining_Identifier (Sloc : Source_Ptr;
151 N : constant Node_Id :=
152 New_Entity (N_Defining_Identifier, Sloc);
154 Set_Chars (N, Chars);
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)
164 N : constant Node_Id :=
165 New_Node (N_Full_Type_Declaration, Sloc);
167 Set_Defining_Identifier (N, Defining_Identifier);
168 Set_Discriminant_Specifications (N, Discriminant_Specifications);
169 Set_Type_Definition (N, Type_Definition);
171 end Make_Full_Type_Declaration;
173 function Make_Subtype_Declaration (Sloc : Source_Ptr;
174 Defining_Identifier : Node_Id;
175 Subtype_Indication : Node_Id)
178 N : constant Node_Id :=
179 New_Node (N_Subtype_Declaration, Sloc);
181 Set_Defining_Identifier (N, Defining_Identifier);
182 Set_Subtype_Indication (N, Subtype_Indication);
184 end Make_Subtype_Declaration;
186 function Make_Subtype_Indication (Sloc : Source_Ptr;
187 Subtype_Mark : Node_Id;
188 Constraint : Node_Id)
191 N : constant Node_Id :=
192 New_Node (N_Subtype_Indication, Sloc);
194 Set_Subtype_Mark (N, Subtype_Mark);
195 Set_Constraint (N, Constraint);
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)
207 N : constant Node_Id :=
208 New_Node (N_Object_Declaration, Sloc);
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);
216 end Make_Object_Declaration;
218 function Make_Number_Declaration (Sloc : Source_Ptr;
219 Defining_Identifier : Node_Id;
220 Expression : Node_Id)
223 N : constant Node_Id :=
224 New_Node (N_Number_Declaration, Sloc);
226 Set_Defining_Identifier (N, Defining_Identifier);
227 Set_Expression (N, Expression);
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)
237 N : constant Node_Id :=
238 New_Node (N_Derived_Type_Definition, Sloc);
240 Set_Abstract_Present (N, Abstract_Present);
241 Set_Subtype_Indication (N, Subtype_Indication);
242 Set_Record_Extension_Part (N, Record_Extension_Part);
244 end Make_Derived_Type_Definition;
246 function Make_Range_Constraint (Sloc : Source_Ptr;
247 Range_Expression : Node_Id)
250 N : constant Node_Id :=
251 New_Node (N_Range_Constraint, Sloc);
253 Set_Range_Expression (N, Range_Expression);
255 end Make_Range_Constraint;
257 function Make_Range (Sloc : Source_Ptr;
259 High_Bound : Node_Id;
260 Includes_Infinities : Boolean := False)
263 N : constant Node_Id :=
264 New_Node (N_Range, Sloc);
266 Set_Low_Bound (N, Low_Bound);
267 Set_High_Bound (N, High_Bound);
268 Set_Includes_Infinities (N, Includes_Infinities);
272 function Make_Enumeration_Type_Definition (Sloc : Source_Ptr;
274 End_Label : Node_Id := Empty)
277 N : constant Node_Id :=
278 New_Node (N_Enumeration_Type_Definition, Sloc);
280 Set_Literals (N, Literals);
281 Set_End_Label (N, End_Label);
283 end Make_Enumeration_Type_Definition;
285 function Make_Defining_Character_Literal (Sloc : Source_Ptr;
289 N : constant Node_Id :=
290 New_Entity (N_Defining_Character_Literal, Sloc);
292 Set_Chars (N, Chars);
294 end Make_Defining_Character_Literal;
296 function Make_Signed_Integer_Type_Definition (Sloc : Source_Ptr;
298 High_Bound : Node_Id)
301 N : constant Node_Id :=
302 New_Node (N_Signed_Integer_Type_Definition, Sloc);
304 Set_Low_Bound (N, Low_Bound);
305 Set_High_Bound (N, High_Bound);
307 end Make_Signed_Integer_Type_Definition;
309 function Make_Modular_Type_Definition (Sloc : Source_Ptr;
310 Expression : Node_Id)
313 N : constant Node_Id :=
314 New_Node (N_Modular_Type_Definition, Sloc);
316 Set_Expression (N, Expression);
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)
325 N : constant Node_Id :=
326 New_Node (N_Floating_Point_Definition, Sloc);
328 Set_Digits_Expression (N, Digits_Expression);
329 Set_Real_Range_Specification (N, Real_Range_Specification);
331 end Make_Floating_Point_Definition;
333 function Make_Real_Range_Specification (Sloc : Source_Ptr;
335 High_Bound : Node_Id)
338 N : constant Node_Id :=
339 New_Node (N_Real_Range_Specification, Sloc);
341 Set_Low_Bound (N, Low_Bound);
342 Set_High_Bound (N, High_Bound);
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)
351 N : constant Node_Id :=
352 New_Node (N_Ordinary_Fixed_Point_Definition, Sloc);
354 Set_Delta_Expression (N, Delta_Expression);
355 Set_Real_Range_Specification (N, Real_Range_Specification);
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)
365 N : constant Node_Id :=
366 New_Node (N_Decimal_Fixed_Point_Definition, Sloc);
368 Set_Delta_Expression (N, Delta_Expression);
369 Set_Digits_Expression (N, Digits_Expression);
370 Set_Real_Range_Specification (N, Real_Range_Specification);
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)
379 N : constant Node_Id :=
380 New_Node (N_Digits_Constraint, Sloc);
382 Set_Digits_Expression (N, Digits_Expression);
383 Set_Range_Constraint (N, Range_Constraint);
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)
393 N : constant Node_Id :=
394 New_Node (N_Unconstrained_Array_Definition, Sloc);
396 Set_Subtype_Marks (N, Subtype_Marks);
397 Set_Aliased_Present (N, Aliased_Present);
398 Set_Subtype_Indication (N, Subtype_Indication);
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)
408 N : constant Node_Id :=
409 New_Node (N_Constrained_Array_Definition, Sloc);
411 Set_Discrete_Subtype_Definitions
412 (N, Discrete_Subtype_Definitions);
413 Set_Aliased_Present (N, Aliased_Present);
414 Set_Subtype_Indication (N, Subtype_Indication);
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)
424 N : constant Node_Id :=
425 New_Node (N_Discriminant_Specification, Sloc);
427 Set_Defining_Identifier (N, Defining_Identifier);
428 Set_Discriminant_Type (N, Discriminant_Type);
429 Set_Expression (N, Expression);
431 end Make_Discriminant_Specification;
433 function Make_Index_Or_Discriminant_Constraint (Sloc : Source_Ptr;
434 Constraints : List_Id)
437 N : constant Node_Id :=
438 New_Node (N_Index_Or_Discriminant_Constraint, Sloc);
440 Set_Constraints (N, Constraints);
442 end Make_Index_Or_Discriminant_Constraint;
444 function Make_Discriminant_Association (Sloc : Source_Ptr;
445 Selector_Names : List_Id;
446 Expression : Node_Id)
449 N : constant Node_Id :=
450 New_Node (N_Discriminant_Association, Sloc);
452 Set_Selector_Names (N, Selector_Names);
453 Set_Expression (N, Expression);
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)
466 N : constant Node_Id :=
467 New_Node (N_Record_Definition, Sloc);
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);
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)
484 N : constant Node_Id :=
485 New_Node (N_Component_List, Sloc);
487 Set_Component_Items (N, Component_Items);
488 Set_Variant_Part (N, Variant_Part);
489 Set_Null_Present (N, Null_Present);
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)
500 N : constant Node_Id :=
501 New_Node (N_Component_Declaration, Sloc);
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);
508 end Make_Component_Declaration;
510 function Make_Variant_Part (Sloc : Source_Ptr;
515 N : constant Node_Id :=
516 New_Node (N_Variant_Part, Sloc);
519 Set_Variants (N, Variants);
521 end Make_Variant_Part;
523 function Make_Variant (Sloc : Source_Ptr;
524 Discrete_Choices : List_Id;
525 Component_List : Node_Id)
528 N : constant Node_Id :=
529 New_Node (N_Variant, Sloc);
531 Set_Discrete_Choices (N, Discrete_Choices);
532 Set_Component_List (N, Component_List);
536 function Make_Others_Choice (Sloc : Source_Ptr)
539 N : constant Node_Id :=
540 New_Node (N_Others_Choice, Sloc);
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)
551 N : constant Node_Id :=
552 New_Node (N_Access_To_Object_Definition, Sloc);
554 Set_All_Present (N, All_Present);
555 Set_Subtype_Indication (N, Subtype_Indication);
556 Set_Constant_Present (N, Constant_Present);
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)
566 N : constant Node_Id :=
567 New_Node (N_Access_Function_Definition, Sloc);
569 Set_Protected_Present (N, Protected_Present);
570 Set_Parameter_Specifications (N, Parameter_Specifications);
571 Set_Subtype_Mark (N, Subtype_Mark);
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)
580 N : constant Node_Id :=
581 New_Node (N_Access_Procedure_Definition, Sloc);
583 Set_Protected_Present (N, Protected_Present);
584 Set_Parameter_Specifications (N, Parameter_Specifications);
586 end Make_Access_Procedure_Definition;
588 function Make_Access_Definition (Sloc : Source_Ptr;
589 Subtype_Mark : Node_Id)
592 N : constant Node_Id :=
593 New_Node (N_Access_Definition, Sloc);
595 Set_Subtype_Mark (N, Subtype_Mark);
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)
605 N : constant Node_Id :=
606 New_Node (N_Incomplete_Type_Declaration, Sloc);
608 Set_Defining_Identifier (N, Defining_Identifier);
609 Set_Discriminant_Specifications (N, Discriminant_Specifications);
610 Set_Unknown_Discriminants_Present
611 (N, Unknown_Discriminants_Present);
613 end Make_Incomplete_Type_Declaration;
615 function Make_Explicit_Dereference (Sloc : Source_Ptr;
619 N : constant Node_Id :=
620 New_Node (N_Explicit_Dereference, Sloc);
622 Set_Prefix (N, Prefix);
624 end Make_Explicit_Dereference;
626 function Make_Indexed_Component (Sloc : Source_Ptr;
628 Expressions : List_Id)
631 N : constant Node_Id :=
632 New_Node (N_Indexed_Component, Sloc);
634 Set_Prefix (N, Prefix);
635 Set_Expressions (N, Expressions);
637 end Make_Indexed_Component;
639 function Make_Slice (Sloc : Source_Ptr;
641 Discrete_Range : Node_Id)
644 N : constant Node_Id :=
645 New_Node (N_Slice, Sloc);
647 Set_Prefix (N, Prefix);
648 Set_Discrete_Range (N, Discrete_Range);
652 function Make_Selected_Component (Sloc : Source_Ptr;
654 Selector_Name : Node_Id)
657 N : constant Node_Id :=
658 New_Node (N_Selected_Component, Sloc);
660 Set_Prefix (N, Prefix);
661 Set_Selector_Name (N, Selector_Name);
663 end Make_Selected_Component;
665 function Make_Attribute_Reference (Sloc : Source_Ptr;
667 Attribute_Name : Name_Id;
668 Expressions : List_Id := No_List;
669 Must_Be_Byte_Aligned : Boolean := False)
672 N : constant Node_Id :=
673 New_Node (N_Attribute_Reference, Sloc);
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);
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)
688 N : constant Node_Id :=
689 New_Node (N_Aggregate, Sloc);
691 Set_Expressions (N, Expressions);
692 Set_Component_Associations (N, Component_Associations);
693 Set_Null_Record_Present (N, Null_Record_Present);
697 function Make_Component_Association (Sloc : Source_Ptr;
699 Expression : Node_Id)
702 N : constant Node_Id :=
703 New_Node (N_Component_Association, Sloc);
705 Set_Choices (N, Choices);
706 Set_Expression (N, Expression);
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)
717 N : constant Node_Id :=
718 New_Node (N_Extension_Aggregate, Sloc);
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);
725 end Make_Extension_Aggregate;
727 function Make_Null (Sloc : Source_Ptr)
730 N : constant Node_Id :=
731 New_Node (N_Null, Sloc);
736 function Make_And_Then (Sloc : Source_Ptr;
738 Right_Opnd : Node_Id)
741 N : constant Node_Id :=
742 New_Node (N_And_Then, Sloc);
744 Set_Left_Opnd (N, Left_Opnd);
745 Set_Right_Opnd (N, Right_Opnd);
749 function Make_Or_Else (Sloc : Source_Ptr;
751 Right_Opnd : Node_Id)
754 N : constant Node_Id :=
755 New_Node (N_Or_Else, Sloc);
757 Set_Left_Opnd (N, Left_Opnd);
758 Set_Right_Opnd (N, Right_Opnd);
762 function Make_In (Sloc : Source_Ptr;
764 Right_Opnd : Node_Id)
767 N : constant Node_Id :=
768 New_Node (N_In, Sloc);
770 Set_Left_Opnd (N, Left_Opnd);
771 Set_Right_Opnd (N, Right_Opnd);
775 function Make_Not_In (Sloc : Source_Ptr;
777 Right_Opnd : Node_Id)
780 N : constant Node_Id :=
781 New_Node (N_Not_In, Sloc);
783 Set_Left_Opnd (N, Left_Opnd);
784 Set_Right_Opnd (N, Right_Opnd);
788 function Make_Op_And (Sloc : Source_Ptr;
790 Right_Opnd : Node_Id)
793 N : constant Node_Id :=
794 New_Node (N_Op_And, Sloc);
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);
803 function Make_Op_Or (Sloc : Source_Ptr;
805 Right_Opnd : Node_Id)
808 N : constant Node_Id :=
809 New_Node (N_Op_Or, Sloc);
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);
818 function Make_Op_Xor (Sloc : Source_Ptr;
820 Right_Opnd : Node_Id)
823 N : constant Node_Id :=
824 New_Node (N_Op_Xor, Sloc);
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);
833 function Make_Op_Eq (Sloc : Source_Ptr;
835 Right_Opnd : Node_Id)
838 N : constant Node_Id :=
839 New_Node (N_Op_Eq, Sloc);
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);
848 function Make_Op_Ne (Sloc : Source_Ptr;
850 Right_Opnd : Node_Id)
853 N : constant Node_Id :=
854 New_Node (N_Op_Ne, Sloc);
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);
863 function Make_Op_Lt (Sloc : Source_Ptr;
865 Right_Opnd : Node_Id)
868 N : constant Node_Id :=
869 New_Node (N_Op_Lt, Sloc);
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);
878 function Make_Op_Le (Sloc : Source_Ptr;
880 Right_Opnd : Node_Id)
883 N : constant Node_Id :=
884 New_Node (N_Op_Le, Sloc);
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);
893 function Make_Op_Gt (Sloc : Source_Ptr;
895 Right_Opnd : Node_Id)
898 N : constant Node_Id :=
899 New_Node (N_Op_Gt, Sloc);
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);
908 function Make_Op_Ge (Sloc : Source_Ptr;
910 Right_Opnd : Node_Id)
913 N : constant Node_Id :=
914 New_Node (N_Op_Ge, Sloc);
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);
923 function Make_Op_Add (Sloc : Source_Ptr;
925 Right_Opnd : Node_Id)
928 N : constant Node_Id :=
929 New_Node (N_Op_Add, Sloc);
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);
938 function Make_Op_Subtract (Sloc : Source_Ptr;
940 Right_Opnd : Node_Id)
943 N : constant Node_Id :=
944 New_Node (N_Op_Subtract, Sloc);
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);
951 end Make_Op_Subtract;
953 function Make_Op_Concat (Sloc : Source_Ptr;
955 Right_Opnd : Node_Id)
958 N : constant Node_Id :=
959 New_Node (N_Op_Concat, Sloc);
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);
968 function Make_Op_Multiply (Sloc : Source_Ptr;
970 Right_Opnd : Node_Id)
973 N : constant Node_Id :=
974 New_Node (N_Op_Multiply, Sloc);
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);
981 end Make_Op_Multiply;
983 function Make_Op_Divide (Sloc : Source_Ptr;
985 Right_Opnd : Node_Id)
988 N : constant Node_Id :=
989 New_Node (N_Op_Divide, Sloc);
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);
998 function Make_Op_Mod (Sloc : Source_Ptr;
1000 Right_Opnd : Node_Id)
1003 N : constant Node_Id :=
1004 New_Node (N_Op_Mod, Sloc);
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);
1013 function Make_Op_Rem (Sloc : Source_Ptr;
1014 Left_Opnd : Node_Id;
1015 Right_Opnd : Node_Id)
1018 N : constant Node_Id :=
1019 New_Node (N_Op_Rem, Sloc);
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);
1028 function Make_Op_Expon (Sloc : Source_Ptr;
1029 Left_Opnd : Node_Id;
1030 Right_Opnd : Node_Id)
1033 N : constant Node_Id :=
1034 New_Node (N_Op_Expon, Sloc);
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);
1043 function Make_Op_Plus (Sloc : Source_Ptr;
1044 Right_Opnd : Node_Id)
1047 N : constant Node_Id :=
1048 New_Node (N_Op_Plus, Sloc);
1050 Set_Right_Opnd (N, Right_Opnd);
1051 Set_Chars (N, Name_Op_Add);
1052 Set_Entity (N, Standard_Op_Plus);
1056 function Make_Op_Minus (Sloc : Source_Ptr;
1057 Right_Opnd : Node_Id)
1060 N : constant Node_Id :=
1061 New_Node (N_Op_Minus, Sloc);
1063 Set_Right_Opnd (N, Right_Opnd);
1064 Set_Chars (N, Name_Op_Subtract);
1065 Set_Entity (N, Standard_Op_Minus);
1069 function Make_Op_Abs (Sloc : Source_Ptr;
1070 Right_Opnd : Node_Id)
1073 N : constant Node_Id :=
1074 New_Node (N_Op_Abs, Sloc);
1076 Set_Right_Opnd (N, Right_Opnd);
1077 Set_Chars (N, Name_Op_Abs);
1078 Set_Entity (N, Standard_Op_Abs);
1082 function Make_Op_Not (Sloc : Source_Ptr;
1083 Right_Opnd : Node_Id)
1086 N : constant Node_Id :=
1087 New_Node (N_Op_Not, Sloc);
1089 Set_Right_Opnd (N, Right_Opnd);
1090 Set_Chars (N, Name_Op_Not);
1091 Set_Entity (N, Standard_Op_Not);
1095 function Make_Type_Conversion (Sloc : Source_Ptr;
1096 Subtype_Mark : Node_Id;
1097 Expression : Node_Id)
1100 N : constant Node_Id :=
1101 New_Node (N_Type_Conversion, Sloc);
1103 Set_Subtype_Mark (N, Subtype_Mark);
1104 Set_Expression (N, Expression);
1106 end Make_Type_Conversion;
1108 function Make_Qualified_Expression (Sloc : Source_Ptr;
1109 Subtype_Mark : Node_Id;
1110 Expression : Node_Id)
1113 N : constant Node_Id :=
1114 New_Node (N_Qualified_Expression, Sloc);
1116 Set_Subtype_Mark (N, Subtype_Mark);
1117 Set_Expression (N, Expression);
1119 end Make_Qualified_Expression;
1121 function Make_Allocator (Sloc : Source_Ptr;
1122 Expression : Node_Id)
1125 N : constant Node_Id :=
1126 New_Node (N_Allocator, Sloc);
1128 Set_Expression (N, Expression);
1132 function Make_Null_Statement (Sloc : Source_Ptr)
1135 N : constant Node_Id :=
1136 New_Node (N_Null_Statement, Sloc);
1139 end Make_Null_Statement;
1141 function Make_Label (Sloc : Source_Ptr;
1142 Identifier : Node_Id)
1145 N : constant Node_Id :=
1146 New_Node (N_Label, Sloc);
1148 Set_Identifier (N, Identifier);
1152 function Make_Assignment_Statement (Sloc : Source_Ptr;
1154 Expression : Node_Id)
1157 N : constant Node_Id :=
1158 New_Node (N_Assignment_Statement, Sloc);
1161 Set_Expression (N, Expression);
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)
1173 N : constant Node_Id :=
1174 New_Node (N_If_Statement, Sloc);
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);
1182 end Make_If_Statement;
1184 function Make_Elsif_Part (Sloc : Source_Ptr;
1185 Condition : Node_Id;
1186 Then_Statements : List_Id)
1189 N : constant Node_Id :=
1190 New_Node (N_Elsif_Part, Sloc);
1192 Set_Condition (N, Condition);
1193 Set_Then_Statements (N, Then_Statements);
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)
1203 N : constant Node_Id :=
1204 New_Node (N_Case_Statement, Sloc);
1206 Set_Expression (N, Expression);
1207 Set_Alternatives (N, Alternatives);
1208 Set_End_Span (N, End_Span);
1210 end Make_Case_Statement;
1212 function Make_Case_Statement_Alternative (Sloc : Source_Ptr;
1213 Discrete_Choices : List_Id;
1214 Statements : List_Id)
1217 N : constant Node_Id :=
1218 New_Node (N_Case_Statement_Alternative, Sloc);
1220 Set_Discrete_Choices (N, Discrete_Choices);
1221 Set_Statements (N, Statements);
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)
1233 N : constant Node_Id :=
1234 New_Node (N_Loop_Statement, Sloc);
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);
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)
1249 N : constant Node_Id :=
1250 New_Node (N_Iteration_Scheme, Sloc);
1252 Set_Condition (N, Condition);
1253 Set_Loop_Parameter_Specification
1254 (N, Loop_Parameter_Specification);
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)
1264 N : constant Node_Id :=
1265 New_Node (N_Loop_Parameter_Specification, Sloc);
1267 Set_Defining_Identifier (N, Defining_Identifier);
1268 Set_Reverse_Present (N, Reverse_Present);
1269 Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
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)
1282 N : constant Node_Id :=
1283 New_Node (N_Block_Statement, Sloc);
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);
1292 end Make_Block_Statement;
1294 function Make_Exit_Statement (Sloc : Source_Ptr;
1295 Name : Node_Id := Empty;
1296 Condition : Node_Id := Empty)
1299 N : constant Node_Id :=
1300 New_Node (N_Exit_Statement, Sloc);
1303 Set_Condition (N, Condition);
1305 end Make_Exit_Statement;
1307 function Make_Goto_Statement (Sloc : Source_Ptr;
1311 N : constant Node_Id :=
1312 New_Node (N_Goto_Statement, Sloc);
1316 end Make_Goto_Statement;
1318 function Make_Subprogram_Declaration (Sloc : Source_Ptr;
1319 Specification : Node_Id)
1322 N : constant Node_Id :=
1323 New_Node (N_Subprogram_Declaration, Sloc);
1325 Set_Specification (N, Specification);
1327 end Make_Subprogram_Declaration;
1329 function Make_Abstract_Subprogram_Declaration (Sloc : Source_Ptr;
1330 Specification : Node_Id)
1333 N : constant Node_Id :=
1334 New_Node (N_Abstract_Subprogram_Declaration, Sloc);
1336 Set_Specification (N, Specification);
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)
1346 N : constant Node_Id :=
1347 New_Node (N_Function_Specification, Sloc);
1349 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1350 Set_Parameter_Specifications (N, Parameter_Specifications);
1351 Set_Subtype_Mark (N, Subtype_Mark);
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)
1360 N : constant Node_Id :=
1361 New_Node (N_Procedure_Specification, Sloc);
1363 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1364 Set_Parameter_Specifications (N, Parameter_Specifications);
1366 end Make_Procedure_Specification;
1368 function Make_Designator (Sloc : Source_Ptr;
1370 Identifier : Node_Id)
1373 N : constant Node_Id :=
1374 New_Node (N_Designator, Sloc);
1377 Set_Identifier (N, Identifier);
1379 end Make_Designator;
1381 function Make_Defining_Program_Unit_Name (Sloc : Source_Ptr;
1383 Defining_Identifier : Node_Id)
1386 N : constant Node_Id :=
1387 New_Node (N_Defining_Program_Unit_Name, Sloc);
1390 Set_Defining_Identifier (N, Defining_Identifier);
1392 end Make_Defining_Program_Unit_Name;
1394 function Make_Operator_Symbol (Sloc : Source_Ptr;
1399 N : constant Node_Id :=
1400 New_Node (N_Operator_Symbol, Sloc);
1402 Set_Chars (N, Chars);
1403 Set_Strval (N, Strval);
1405 end Make_Operator_Symbol;
1407 function Make_Defining_Operator_Symbol (Sloc : Source_Ptr;
1411 N : constant Node_Id :=
1412 New_Entity (N_Defining_Operator_Symbol, Sloc);
1414 Set_Chars (N, Chars);
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)
1426 N : constant Node_Id :=
1427 New_Node (N_Parameter_Specification, Sloc);
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);
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)
1444 N : constant Node_Id :=
1445 New_Node (N_Subprogram_Body, Sloc);
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);
1452 end Make_Subprogram_Body;
1454 function Make_Procedure_Call_Statement (Sloc : Source_Ptr;
1456 Parameter_Associations : List_Id := No_List)
1459 N : constant Node_Id :=
1460 New_Node (N_Procedure_Call_Statement, Sloc);
1463 Set_Parameter_Associations (N, Parameter_Associations);
1465 end Make_Procedure_Call_Statement;
1467 function Make_Function_Call (Sloc : Source_Ptr;
1469 Parameter_Associations : List_Id := No_List)
1472 N : constant Node_Id :=
1473 New_Node (N_Function_Call, Sloc);
1476 Set_Parameter_Associations (N, Parameter_Associations);
1478 end Make_Function_Call;
1480 function Make_Parameter_Association (Sloc : Source_Ptr;
1481 Selector_Name : Node_Id;
1482 Explicit_Actual_Parameter : Node_Id)
1485 N : constant Node_Id :=
1486 New_Node (N_Parameter_Association, Sloc);
1488 Set_Selector_Name (N, Selector_Name);
1489 Set_Explicit_Actual_Parameter (N, Explicit_Actual_Parameter);
1491 end Make_Parameter_Association;
1493 function Make_Return_Statement (Sloc : Source_Ptr;
1494 Expression : Node_Id := Empty)
1497 N : constant Node_Id :=
1498 New_Node (N_Return_Statement, Sloc);
1500 Set_Expression (N, Expression);
1502 end Make_Return_Statement;
1504 function Make_Package_Declaration (Sloc : Source_Ptr;
1505 Specification : Node_Id)
1508 N : constant Node_Id :=
1509 New_Node (N_Package_Declaration, Sloc);
1511 Set_Specification (N, Specification);
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)
1522 N : constant Node_Id :=
1523 New_Node (N_Package_Specification, Sloc);
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);
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)
1538 N : constant Node_Id :=
1539 New_Node (N_Package_Body, Sloc);
1541 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1542 Set_Declarations (N, Declarations);
1543 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
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)
1556 N : constant Node_Id :=
1557 New_Node (N_Private_Type_Declaration, Sloc);
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);
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)
1577 N : constant Node_Id :=
1578 New_Node (N_Private_Extension_Declaration, Sloc);
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);
1587 end Make_Private_Extension_Declaration;
1589 function Make_Use_Package_Clause (Sloc : Source_Ptr;
1593 N : constant Node_Id :=
1594 New_Node (N_Use_Package_Clause, Sloc);
1596 Set_Names (N, Names);
1598 end Make_Use_Package_Clause;
1600 function Make_Use_Type_Clause (Sloc : Source_Ptr;
1601 Subtype_Marks : List_Id)
1604 N : constant Node_Id :=
1605 New_Node (N_Use_Type_Clause, Sloc);
1607 Set_Subtype_Marks (N, Subtype_Marks);
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;
1617 N : constant Node_Id :=
1618 New_Node (N_Object_Renaming_Declaration, Sloc);
1620 Set_Defining_Identifier (N, Defining_Identifier);
1621 Set_Subtype_Mark (N, Subtype_Mark);
1624 end Make_Object_Renaming_Declaration;
1626 function Make_Exception_Renaming_Declaration (Sloc : Source_Ptr;
1627 Defining_Identifier : Node_Id;
1631 N : constant Node_Id :=
1632 New_Node (N_Exception_Renaming_Declaration, Sloc);
1634 Set_Defining_Identifier (N, Defining_Identifier);
1637 end Make_Exception_Renaming_Declaration;
1639 function Make_Package_Renaming_Declaration (Sloc : Source_Ptr;
1640 Defining_Unit_Name : Node_Id;
1644 N : constant Node_Id :=
1645 New_Node (N_Package_Renaming_Declaration, Sloc);
1647 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1650 end Make_Package_Renaming_Declaration;
1652 function Make_Subprogram_Renaming_Declaration (Sloc : Source_Ptr;
1653 Specification : Node_Id;
1657 N : constant Node_Id :=
1658 New_Node (N_Subprogram_Renaming_Declaration, Sloc);
1660 Set_Specification (N, Specification);
1663 end Make_Subprogram_Renaming_Declaration;
1665 function Make_Generic_Package_Renaming_Declaration (Sloc : Source_Ptr;
1666 Defining_Unit_Name : Node_Id;
1670 N : constant Node_Id :=
1671 New_Node (N_Generic_Package_Renaming_Declaration, Sloc);
1673 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1676 end Make_Generic_Package_Renaming_Declaration;
1678 function Make_Generic_Procedure_Renaming_Declaration (Sloc : Source_Ptr;
1679 Defining_Unit_Name : Node_Id;
1683 N : constant Node_Id :=
1684 New_Node (N_Generic_Procedure_Renaming_Declaration, Sloc);
1686 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1689 end Make_Generic_Procedure_Renaming_Declaration;
1691 function Make_Generic_Function_Renaming_Declaration (Sloc : Source_Ptr;
1692 Defining_Unit_Name : Node_Id;
1696 N : constant Node_Id :=
1697 New_Node (N_Generic_Function_Renaming_Declaration, Sloc);
1699 Set_Defining_Unit_Name (N, Defining_Unit_Name);
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)
1710 N : constant Node_Id :=
1711 New_Node (N_Task_Type_Declaration, Sloc);
1713 Set_Defining_Identifier (N, Defining_Identifier);
1714 Set_Discriminant_Specifications (N, Discriminant_Specifications);
1715 Set_Task_Definition (N, Task_Definition);
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)
1724 N : constant Node_Id :=
1725 New_Node (N_Single_Task_Declaration, Sloc);
1727 Set_Defining_Identifier (N, Defining_Identifier);
1728 Set_Task_Definition (N, Task_Definition);
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)
1738 N : constant Node_Id :=
1739 New_Node (N_Task_Definition, Sloc);
1741 Set_Visible_Declarations (N, Visible_Declarations);
1742 Set_Private_Declarations (N, Private_Declarations);
1743 Set_End_Label (N, End_Label);
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)
1753 N : constant Node_Id :=
1754 New_Node (N_Task_Body, Sloc);
1756 Set_Defining_Identifier (N, Defining_Identifier);
1757 Set_Declarations (N, Declarations);
1758 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
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)
1768 N : constant Node_Id :=
1769 New_Node (N_Protected_Type_Declaration, Sloc);
1771 Set_Defining_Identifier (N, Defining_Identifier);
1772 Set_Discriminant_Specifications (N, Discriminant_Specifications);
1773 Set_Protected_Definition (N, Protected_Definition);
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)
1782 N : constant Node_Id :=
1783 New_Node (N_Single_Protected_Declaration, Sloc);
1785 Set_Defining_Identifier (N, Defining_Identifier);
1786 Set_Protected_Definition (N, Protected_Definition);
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)
1796 N : constant Node_Id :=
1797 New_Node (N_Protected_Definition, Sloc);
1799 Set_Visible_Declarations (N, Visible_Declarations);
1800 Set_Private_Declarations (N, Private_Declarations);
1801 Set_End_Label (N, End_Label);
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)
1811 N : constant Node_Id :=
1812 New_Node (N_Protected_Body, Sloc);
1814 Set_Defining_Identifier (N, Defining_Identifier);
1815 Set_Declarations (N, Declarations);
1816 Set_End_Label (N, End_Label);
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)
1826 N : constant Node_Id :=
1827 New_Node (N_Entry_Declaration, Sloc);
1829 Set_Defining_Identifier (N, Defining_Identifier);
1830 Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
1831 Set_Parameter_Specifications (N, Parameter_Specifications);
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)
1843 N : constant Node_Id :=
1844 New_Node (N_Accept_Statement, Sloc);
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);
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)
1861 N : constant Node_Id :=
1862 New_Node (N_Entry_Body, Sloc);
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);
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)
1877 N : constant Node_Id :=
1878 New_Node (N_Entry_Body_Formal_Part, Sloc);
1880 Set_Entry_Index_Specification (N, Entry_Index_Specification);
1881 Set_Parameter_Specifications (N, Parameter_Specifications);
1882 Set_Condition (N, Condition);
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)
1891 N : constant Node_Id :=
1892 New_Node (N_Entry_Index_Specification, Sloc);
1894 Set_Defining_Identifier (N, Defining_Identifier);
1895 Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
1897 end Make_Entry_Index_Specification;
1899 function Make_Entry_Call_Statement (Sloc : Source_Ptr;
1901 Parameter_Associations : List_Id := No_List)
1904 N : constant Node_Id :=
1905 New_Node (N_Entry_Call_Statement, Sloc);
1908 Set_Parameter_Associations (N, Parameter_Associations);
1910 end Make_Entry_Call_Statement;
1912 function Make_Requeue_Statement (Sloc : Source_Ptr;
1914 Abort_Present : Boolean := False)
1917 N : constant Node_Id :=
1918 New_Node (N_Requeue_Statement, Sloc);
1921 Set_Abort_Present (N, Abort_Present);
1923 end Make_Requeue_Statement;
1925 function Make_Delay_Until_Statement (Sloc : Source_Ptr;
1926 Expression : Node_Id)
1929 N : constant Node_Id :=
1930 New_Node (N_Delay_Until_Statement, Sloc);
1932 Set_Expression (N, Expression);
1934 end Make_Delay_Until_Statement;
1936 function Make_Delay_Relative_Statement (Sloc : Source_Ptr;
1937 Expression : Node_Id)
1940 N : constant Node_Id :=
1941 New_Node (N_Delay_Relative_Statement, Sloc);
1943 Set_Expression (N, Expression);
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)
1952 N : constant Node_Id :=
1953 New_Node (N_Selective_Accept, Sloc);
1955 Set_Select_Alternatives (N, Select_Alternatives);
1956 Set_Else_Statements (N, Else_Statements);
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)
1967 N : constant Node_Id :=
1968 New_Node (N_Accept_Alternative, Sloc);
1970 Set_Accept_Statement (N, Accept_Statement);
1971 Set_Condition (N, Condition);
1972 Set_Statements (N, Statements);
1973 Set_Pragmas_Before (N, Pragmas_Before);
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)
1984 N : constant Node_Id :=
1985 New_Node (N_Delay_Alternative, Sloc);
1987 Set_Delay_Statement (N, Delay_Statement);
1988 Set_Condition (N, Condition);
1989 Set_Statements (N, Statements);
1990 Set_Pragmas_Before (N, Pragmas_Before);
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)
2000 N : constant Node_Id :=
2001 New_Node (N_Terminate_Alternative, Sloc);
2003 Set_Condition (N, Condition);
2004 Set_Pragmas_Before (N, Pragmas_Before);
2005 Set_Pragmas_After (N, Pragmas_After);
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)
2014 N : constant Node_Id :=
2015 New_Node (N_Timed_Entry_Call, Sloc);
2017 Set_Entry_Call_Alternative (N, Entry_Call_Alternative);
2018 Set_Delay_Alternative (N, Delay_Alternative);
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)
2028 N : constant Node_Id :=
2029 New_Node (N_Entry_Call_Alternative, Sloc);
2031 Set_Entry_Call_Statement (N, Entry_Call_Statement);
2032 Set_Statements (N, Statements);
2033 Set_Pragmas_Before (N, Pragmas_Before);
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)
2042 N : constant Node_Id :=
2043 New_Node (N_Conditional_Entry_Call, Sloc);
2045 Set_Entry_Call_Alternative (N, Entry_Call_Alternative);
2046 Set_Else_Statements (N, Else_Statements);
2048 end Make_Conditional_Entry_Call;
2050 function Make_Asynchronous_Select (Sloc : Source_Ptr;
2051 Triggering_Alternative : Node_Id;
2052 Abortable_Part : Node_Id)
2055 N : constant Node_Id :=
2056 New_Node (N_Asynchronous_Select, Sloc);
2058 Set_Triggering_Alternative (N, Triggering_Alternative);
2059 Set_Abortable_Part (N, Abortable_Part);
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)
2069 N : constant Node_Id :=
2070 New_Node (N_Triggering_Alternative, Sloc);
2072 Set_Triggering_Statement (N, Triggering_Statement);
2073 Set_Statements (N, Statements);
2074 Set_Pragmas_Before (N, Pragmas_Before);
2076 end Make_Triggering_Alternative;
2078 function Make_Abortable_Part (Sloc : Source_Ptr;
2079 Statements : List_Id)
2082 N : constant Node_Id :=
2083 New_Node (N_Abortable_Part, Sloc);
2085 Set_Statements (N, Statements);
2087 end Make_Abortable_Part;
2089 function Make_Abort_Statement (Sloc : Source_Ptr;
2093 N : constant Node_Id :=
2094 New_Node (N_Abort_Statement, Sloc);
2096 Set_Names (N, Names);
2098 end Make_Abort_Statement;
2100 function Make_Compilation_Unit (Sloc : Source_Ptr;
2101 Context_Items : List_Id;
2102 Private_Present : Boolean := False;
2104 Aux_Decls_Node : Node_Id)
2107 N : constant Node_Id :=
2108 New_Node (N_Compilation_Unit, Sloc);
2110 Set_Context_Items (N, Context_Items);
2111 Set_Private_Present (N, Private_Present);
2113 Set_Aux_Decls_Node (N, Aux_Decls_Node);
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)
2123 N : constant Node_Id :=
2124 New_Node (N_Compilation_Unit_Aux, Sloc);
2126 Set_Declarations (N, Declarations);
2127 Set_Actions (N, Actions);
2128 Set_Pragmas_After (N, Pragmas_After);
2130 end Make_Compilation_Unit_Aux;
2132 function Make_With_Clause (Sloc : Source_Ptr;
2134 First_Name : Boolean := True;
2135 Last_Name : Boolean := True)
2138 N : constant Node_Id :=
2139 New_Node (N_With_Clause, Sloc);
2142 Set_First_Name (N, First_Name);
2143 Set_Last_Name (N, Last_Name);
2145 end Make_With_Clause;
2147 function Make_With_Type_Clause (Sloc : Source_Ptr;
2149 Tagged_Present : Boolean := False)
2152 N : constant Node_Id :=
2153 New_Node (N_With_Type_Clause, Sloc);
2156 Set_Tagged_Present (N, Tagged_Present);
2158 end Make_With_Type_Clause;
2160 function Make_Subprogram_Body_Stub (Sloc : Source_Ptr;
2161 Specification : Node_Id)
2164 N : constant Node_Id :=
2165 New_Node (N_Subprogram_Body_Stub, Sloc);
2167 Set_Specification (N, Specification);
2169 end Make_Subprogram_Body_Stub;
2171 function Make_Package_Body_Stub (Sloc : Source_Ptr;
2172 Defining_Identifier : Node_Id)
2175 N : constant Node_Id :=
2176 New_Node (N_Package_Body_Stub, Sloc);
2178 Set_Defining_Identifier (N, Defining_Identifier);
2180 end Make_Package_Body_Stub;
2182 function Make_Task_Body_Stub (Sloc : Source_Ptr;
2183 Defining_Identifier : Node_Id)
2186 N : constant Node_Id :=
2187 New_Node (N_Task_Body_Stub, Sloc);
2189 Set_Defining_Identifier (N, Defining_Identifier);
2191 end Make_Task_Body_Stub;
2193 function Make_Protected_Body_Stub (Sloc : Source_Ptr;
2194 Defining_Identifier : Node_Id)
2197 N : constant Node_Id :=
2198 New_Node (N_Protected_Body_Stub, Sloc);
2200 Set_Defining_Identifier (N, Defining_Identifier);
2202 end Make_Protected_Body_Stub;
2204 function Make_Subunit (Sloc : Source_Ptr;
2206 Proper_Body : Node_Id)
2209 N : constant Node_Id :=
2210 New_Node (N_Subunit, Sloc);
2213 Set_Proper_Body (N, Proper_Body);
2217 function Make_Exception_Declaration (Sloc : Source_Ptr;
2218 Defining_Identifier : Node_Id)
2221 N : constant Node_Id :=
2222 New_Node (N_Exception_Declaration, Sloc);
2224 Set_Defining_Identifier (N, Defining_Identifier);
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)
2235 N : constant Node_Id :=
2236 New_Node (N_Handled_Sequence_Of_Statements, Sloc);
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);
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)
2251 N : constant Node_Id :=
2252 New_Node (N_Exception_Handler, Sloc);
2254 Set_Choice_Parameter (N, Choice_Parameter);
2255 Set_Exception_Choices (N, Exception_Choices);
2256 Set_Statements (N, Statements);
2258 end Make_Exception_Handler;
2260 function Make_Raise_Statement (Sloc : Source_Ptr;
2261 Name : Node_Id := Empty)
2264 N : constant Node_Id :=
2265 New_Node (N_Raise_Statement, Sloc);
2269 end Make_Raise_Statement;
2271 function Make_Generic_Subprogram_Declaration (Sloc : Source_Ptr;
2272 Specification : Node_Id;
2273 Generic_Formal_Declarations : List_Id)
2276 N : constant Node_Id :=
2277 New_Node (N_Generic_Subprogram_Declaration, Sloc);
2279 Set_Specification (N, Specification);
2280 Set_Generic_Formal_Declarations (N, Generic_Formal_Declarations);
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)
2289 N : constant Node_Id :=
2290 New_Node (N_Generic_Package_Declaration, Sloc);
2292 Set_Specification (N, Specification);
2293 Set_Generic_Formal_Declarations (N, Generic_Formal_Declarations);
2295 end Make_Generic_Package_Declaration;
2297 function Make_Package_Instantiation (Sloc : Source_Ptr;
2298 Defining_Unit_Name : Node_Id;
2300 Generic_Associations : List_Id := No_List)
2303 N : constant Node_Id :=
2304 New_Node (N_Package_Instantiation, Sloc);
2306 Set_Defining_Unit_Name (N, Defining_Unit_Name);
2308 Set_Generic_Associations (N, Generic_Associations);
2310 end Make_Package_Instantiation;
2312 function Make_Procedure_Instantiation (Sloc : Source_Ptr;
2313 Defining_Unit_Name : Node_Id;
2315 Generic_Associations : List_Id := No_List)
2318 N : constant Node_Id :=
2319 New_Node (N_Procedure_Instantiation, Sloc);
2321 Set_Defining_Unit_Name (N, Defining_Unit_Name);
2323 Set_Generic_Associations (N, Generic_Associations);
2325 end Make_Procedure_Instantiation;
2327 function Make_Function_Instantiation (Sloc : Source_Ptr;
2328 Defining_Unit_Name : Node_Id;
2330 Generic_Associations : List_Id := No_List)
2333 N : constant Node_Id :=
2334 New_Node (N_Function_Instantiation, Sloc);
2336 Set_Defining_Unit_Name (N, Defining_Unit_Name);
2338 Set_Generic_Associations (N, Generic_Associations);
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)
2347 N : constant Node_Id :=
2348 New_Node (N_Generic_Association, Sloc);
2350 Set_Selector_Name (N, Selector_Name);
2351 Set_Explicit_Generic_Actual_Parameter
2352 (N, Explicit_Generic_Actual_Parameter);
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)
2364 N : constant Node_Id :=
2365 New_Node (N_Formal_Object_Declaration, Sloc);
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);
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)
2382 N : constant Node_Id :=
2383 New_Node (N_Formal_Type_Declaration, Sloc);
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);
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)
2399 N : constant Node_Id :=
2400 New_Node (N_Formal_Private_Type_Definition, Sloc);
2402 Set_Abstract_Present (N, Abstract_Present);
2403 Set_Tagged_Present (N, Tagged_Present);
2404 Set_Limited_Present (N, Limited_Present);
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)
2414 N : constant Node_Id :=
2415 New_Node (N_Formal_Derived_Type_Definition, Sloc);
2417 Set_Subtype_Mark (N, Subtype_Mark);
2418 Set_Private_Present (N, Private_Present);
2419 Set_Abstract_Present (N, Abstract_Present);
2421 end Make_Formal_Derived_Type_Definition;
2423 function Make_Formal_Discrete_Type_Definition (Sloc : Source_Ptr)
2426 N : constant Node_Id :=
2427 New_Node (N_Formal_Discrete_Type_Definition, Sloc);
2430 end Make_Formal_Discrete_Type_Definition;
2432 function Make_Formal_Signed_Integer_Type_Definition (Sloc : Source_Ptr)
2435 N : constant Node_Id :=
2436 New_Node (N_Formal_Signed_Integer_Type_Definition, Sloc);
2439 end Make_Formal_Signed_Integer_Type_Definition;
2441 function Make_Formal_Modular_Type_Definition (Sloc : Source_Ptr)
2444 N : constant Node_Id :=
2445 New_Node (N_Formal_Modular_Type_Definition, Sloc);
2448 end Make_Formal_Modular_Type_Definition;
2450 function Make_Formal_Floating_Point_Definition (Sloc : Source_Ptr)
2453 N : constant Node_Id :=
2454 New_Node (N_Formal_Floating_Point_Definition, Sloc);
2457 end Make_Formal_Floating_Point_Definition;
2459 function Make_Formal_Ordinary_Fixed_Point_Definition (Sloc : Source_Ptr)
2462 N : constant Node_Id :=
2463 New_Node (N_Formal_Ordinary_Fixed_Point_Definition, Sloc);
2466 end Make_Formal_Ordinary_Fixed_Point_Definition;
2468 function Make_Formal_Decimal_Fixed_Point_Definition (Sloc : Source_Ptr)
2471 N : constant Node_Id :=
2472 New_Node (N_Formal_Decimal_Fixed_Point_Definition, Sloc);
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)
2483 N : constant Node_Id :=
2484 New_Node (N_Formal_Subprogram_Declaration, Sloc);
2486 Set_Specification (N, Specification);
2487 Set_Default_Name (N, Default_Name);
2488 Set_Box_Present (N, Box_Present);
2490 end Make_Formal_Subprogram_Declaration;
2492 function Make_Formal_Package_Declaration (Sloc : Source_Ptr;
2493 Defining_Identifier : Node_Id;
2495 Generic_Associations : List_Id := No_List;
2496 Box_Present : Boolean := False)
2499 N : constant Node_Id :=
2500 New_Node (N_Formal_Package_Declaration, Sloc);
2502 Set_Defining_Identifier (N, Defining_Identifier);
2504 Set_Generic_Associations (N, Generic_Associations);
2505 Set_Box_Present (N, Box_Present);
2507 end Make_Formal_Package_Declaration;
2509 function Make_Attribute_Definition_Clause (Sloc : Source_Ptr;
2512 Expression : Node_Id)
2515 N : constant Node_Id :=
2516 New_Node (N_Attribute_Definition_Clause, Sloc);
2519 Set_Chars (N, Chars);
2520 Set_Expression (N, Expression);
2522 end Make_Attribute_Definition_Clause;
2524 function Make_Enumeration_Representation_Clause (Sloc : Source_Ptr;
2525 Identifier : Node_Id;
2526 Array_Aggregate : Node_Id)
2529 N : constant Node_Id :=
2530 New_Node (N_Enumeration_Representation_Clause, Sloc);
2532 Set_Identifier (N, Identifier);
2533 Set_Array_Aggregate (N, Array_Aggregate);
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)
2543 N : constant Node_Id :=
2544 New_Node (N_Record_Representation_Clause, Sloc);
2546 Set_Identifier (N, Identifier);
2547 Set_Mod_Clause (N, Mod_Clause);
2548 Set_Component_Clauses (N, Component_Clauses);
2550 end Make_Record_Representation_Clause;
2552 function Make_Component_Clause (Sloc : Source_Ptr;
2553 Component_Name : Node_Id;
2555 First_Bit : Node_Id;
2559 N : constant Node_Id :=
2560 New_Node (N_Component_Clause, Sloc);
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);
2567 end Make_Component_Clause;
2569 function Make_Code_Statement (Sloc : Source_Ptr;
2570 Expression : Node_Id)
2573 N : constant Node_Id :=
2574 New_Node (N_Code_Statement, Sloc);
2576 Set_Expression (N, Expression);
2578 end Make_Code_Statement;
2580 function Make_Op_Rotate_Left (Sloc : Source_Ptr;
2581 Left_Opnd : Node_Id;
2582 Right_Opnd : Node_Id)
2585 N : constant Node_Id :=
2586 New_Node (N_Op_Rotate_Left, Sloc);
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);
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)
2600 N : constant Node_Id :=
2601 New_Node (N_Op_Rotate_Right, Sloc);
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);
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)
2615 N : constant Node_Id :=
2616 New_Node (N_Op_Shift_Left, Sloc);
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);
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)
2630 N : constant Node_Id :=
2631 New_Node (N_Op_Shift_Right_Arithmetic, Sloc);
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);
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)
2645 N : constant Node_Id :=
2646 New_Node (N_Op_Shift_Right, Sloc);
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);
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)
2660 N : constant Node_Id :=
2661 New_Node (N_Delta_Constraint, Sloc);
2663 Set_Delta_Expression (N, Delta_Expression);
2664 Set_Range_Constraint (N, Range_Constraint);
2666 end Make_Delta_Constraint;
2668 function Make_At_Clause (Sloc : Source_Ptr;
2669 Identifier : Node_Id;
2670 Expression : Node_Id)
2673 N : constant Node_Id :=
2674 New_Node (N_At_Clause, Sloc);
2676 Set_Identifier (N, Identifier);
2677 Set_Expression (N, Expression);
2681 function Make_Mod_Clause (Sloc : Source_Ptr;
2682 Expression : Node_Id;
2683 Pragmas_Before : List_Id)
2686 N : constant Node_Id :=
2687 New_Node (N_Mod_Clause, Sloc);
2689 Set_Expression (N, Expression);
2690 Set_Pragmas_Before (N, Pragmas_Before);
2692 end Make_Mod_Clause;
2694 function Make_Conditional_Expression (Sloc : Source_Ptr;
2695 Expressions : List_Id)
2698 N : constant Node_Id :=
2699 New_Node (N_Conditional_Expression, Sloc);
2701 Set_Expressions (N, Expressions);
2703 end Make_Conditional_Expression;
2705 function Make_Expanded_Name (Sloc : Source_Ptr;
2708 Selector_Name : Node_Id)
2711 N : constant Node_Id :=
2712 New_Node (N_Expanded_Name, Sloc);
2714 Set_Chars (N, Chars);
2715 Set_Prefix (N, Prefix);
2716 Set_Selector_Name (N, Selector_Name);
2718 end Make_Expanded_Name;
2720 function Make_Free_Statement (Sloc : Source_Ptr;
2721 Expression : Node_Id)
2724 N : constant Node_Id :=
2725 New_Node (N_Free_Statement, Sloc);
2727 Set_Expression (N, Expression);
2729 end Make_Free_Statement;
2731 function Make_Freeze_Entity (Sloc : Source_Ptr;
2732 Actions : List_Id := No_List)
2735 N : constant Node_Id :=
2736 New_Node (N_Freeze_Entity, Sloc);
2738 Set_Actions (N, Actions);
2740 end Make_Freeze_Entity;
2742 function Make_Implicit_Label_Declaration (Sloc : Source_Ptr;
2743 Defining_Identifier : Node_Id)
2746 N : constant Node_Id :=
2747 New_Node (N_Implicit_Label_Declaration, Sloc);
2749 Set_Defining_Identifier (N, Defining_Identifier);
2751 end Make_Implicit_Label_Declaration;
2753 function Make_Itype_Reference (Sloc : Source_Ptr)
2756 N : constant Node_Id :=
2757 New_Node (N_Itype_Reference, Sloc);
2760 end Make_Itype_Reference;
2762 function Make_Raise_Constraint_Error (Sloc : Source_Ptr;
2763 Condition : Node_Id := Empty;
2767 N : constant Node_Id :=
2768 New_Node (N_Raise_Constraint_Error, Sloc);
2770 Set_Condition (N, Condition);
2771 Set_Reason (N, Reason);
2773 end Make_Raise_Constraint_Error;
2775 function Make_Raise_Program_Error (Sloc : Source_Ptr;
2776 Condition : Node_Id := Empty;
2780 N : constant Node_Id :=
2781 New_Node (N_Raise_Program_Error, Sloc);
2783 Set_Condition (N, Condition);
2784 Set_Reason (N, Reason);
2786 end Make_Raise_Program_Error;
2788 function Make_Raise_Storage_Error (Sloc : Source_Ptr;
2789 Condition : Node_Id := Empty;
2793 N : constant Node_Id :=
2794 New_Node (N_Raise_Storage_Error, Sloc);
2796 Set_Condition (N, Condition);
2797 Set_Reason (N, Reason);
2799 end Make_Raise_Storage_Error;
2801 function Make_Reference (Sloc : Source_Ptr;
2805 N : constant Node_Id :=
2806 New_Node (N_Reference, Sloc);
2808 Set_Prefix (N, Prefix);
2812 function Make_Subprogram_Info (Sloc : Source_Ptr;
2813 Identifier : Node_Id)
2816 N : constant Node_Id :=
2817 New_Node (N_Subprogram_Info, Sloc);
2819 Set_Identifier (N, Identifier);
2821 end Make_Subprogram_Info;
2823 function Make_Unchecked_Expression (Sloc : Source_Ptr;
2824 Expression : Node_Id)
2827 N : constant Node_Id :=
2828 New_Node (N_Unchecked_Expression, Sloc);
2830 Set_Expression (N, Expression);
2832 end Make_Unchecked_Expression;
2834 function Make_Unchecked_Type_Conversion (Sloc : Source_Ptr;
2835 Subtype_Mark : Node_Id;
2836 Expression : Node_Id)
2839 N : constant Node_Id :=
2840 New_Node (N_Unchecked_Type_Conversion, Sloc);
2842 Set_Subtype_Mark (N, Subtype_Mark);
2843 Set_Expression (N, Expression);
2845 end Make_Unchecked_Type_Conversion;
2847 function Make_Validate_Unchecked_Conversion (Sloc : Source_Ptr)
2850 N : constant Node_Id :=
2851 New_Node (N_Validate_Unchecked_Conversion, Sloc);
2854 end Make_Validate_Unchecked_Conversion;