1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Generated by xnmake revision 1.2 using --
10 -- sinfo.ads revision 1.2 --
11 -- nmake.adt revision 1.1 --
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 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
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;
276 N : constant Node_Id :=
277 New_Node (N_Enumeration_Type_Definition, Sloc);
279 Set_Literals (N, Literals);
281 end Make_Enumeration_Type_Definition;
283 function Make_Defining_Character_Literal (Sloc : Source_Ptr;
287 N : constant Node_Id :=
288 New_Entity (N_Defining_Character_Literal, Sloc);
290 Set_Chars (N, Chars);
292 end Make_Defining_Character_Literal;
294 function Make_Signed_Integer_Type_Definition (Sloc : Source_Ptr;
296 High_Bound : Node_Id)
299 N : constant Node_Id :=
300 New_Node (N_Signed_Integer_Type_Definition, Sloc);
302 Set_Low_Bound (N, Low_Bound);
303 Set_High_Bound (N, High_Bound);
305 end Make_Signed_Integer_Type_Definition;
307 function Make_Modular_Type_Definition (Sloc : Source_Ptr;
308 Expression : Node_Id)
311 N : constant Node_Id :=
312 New_Node (N_Modular_Type_Definition, Sloc);
314 Set_Expression (N, Expression);
316 end Make_Modular_Type_Definition;
318 function Make_Floating_Point_Definition (Sloc : Source_Ptr;
319 Digits_Expression : Node_Id;
320 Real_Range_Specification : Node_Id := Empty)
323 N : constant Node_Id :=
324 New_Node (N_Floating_Point_Definition, Sloc);
326 Set_Digits_Expression (N, Digits_Expression);
327 Set_Real_Range_Specification (N, Real_Range_Specification);
329 end Make_Floating_Point_Definition;
331 function Make_Real_Range_Specification (Sloc : Source_Ptr;
333 High_Bound : Node_Id)
336 N : constant Node_Id :=
337 New_Node (N_Real_Range_Specification, Sloc);
339 Set_Low_Bound (N, Low_Bound);
340 Set_High_Bound (N, High_Bound);
342 end Make_Real_Range_Specification;
344 function Make_Ordinary_Fixed_Point_Definition (Sloc : Source_Ptr;
345 Delta_Expression : Node_Id;
346 Real_Range_Specification : Node_Id)
349 N : constant Node_Id :=
350 New_Node (N_Ordinary_Fixed_Point_Definition, Sloc);
352 Set_Delta_Expression (N, Delta_Expression);
353 Set_Real_Range_Specification (N, Real_Range_Specification);
355 end Make_Ordinary_Fixed_Point_Definition;
357 function Make_Decimal_Fixed_Point_Definition (Sloc : Source_Ptr;
358 Delta_Expression : Node_Id;
359 Digits_Expression : Node_Id;
360 Real_Range_Specification : Node_Id := Empty)
363 N : constant Node_Id :=
364 New_Node (N_Decimal_Fixed_Point_Definition, Sloc);
366 Set_Delta_Expression (N, Delta_Expression);
367 Set_Digits_Expression (N, Digits_Expression);
368 Set_Real_Range_Specification (N, Real_Range_Specification);
370 end Make_Decimal_Fixed_Point_Definition;
372 function Make_Digits_Constraint (Sloc : Source_Ptr;
373 Digits_Expression : Node_Id;
374 Range_Constraint : Node_Id := Empty)
377 N : constant Node_Id :=
378 New_Node (N_Digits_Constraint, Sloc);
380 Set_Digits_Expression (N, Digits_Expression);
381 Set_Range_Constraint (N, Range_Constraint);
383 end Make_Digits_Constraint;
385 function Make_Unconstrained_Array_Definition (Sloc : Source_Ptr;
386 Subtype_Marks : List_Id;
387 Aliased_Present : Boolean := False;
388 Subtype_Indication : Node_Id)
391 N : constant Node_Id :=
392 New_Node (N_Unconstrained_Array_Definition, Sloc);
394 Set_Subtype_Marks (N, Subtype_Marks);
395 Set_Aliased_Present (N, Aliased_Present);
396 Set_Subtype_Indication (N, Subtype_Indication);
398 end Make_Unconstrained_Array_Definition;
400 function Make_Constrained_Array_Definition (Sloc : Source_Ptr;
401 Discrete_Subtype_Definitions : List_Id;
402 Aliased_Present : Boolean := False;
403 Subtype_Indication : Node_Id)
406 N : constant Node_Id :=
407 New_Node (N_Constrained_Array_Definition, Sloc);
409 Set_Discrete_Subtype_Definitions
410 (N, Discrete_Subtype_Definitions);
411 Set_Aliased_Present (N, Aliased_Present);
412 Set_Subtype_Indication (N, Subtype_Indication);
414 end Make_Constrained_Array_Definition;
416 function Make_Discriminant_Specification (Sloc : Source_Ptr;
417 Defining_Identifier : Node_Id;
418 Discriminant_Type : Node_Id;
419 Expression : Node_Id := Empty)
422 N : constant Node_Id :=
423 New_Node (N_Discriminant_Specification, Sloc);
425 Set_Defining_Identifier (N, Defining_Identifier);
426 Set_Discriminant_Type (N, Discriminant_Type);
427 Set_Expression (N, Expression);
429 end Make_Discriminant_Specification;
431 function Make_Index_Or_Discriminant_Constraint (Sloc : Source_Ptr;
432 Constraints : List_Id)
435 N : constant Node_Id :=
436 New_Node (N_Index_Or_Discriminant_Constraint, Sloc);
438 Set_Constraints (N, Constraints);
440 end Make_Index_Or_Discriminant_Constraint;
442 function Make_Discriminant_Association (Sloc : Source_Ptr;
443 Selector_Names : List_Id;
444 Expression : Node_Id)
447 N : constant Node_Id :=
448 New_Node (N_Discriminant_Association, Sloc);
450 Set_Selector_Names (N, Selector_Names);
451 Set_Expression (N, Expression);
453 end Make_Discriminant_Association;
455 function Make_Record_Definition (Sloc : Source_Ptr;
456 End_Label : Node_Id := Empty;
457 Abstract_Present : Boolean := False;
458 Tagged_Present : Boolean := False;
459 Limited_Present : Boolean := False;
460 Component_List : Node_Id;
461 Null_Present : Boolean := False)
464 N : constant Node_Id :=
465 New_Node (N_Record_Definition, Sloc);
467 Set_End_Label (N, End_Label);
468 Set_Abstract_Present (N, Abstract_Present);
469 Set_Tagged_Present (N, Tagged_Present);
470 Set_Limited_Present (N, Limited_Present);
471 Set_Component_List (N, Component_List);
472 Set_Null_Present (N, Null_Present);
474 end Make_Record_Definition;
476 function Make_Component_List (Sloc : Source_Ptr;
477 Component_Items : List_Id;
478 Variant_Part : Node_Id := Empty;
479 Null_Present : Boolean := False)
482 N : constant Node_Id :=
483 New_Node (N_Component_List, Sloc);
485 Set_Component_Items (N, Component_Items);
486 Set_Variant_Part (N, Variant_Part);
487 Set_Null_Present (N, Null_Present);
489 end Make_Component_List;
491 function Make_Component_Declaration (Sloc : Source_Ptr;
492 Defining_Identifier : Node_Id;
493 Aliased_Present : Boolean := False;
494 Subtype_Indication : Node_Id;
495 Expression : Node_Id := Empty)
498 N : constant Node_Id :=
499 New_Node (N_Component_Declaration, Sloc);
501 Set_Defining_Identifier (N, Defining_Identifier);
502 Set_Aliased_Present (N, Aliased_Present);
503 Set_Subtype_Indication (N, Subtype_Indication);
504 Set_Expression (N, Expression);
506 end Make_Component_Declaration;
508 function Make_Variant_Part (Sloc : Source_Ptr;
513 N : constant Node_Id :=
514 New_Node (N_Variant_Part, Sloc);
517 Set_Variants (N, Variants);
519 end Make_Variant_Part;
521 function Make_Variant (Sloc : Source_Ptr;
522 Discrete_Choices : List_Id;
523 Component_List : Node_Id)
526 N : constant Node_Id :=
527 New_Node (N_Variant, Sloc);
529 Set_Discrete_Choices (N, Discrete_Choices);
530 Set_Component_List (N, Component_List);
534 function Make_Others_Choice (Sloc : Source_Ptr)
537 N : constant Node_Id :=
538 New_Node (N_Others_Choice, Sloc);
541 end Make_Others_Choice;
543 function Make_Access_To_Object_Definition (Sloc : Source_Ptr;
544 All_Present : Boolean := False;
545 Subtype_Indication : Node_Id;
546 Constant_Present : Boolean := False)
549 N : constant Node_Id :=
550 New_Node (N_Access_To_Object_Definition, Sloc);
552 Set_All_Present (N, All_Present);
553 Set_Subtype_Indication (N, Subtype_Indication);
554 Set_Constant_Present (N, Constant_Present);
556 end Make_Access_To_Object_Definition;
558 function Make_Access_Function_Definition (Sloc : Source_Ptr;
559 Protected_Present : Boolean := False;
560 Parameter_Specifications : List_Id := No_List;
561 Subtype_Mark : Node_Id)
564 N : constant Node_Id :=
565 New_Node (N_Access_Function_Definition, Sloc);
567 Set_Protected_Present (N, Protected_Present);
568 Set_Parameter_Specifications (N, Parameter_Specifications);
569 Set_Subtype_Mark (N, Subtype_Mark);
571 end Make_Access_Function_Definition;
573 function Make_Access_Procedure_Definition (Sloc : Source_Ptr;
574 Protected_Present : Boolean := False;
575 Parameter_Specifications : List_Id := No_List)
578 N : constant Node_Id :=
579 New_Node (N_Access_Procedure_Definition, Sloc);
581 Set_Protected_Present (N, Protected_Present);
582 Set_Parameter_Specifications (N, Parameter_Specifications);
584 end Make_Access_Procedure_Definition;
586 function Make_Access_Definition (Sloc : Source_Ptr;
587 Subtype_Mark : Node_Id)
590 N : constant Node_Id :=
591 New_Node (N_Access_Definition, Sloc);
593 Set_Subtype_Mark (N, Subtype_Mark);
595 end Make_Access_Definition;
597 function Make_Incomplete_Type_Declaration (Sloc : Source_Ptr;
598 Defining_Identifier : Node_Id;
599 Discriminant_Specifications : List_Id := No_List;
600 Unknown_Discriminants_Present : Boolean := False)
603 N : constant Node_Id :=
604 New_Node (N_Incomplete_Type_Declaration, Sloc);
606 Set_Defining_Identifier (N, Defining_Identifier);
607 Set_Discriminant_Specifications (N, Discriminant_Specifications);
608 Set_Unknown_Discriminants_Present
609 (N, Unknown_Discriminants_Present);
611 end Make_Incomplete_Type_Declaration;
613 function Make_Explicit_Dereference (Sloc : Source_Ptr;
617 N : constant Node_Id :=
618 New_Node (N_Explicit_Dereference, Sloc);
620 Set_Prefix (N, Prefix);
622 end Make_Explicit_Dereference;
624 function Make_Indexed_Component (Sloc : Source_Ptr;
626 Expressions : List_Id)
629 N : constant Node_Id :=
630 New_Node (N_Indexed_Component, Sloc);
632 Set_Prefix (N, Prefix);
633 Set_Expressions (N, Expressions);
635 end Make_Indexed_Component;
637 function Make_Slice (Sloc : Source_Ptr;
639 Discrete_Range : Node_Id)
642 N : constant Node_Id :=
643 New_Node (N_Slice, Sloc);
645 Set_Prefix (N, Prefix);
646 Set_Discrete_Range (N, Discrete_Range);
650 function Make_Selected_Component (Sloc : Source_Ptr;
652 Selector_Name : Node_Id)
655 N : constant Node_Id :=
656 New_Node (N_Selected_Component, Sloc);
658 Set_Prefix (N, Prefix);
659 Set_Selector_Name (N, Selector_Name);
661 end Make_Selected_Component;
663 function Make_Attribute_Reference (Sloc : Source_Ptr;
665 Attribute_Name : Name_Id;
666 Expressions : List_Id := No_List)
669 N : constant Node_Id :=
670 New_Node (N_Attribute_Reference, Sloc);
672 Set_Prefix (N, Prefix);
673 Set_Attribute_Name (N, Attribute_Name);
674 Set_Expressions (N, Expressions);
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)
684 N : constant Node_Id :=
685 New_Node (N_Aggregate, Sloc);
687 Set_Expressions (N, Expressions);
688 Set_Component_Associations (N, Component_Associations);
689 Set_Null_Record_Present (N, Null_Record_Present);
693 function Make_Component_Association (Sloc : Source_Ptr;
695 Expression : Node_Id)
698 N : constant Node_Id :=
699 New_Node (N_Component_Association, Sloc);
701 Set_Choices (N, Choices);
702 Set_Expression (N, Expression);
704 end Make_Component_Association;
706 function Make_Extension_Aggregate (Sloc : Source_Ptr;
707 Ancestor_Part : Node_Id;
708 Expressions : List_Id := No_List;
709 Component_Associations : List_Id := No_List;
710 Null_Record_Present : Boolean := False)
713 N : constant Node_Id :=
714 New_Node (N_Extension_Aggregate, Sloc);
716 Set_Ancestor_Part (N, Ancestor_Part);
717 Set_Expressions (N, Expressions);
718 Set_Component_Associations (N, Component_Associations);
719 Set_Null_Record_Present (N, Null_Record_Present);
721 end Make_Extension_Aggregate;
723 function Make_Null (Sloc : Source_Ptr)
726 N : constant Node_Id :=
727 New_Node (N_Null, Sloc);
732 function Make_And_Then (Sloc : Source_Ptr;
734 Right_Opnd : Node_Id)
737 N : constant Node_Id :=
738 New_Node (N_And_Then, Sloc);
740 Set_Left_Opnd (N, Left_Opnd);
741 Set_Right_Opnd (N, Right_Opnd);
745 function Make_Or_Else (Sloc : Source_Ptr;
747 Right_Opnd : Node_Id)
750 N : constant Node_Id :=
751 New_Node (N_Or_Else, Sloc);
753 Set_Left_Opnd (N, Left_Opnd);
754 Set_Right_Opnd (N, Right_Opnd);
758 function Make_In (Sloc : Source_Ptr;
760 Right_Opnd : Node_Id)
763 N : constant Node_Id :=
764 New_Node (N_In, Sloc);
766 Set_Left_Opnd (N, Left_Opnd);
767 Set_Right_Opnd (N, Right_Opnd);
771 function Make_Not_In (Sloc : Source_Ptr;
773 Right_Opnd : Node_Id)
776 N : constant Node_Id :=
777 New_Node (N_Not_In, Sloc);
779 Set_Left_Opnd (N, Left_Opnd);
780 Set_Right_Opnd (N, Right_Opnd);
784 function Make_Op_And (Sloc : Source_Ptr;
786 Right_Opnd : Node_Id)
789 N : constant Node_Id :=
790 New_Node (N_Op_And, Sloc);
792 Set_Left_Opnd (N, Left_Opnd);
793 Set_Right_Opnd (N, Right_Opnd);
794 Set_Chars (N, Name_Op_And);
795 Set_Entity (N, Standard_Op_And);
799 function Make_Op_Or (Sloc : Source_Ptr;
801 Right_Opnd : Node_Id)
804 N : constant Node_Id :=
805 New_Node (N_Op_Or, Sloc);
807 Set_Left_Opnd (N, Left_Opnd);
808 Set_Right_Opnd (N, Right_Opnd);
809 Set_Chars (N, Name_Op_Or);
810 Set_Entity (N, Standard_Op_Or);
814 function Make_Op_Xor (Sloc : Source_Ptr;
816 Right_Opnd : Node_Id)
819 N : constant Node_Id :=
820 New_Node (N_Op_Xor, Sloc);
822 Set_Left_Opnd (N, Left_Opnd);
823 Set_Right_Opnd (N, Right_Opnd);
824 Set_Chars (N, Name_Op_Xor);
825 Set_Entity (N, Standard_Op_Xor);
829 function Make_Op_Eq (Sloc : Source_Ptr;
831 Right_Opnd : Node_Id)
834 N : constant Node_Id :=
835 New_Node (N_Op_Eq, Sloc);
837 Set_Left_Opnd (N, Left_Opnd);
838 Set_Right_Opnd (N, Right_Opnd);
839 Set_Chars (N, Name_Op_Eq);
840 Set_Entity (N, Standard_Op_Eq);
844 function Make_Op_Ne (Sloc : Source_Ptr;
846 Right_Opnd : Node_Id)
849 N : constant Node_Id :=
850 New_Node (N_Op_Ne, Sloc);
852 Set_Left_Opnd (N, Left_Opnd);
853 Set_Right_Opnd (N, Right_Opnd);
854 Set_Chars (N, Name_Op_Ne);
855 Set_Entity (N, Standard_Op_Ne);
859 function Make_Op_Lt (Sloc : Source_Ptr;
861 Right_Opnd : Node_Id)
864 N : constant Node_Id :=
865 New_Node (N_Op_Lt, Sloc);
867 Set_Left_Opnd (N, Left_Opnd);
868 Set_Right_Opnd (N, Right_Opnd);
869 Set_Chars (N, Name_Op_Lt);
870 Set_Entity (N, Standard_Op_Lt);
874 function Make_Op_Le (Sloc : Source_Ptr;
876 Right_Opnd : Node_Id)
879 N : constant Node_Id :=
880 New_Node (N_Op_Le, Sloc);
882 Set_Left_Opnd (N, Left_Opnd);
883 Set_Right_Opnd (N, Right_Opnd);
884 Set_Chars (N, Name_Op_Le);
885 Set_Entity (N, Standard_Op_Le);
889 function Make_Op_Gt (Sloc : Source_Ptr;
891 Right_Opnd : Node_Id)
894 N : constant Node_Id :=
895 New_Node (N_Op_Gt, Sloc);
897 Set_Left_Opnd (N, Left_Opnd);
898 Set_Right_Opnd (N, Right_Opnd);
899 Set_Chars (N, Name_Op_Gt);
900 Set_Entity (N, Standard_Op_Gt);
904 function Make_Op_Ge (Sloc : Source_Ptr;
906 Right_Opnd : Node_Id)
909 N : constant Node_Id :=
910 New_Node (N_Op_Ge, Sloc);
912 Set_Left_Opnd (N, Left_Opnd);
913 Set_Right_Opnd (N, Right_Opnd);
914 Set_Chars (N, Name_Op_Ge);
915 Set_Entity (N, Standard_Op_Ge);
919 function Make_Op_Add (Sloc : Source_Ptr;
921 Right_Opnd : Node_Id)
924 N : constant Node_Id :=
925 New_Node (N_Op_Add, Sloc);
927 Set_Left_Opnd (N, Left_Opnd);
928 Set_Right_Opnd (N, Right_Opnd);
929 Set_Chars (N, Name_Op_Add);
930 Set_Entity (N, Standard_Op_Add);
934 function Make_Op_Subtract (Sloc : Source_Ptr;
936 Right_Opnd : Node_Id)
939 N : constant Node_Id :=
940 New_Node (N_Op_Subtract, Sloc);
942 Set_Left_Opnd (N, Left_Opnd);
943 Set_Right_Opnd (N, Right_Opnd);
944 Set_Chars (N, Name_Op_Subtract);
945 Set_Entity (N, Standard_Op_Subtract);
947 end Make_Op_Subtract;
949 function Make_Op_Concat (Sloc : Source_Ptr;
951 Right_Opnd : Node_Id)
954 N : constant Node_Id :=
955 New_Node (N_Op_Concat, Sloc);
957 Set_Left_Opnd (N, Left_Opnd);
958 Set_Right_Opnd (N, Right_Opnd);
959 Set_Chars (N, Name_Op_Concat);
960 Set_Entity (N, Standard_Op_Concat);
964 function Make_Op_Multiply (Sloc : Source_Ptr;
966 Right_Opnd : Node_Id)
969 N : constant Node_Id :=
970 New_Node (N_Op_Multiply, Sloc);
972 Set_Left_Opnd (N, Left_Opnd);
973 Set_Right_Opnd (N, Right_Opnd);
974 Set_Chars (N, Name_Op_Multiply);
975 Set_Entity (N, Standard_Op_Multiply);
977 end Make_Op_Multiply;
979 function Make_Op_Divide (Sloc : Source_Ptr;
981 Right_Opnd : Node_Id)
984 N : constant Node_Id :=
985 New_Node (N_Op_Divide, Sloc);
987 Set_Left_Opnd (N, Left_Opnd);
988 Set_Right_Opnd (N, Right_Opnd);
989 Set_Chars (N, Name_Op_Divide);
990 Set_Entity (N, Standard_Op_Divide);
994 function Make_Op_Mod (Sloc : Source_Ptr;
996 Right_Opnd : Node_Id)
999 N : constant Node_Id :=
1000 New_Node (N_Op_Mod, Sloc);
1002 Set_Left_Opnd (N, Left_Opnd);
1003 Set_Right_Opnd (N, Right_Opnd);
1004 Set_Chars (N, Name_Op_Mod);
1005 Set_Entity (N, Standard_Op_Mod);
1009 function Make_Op_Rem (Sloc : Source_Ptr;
1010 Left_Opnd : Node_Id;
1011 Right_Opnd : Node_Id)
1014 N : constant Node_Id :=
1015 New_Node (N_Op_Rem, Sloc);
1017 Set_Left_Opnd (N, Left_Opnd);
1018 Set_Right_Opnd (N, Right_Opnd);
1019 Set_Chars (N, Name_Op_Rem);
1020 Set_Entity (N, Standard_Op_Rem);
1024 function Make_Op_Expon (Sloc : Source_Ptr;
1025 Left_Opnd : Node_Id;
1026 Right_Opnd : Node_Id)
1029 N : constant Node_Id :=
1030 New_Node (N_Op_Expon, Sloc);
1032 Set_Left_Opnd (N, Left_Opnd);
1033 Set_Right_Opnd (N, Right_Opnd);
1034 Set_Chars (N, Name_Op_Expon);
1035 Set_Entity (N, Standard_Op_Expon);
1039 function Make_Op_Plus (Sloc : Source_Ptr;
1040 Right_Opnd : Node_Id)
1043 N : constant Node_Id :=
1044 New_Node (N_Op_Plus, Sloc);
1046 Set_Right_Opnd (N, Right_Opnd);
1047 Set_Chars (N, Name_Op_Add);
1048 Set_Entity (N, Standard_Op_Plus);
1052 function Make_Op_Minus (Sloc : Source_Ptr;
1053 Right_Opnd : Node_Id)
1056 N : constant Node_Id :=
1057 New_Node (N_Op_Minus, Sloc);
1059 Set_Right_Opnd (N, Right_Opnd);
1060 Set_Chars (N, Name_Op_Subtract);
1061 Set_Entity (N, Standard_Op_Minus);
1065 function Make_Op_Abs (Sloc : Source_Ptr;
1066 Right_Opnd : Node_Id)
1069 N : constant Node_Id :=
1070 New_Node (N_Op_Abs, Sloc);
1072 Set_Right_Opnd (N, Right_Opnd);
1073 Set_Chars (N, Name_Op_Abs);
1074 Set_Entity (N, Standard_Op_Abs);
1078 function Make_Op_Not (Sloc : Source_Ptr;
1079 Right_Opnd : Node_Id)
1082 N : constant Node_Id :=
1083 New_Node (N_Op_Not, Sloc);
1085 Set_Right_Opnd (N, Right_Opnd);
1086 Set_Chars (N, Name_Op_Not);
1087 Set_Entity (N, Standard_Op_Not);
1091 function Make_Type_Conversion (Sloc : Source_Ptr;
1092 Subtype_Mark : Node_Id;
1093 Expression : Node_Id)
1096 N : constant Node_Id :=
1097 New_Node (N_Type_Conversion, Sloc);
1099 Set_Subtype_Mark (N, Subtype_Mark);
1100 Set_Expression (N, Expression);
1102 end Make_Type_Conversion;
1104 function Make_Qualified_Expression (Sloc : Source_Ptr;
1105 Subtype_Mark : Node_Id;
1106 Expression : Node_Id)
1109 N : constant Node_Id :=
1110 New_Node (N_Qualified_Expression, Sloc);
1112 Set_Subtype_Mark (N, Subtype_Mark);
1113 Set_Expression (N, Expression);
1115 end Make_Qualified_Expression;
1117 function Make_Allocator (Sloc : Source_Ptr;
1118 Expression : Node_Id)
1121 N : constant Node_Id :=
1122 New_Node (N_Allocator, Sloc);
1124 Set_Expression (N, Expression);
1128 function Make_Null_Statement (Sloc : Source_Ptr)
1131 N : constant Node_Id :=
1132 New_Node (N_Null_Statement, Sloc);
1135 end Make_Null_Statement;
1137 function Make_Label (Sloc : Source_Ptr;
1138 Identifier : Node_Id)
1141 N : constant Node_Id :=
1142 New_Node (N_Label, Sloc);
1144 Set_Identifier (N, Identifier);
1148 function Make_Assignment_Statement (Sloc : Source_Ptr;
1150 Expression : Node_Id)
1153 N : constant Node_Id :=
1154 New_Node (N_Assignment_Statement, Sloc);
1157 Set_Expression (N, Expression);
1159 end Make_Assignment_Statement;
1161 function Make_If_Statement (Sloc : Source_Ptr;
1162 Condition : Node_Id;
1163 Then_Statements : List_Id;
1164 Elsif_Parts : List_Id := No_List;
1165 Else_Statements : List_Id := No_List;
1166 End_Span : Uint := No_Uint)
1169 N : constant Node_Id :=
1170 New_Node (N_If_Statement, Sloc);
1172 Set_Condition (N, Condition);
1173 Set_Then_Statements (N, Then_Statements);
1174 Set_Elsif_Parts (N, Elsif_Parts);
1175 Set_Else_Statements (N, Else_Statements);
1176 Set_End_Span (N, End_Span);
1178 end Make_If_Statement;
1180 function Make_Elsif_Part (Sloc : Source_Ptr;
1181 Condition : Node_Id;
1182 Then_Statements : List_Id)
1185 N : constant Node_Id :=
1186 New_Node (N_Elsif_Part, Sloc);
1188 Set_Condition (N, Condition);
1189 Set_Then_Statements (N, Then_Statements);
1191 end Make_Elsif_Part;
1193 function Make_Case_Statement (Sloc : Source_Ptr;
1194 Expression : Node_Id;
1195 Alternatives : List_Id;
1196 End_Span : Uint := No_Uint)
1199 N : constant Node_Id :=
1200 New_Node (N_Case_Statement, Sloc);
1202 Set_Expression (N, Expression);
1203 Set_Alternatives (N, Alternatives);
1204 Set_End_Span (N, End_Span);
1206 end Make_Case_Statement;
1208 function Make_Case_Statement_Alternative (Sloc : Source_Ptr;
1209 Discrete_Choices : List_Id;
1210 Statements : List_Id)
1213 N : constant Node_Id :=
1214 New_Node (N_Case_Statement_Alternative, Sloc);
1216 Set_Discrete_Choices (N, Discrete_Choices);
1217 Set_Statements (N, Statements);
1219 end Make_Case_Statement_Alternative;
1221 function Make_Loop_Statement (Sloc : Source_Ptr;
1222 Identifier : Node_Id := Empty;
1223 Iteration_Scheme : Node_Id := Empty;
1224 Statements : List_Id;
1225 End_Label : Node_Id;
1226 Has_Created_Identifier : Boolean := False)
1229 N : constant Node_Id :=
1230 New_Node (N_Loop_Statement, Sloc);
1232 Set_Identifier (N, Identifier);
1233 Set_Iteration_Scheme (N, Iteration_Scheme);
1234 Set_Statements (N, Statements);
1235 Set_End_Label (N, End_Label);
1236 Set_Has_Created_Identifier (N, Has_Created_Identifier);
1238 end Make_Loop_Statement;
1240 function Make_Iteration_Scheme (Sloc : Source_Ptr;
1241 Condition : Node_Id := Empty;
1242 Loop_Parameter_Specification : Node_Id := Empty)
1245 N : constant Node_Id :=
1246 New_Node (N_Iteration_Scheme, Sloc);
1248 Set_Condition (N, Condition);
1249 Set_Loop_Parameter_Specification
1250 (N, Loop_Parameter_Specification);
1252 end Make_Iteration_Scheme;
1254 function Make_Loop_Parameter_Specification (Sloc : Source_Ptr;
1255 Defining_Identifier : Node_Id;
1256 Reverse_Present : Boolean := False;
1257 Discrete_Subtype_Definition : Node_Id)
1260 N : constant Node_Id :=
1261 New_Node (N_Loop_Parameter_Specification, Sloc);
1263 Set_Defining_Identifier (N, Defining_Identifier);
1264 Set_Reverse_Present (N, Reverse_Present);
1265 Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
1267 end Make_Loop_Parameter_Specification;
1269 function Make_Block_Statement (Sloc : Source_Ptr;
1270 Identifier : Node_Id := Empty;
1271 Declarations : List_Id := No_List;
1272 Handled_Statement_Sequence : Node_Id;
1273 Has_Created_Identifier : Boolean := False;
1274 Is_Task_Allocation_Block : Boolean := False;
1275 Is_Asynchronous_Call_Block : Boolean := False)
1278 N : constant Node_Id :=
1279 New_Node (N_Block_Statement, Sloc);
1281 Set_Identifier (N, Identifier);
1282 Set_Declarations (N, Declarations);
1283 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1284 Set_Has_Created_Identifier (N, Has_Created_Identifier);
1285 Set_Is_Task_Allocation_Block (N, Is_Task_Allocation_Block);
1286 Set_Is_Asynchronous_Call_Block (N, Is_Asynchronous_Call_Block);
1288 end Make_Block_Statement;
1290 function Make_Exit_Statement (Sloc : Source_Ptr;
1291 Name : Node_Id := Empty;
1292 Condition : Node_Id := Empty)
1295 N : constant Node_Id :=
1296 New_Node (N_Exit_Statement, Sloc);
1299 Set_Condition (N, Condition);
1301 end Make_Exit_Statement;
1303 function Make_Goto_Statement (Sloc : Source_Ptr;
1307 N : constant Node_Id :=
1308 New_Node (N_Goto_Statement, Sloc);
1312 end Make_Goto_Statement;
1314 function Make_Subprogram_Declaration (Sloc : Source_Ptr;
1315 Specification : Node_Id)
1318 N : constant Node_Id :=
1319 New_Node (N_Subprogram_Declaration, Sloc);
1321 Set_Specification (N, Specification);
1323 end Make_Subprogram_Declaration;
1325 function Make_Abstract_Subprogram_Declaration (Sloc : Source_Ptr;
1326 Specification : Node_Id)
1329 N : constant Node_Id :=
1330 New_Node (N_Abstract_Subprogram_Declaration, Sloc);
1332 Set_Specification (N, Specification);
1334 end Make_Abstract_Subprogram_Declaration;
1336 function Make_Function_Specification (Sloc : Source_Ptr;
1337 Defining_Unit_Name : Node_Id;
1338 Parameter_Specifications : List_Id := No_List;
1339 Subtype_Mark : Node_Id)
1342 N : constant Node_Id :=
1343 New_Node (N_Function_Specification, Sloc);
1345 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1346 Set_Parameter_Specifications (N, Parameter_Specifications);
1347 Set_Subtype_Mark (N, Subtype_Mark);
1349 end Make_Function_Specification;
1351 function Make_Procedure_Specification (Sloc : Source_Ptr;
1352 Defining_Unit_Name : Node_Id;
1353 Parameter_Specifications : List_Id := No_List)
1356 N : constant Node_Id :=
1357 New_Node (N_Procedure_Specification, Sloc);
1359 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1360 Set_Parameter_Specifications (N, Parameter_Specifications);
1362 end Make_Procedure_Specification;
1364 function Make_Designator (Sloc : Source_Ptr;
1366 Identifier : Node_Id)
1369 N : constant Node_Id :=
1370 New_Node (N_Designator, Sloc);
1373 Set_Identifier (N, Identifier);
1375 end Make_Designator;
1377 function Make_Defining_Program_Unit_Name (Sloc : Source_Ptr;
1379 Defining_Identifier : Node_Id)
1382 N : constant Node_Id :=
1383 New_Node (N_Defining_Program_Unit_Name, Sloc);
1386 Set_Defining_Identifier (N, Defining_Identifier);
1388 end Make_Defining_Program_Unit_Name;
1390 function Make_Operator_Symbol (Sloc : Source_Ptr;
1395 N : constant Node_Id :=
1396 New_Node (N_Operator_Symbol, Sloc);
1398 Set_Chars (N, Chars);
1399 Set_Strval (N, Strval);
1401 end Make_Operator_Symbol;
1403 function Make_Defining_Operator_Symbol (Sloc : Source_Ptr;
1407 N : constant Node_Id :=
1408 New_Entity (N_Defining_Operator_Symbol, Sloc);
1410 Set_Chars (N, Chars);
1412 end Make_Defining_Operator_Symbol;
1414 function Make_Parameter_Specification (Sloc : Source_Ptr;
1415 Defining_Identifier : Node_Id;
1416 In_Present : Boolean := False;
1417 Out_Present : Boolean := False;
1418 Parameter_Type : Node_Id;
1419 Expression : Node_Id := Empty)
1422 N : constant Node_Id :=
1423 New_Node (N_Parameter_Specification, Sloc);
1425 Set_Defining_Identifier (N, Defining_Identifier);
1426 Set_In_Present (N, In_Present);
1427 Set_Out_Present (N, Out_Present);
1428 Set_Parameter_Type (N, Parameter_Type);
1429 Set_Expression (N, Expression);
1431 end Make_Parameter_Specification;
1433 function Make_Subprogram_Body (Sloc : Source_Ptr;
1434 Specification : Node_Id;
1435 Declarations : List_Id;
1436 Handled_Statement_Sequence : Node_Id;
1437 Bad_Is_Detected : Boolean := False)
1440 N : constant Node_Id :=
1441 New_Node (N_Subprogram_Body, Sloc);
1443 Set_Specification (N, Specification);
1444 Set_Declarations (N, Declarations);
1445 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1446 Set_Bad_Is_Detected (N, Bad_Is_Detected);
1448 end Make_Subprogram_Body;
1450 function Make_Procedure_Call_Statement (Sloc : Source_Ptr;
1452 Parameter_Associations : List_Id := No_List)
1455 N : constant Node_Id :=
1456 New_Node (N_Procedure_Call_Statement, Sloc);
1459 Set_Parameter_Associations (N, Parameter_Associations);
1461 end Make_Procedure_Call_Statement;
1463 function Make_Function_Call (Sloc : Source_Ptr;
1465 Parameter_Associations : List_Id := No_List)
1468 N : constant Node_Id :=
1469 New_Node (N_Function_Call, Sloc);
1472 Set_Parameter_Associations (N, Parameter_Associations);
1474 end Make_Function_Call;
1476 function Make_Parameter_Association (Sloc : Source_Ptr;
1477 Selector_Name : Node_Id;
1478 Explicit_Actual_Parameter : Node_Id)
1481 N : constant Node_Id :=
1482 New_Node (N_Parameter_Association, Sloc);
1484 Set_Selector_Name (N, Selector_Name);
1485 Set_Explicit_Actual_Parameter (N, Explicit_Actual_Parameter);
1487 end Make_Parameter_Association;
1489 function Make_Return_Statement (Sloc : Source_Ptr;
1490 Expression : Node_Id := Empty)
1493 N : constant Node_Id :=
1494 New_Node (N_Return_Statement, Sloc);
1496 Set_Expression (N, Expression);
1498 end Make_Return_Statement;
1500 function Make_Package_Declaration (Sloc : Source_Ptr;
1501 Specification : Node_Id)
1504 N : constant Node_Id :=
1505 New_Node (N_Package_Declaration, Sloc);
1507 Set_Specification (N, Specification);
1509 end Make_Package_Declaration;
1511 function Make_Package_Specification (Sloc : Source_Ptr;
1512 Defining_Unit_Name : Node_Id;
1513 Visible_Declarations : List_Id;
1514 Private_Declarations : List_Id := No_List;
1515 End_Label : Node_Id)
1518 N : constant Node_Id :=
1519 New_Node (N_Package_Specification, Sloc);
1521 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1522 Set_Visible_Declarations (N, Visible_Declarations);
1523 Set_Private_Declarations (N, Private_Declarations);
1524 Set_End_Label (N, End_Label);
1526 end Make_Package_Specification;
1528 function Make_Package_Body (Sloc : Source_Ptr;
1529 Defining_Unit_Name : Node_Id;
1530 Declarations : List_Id;
1531 Handled_Statement_Sequence : Node_Id := Empty)
1534 N : constant Node_Id :=
1535 New_Node (N_Package_Body, Sloc);
1537 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1538 Set_Declarations (N, Declarations);
1539 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1541 end Make_Package_Body;
1543 function Make_Private_Type_Declaration (Sloc : Source_Ptr;
1544 Defining_Identifier : Node_Id;
1545 Discriminant_Specifications : List_Id := No_List;
1546 Unknown_Discriminants_Present : Boolean := False;
1547 Abstract_Present : Boolean := False;
1548 Tagged_Present : Boolean := False;
1549 Limited_Present : Boolean := False)
1552 N : constant Node_Id :=
1553 New_Node (N_Private_Type_Declaration, Sloc);
1555 Set_Defining_Identifier (N, Defining_Identifier);
1556 Set_Discriminant_Specifications (N, Discriminant_Specifications);
1557 Set_Unknown_Discriminants_Present
1558 (N, Unknown_Discriminants_Present);
1559 Set_Abstract_Present (N, Abstract_Present);
1560 Set_Tagged_Present (N, Tagged_Present);
1561 Set_Limited_Present (N, Limited_Present);
1563 end Make_Private_Type_Declaration;
1565 function Make_Private_Extension_Declaration (Sloc : Source_Ptr;
1566 Defining_Identifier : Node_Id;
1567 Discriminant_Specifications : List_Id := No_List;
1568 Unknown_Discriminants_Present : Boolean := False;
1569 Abstract_Present : Boolean := False;
1570 Subtype_Indication : Node_Id)
1573 N : constant Node_Id :=
1574 New_Node (N_Private_Extension_Declaration, Sloc);
1576 Set_Defining_Identifier (N, Defining_Identifier);
1577 Set_Discriminant_Specifications (N, Discriminant_Specifications);
1578 Set_Unknown_Discriminants_Present
1579 (N, Unknown_Discriminants_Present);
1580 Set_Abstract_Present (N, Abstract_Present);
1581 Set_Subtype_Indication (N, Subtype_Indication);
1583 end Make_Private_Extension_Declaration;
1585 function Make_Use_Package_Clause (Sloc : Source_Ptr;
1589 N : constant Node_Id :=
1590 New_Node (N_Use_Package_Clause, Sloc);
1592 Set_Names (N, Names);
1594 end Make_Use_Package_Clause;
1596 function Make_Use_Type_Clause (Sloc : Source_Ptr;
1597 Subtype_Marks : List_Id)
1600 N : constant Node_Id :=
1601 New_Node (N_Use_Type_Clause, Sloc);
1603 Set_Subtype_Marks (N, Subtype_Marks);
1605 end Make_Use_Type_Clause;
1607 function Make_Object_Renaming_Declaration (Sloc : Source_Ptr;
1608 Defining_Identifier : Node_Id;
1609 Subtype_Mark : Node_Id;
1613 N : constant Node_Id :=
1614 New_Node (N_Object_Renaming_Declaration, Sloc);
1616 Set_Defining_Identifier (N, Defining_Identifier);
1617 Set_Subtype_Mark (N, Subtype_Mark);
1620 end Make_Object_Renaming_Declaration;
1622 function Make_Exception_Renaming_Declaration (Sloc : Source_Ptr;
1623 Defining_Identifier : Node_Id;
1627 N : constant Node_Id :=
1628 New_Node (N_Exception_Renaming_Declaration, Sloc);
1630 Set_Defining_Identifier (N, Defining_Identifier);
1633 end Make_Exception_Renaming_Declaration;
1635 function Make_Package_Renaming_Declaration (Sloc : Source_Ptr;
1636 Defining_Unit_Name : Node_Id;
1640 N : constant Node_Id :=
1641 New_Node (N_Package_Renaming_Declaration, Sloc);
1643 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1646 end Make_Package_Renaming_Declaration;
1648 function Make_Subprogram_Renaming_Declaration (Sloc : Source_Ptr;
1649 Specification : Node_Id;
1653 N : constant Node_Id :=
1654 New_Node (N_Subprogram_Renaming_Declaration, Sloc);
1656 Set_Specification (N, Specification);
1659 end Make_Subprogram_Renaming_Declaration;
1661 function Make_Generic_Package_Renaming_Declaration (Sloc : Source_Ptr;
1662 Defining_Unit_Name : Node_Id;
1666 N : constant Node_Id :=
1667 New_Node (N_Generic_Package_Renaming_Declaration, Sloc);
1669 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1672 end Make_Generic_Package_Renaming_Declaration;
1674 function Make_Generic_Procedure_Renaming_Declaration (Sloc : Source_Ptr;
1675 Defining_Unit_Name : Node_Id;
1679 N : constant Node_Id :=
1680 New_Node (N_Generic_Procedure_Renaming_Declaration, Sloc);
1682 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1685 end Make_Generic_Procedure_Renaming_Declaration;
1687 function Make_Generic_Function_Renaming_Declaration (Sloc : Source_Ptr;
1688 Defining_Unit_Name : Node_Id;
1692 N : constant Node_Id :=
1693 New_Node (N_Generic_Function_Renaming_Declaration, Sloc);
1695 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1698 end Make_Generic_Function_Renaming_Declaration;
1700 function Make_Task_Type_Declaration (Sloc : Source_Ptr;
1701 Defining_Identifier : Node_Id;
1702 Discriminant_Specifications : List_Id := No_List;
1703 Task_Definition : Node_Id := Empty)
1706 N : constant Node_Id :=
1707 New_Node (N_Task_Type_Declaration, Sloc);
1709 Set_Defining_Identifier (N, Defining_Identifier);
1710 Set_Discriminant_Specifications (N, Discriminant_Specifications);
1711 Set_Task_Definition (N, Task_Definition);
1713 end Make_Task_Type_Declaration;
1715 function Make_Single_Task_Declaration (Sloc : Source_Ptr;
1716 Defining_Identifier : Node_Id;
1717 Task_Definition : Node_Id := Empty)
1720 N : constant Node_Id :=
1721 New_Node (N_Single_Task_Declaration, Sloc);
1723 Set_Defining_Identifier (N, Defining_Identifier);
1724 Set_Task_Definition (N, Task_Definition);
1726 end Make_Single_Task_Declaration;
1728 function Make_Task_Definition (Sloc : Source_Ptr;
1729 Visible_Declarations : List_Id;
1730 Private_Declarations : List_Id := No_List;
1731 End_Label : Node_Id)
1734 N : constant Node_Id :=
1735 New_Node (N_Task_Definition, Sloc);
1737 Set_Visible_Declarations (N, Visible_Declarations);
1738 Set_Private_Declarations (N, Private_Declarations);
1739 Set_End_Label (N, End_Label);
1741 end Make_Task_Definition;
1743 function Make_Task_Body (Sloc : Source_Ptr;
1744 Defining_Identifier : Node_Id;
1745 Declarations : List_Id;
1746 Handled_Statement_Sequence : Node_Id)
1749 N : constant Node_Id :=
1750 New_Node (N_Task_Body, Sloc);
1752 Set_Defining_Identifier (N, Defining_Identifier);
1753 Set_Declarations (N, Declarations);
1754 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1758 function Make_Protected_Type_Declaration (Sloc : Source_Ptr;
1759 Defining_Identifier : Node_Id;
1760 Discriminant_Specifications : List_Id := No_List;
1761 Protected_Definition : Node_Id)
1764 N : constant Node_Id :=
1765 New_Node (N_Protected_Type_Declaration, Sloc);
1767 Set_Defining_Identifier (N, Defining_Identifier);
1768 Set_Discriminant_Specifications (N, Discriminant_Specifications);
1769 Set_Protected_Definition (N, Protected_Definition);
1771 end Make_Protected_Type_Declaration;
1773 function Make_Single_Protected_Declaration (Sloc : Source_Ptr;
1774 Defining_Identifier : Node_Id;
1775 Protected_Definition : Node_Id)
1778 N : constant Node_Id :=
1779 New_Node (N_Single_Protected_Declaration, Sloc);
1781 Set_Defining_Identifier (N, Defining_Identifier);
1782 Set_Protected_Definition (N, Protected_Definition);
1784 end Make_Single_Protected_Declaration;
1786 function Make_Protected_Definition (Sloc : Source_Ptr;
1787 Visible_Declarations : List_Id;
1788 Private_Declarations : List_Id := No_List;
1789 End_Label : Node_Id)
1792 N : constant Node_Id :=
1793 New_Node (N_Protected_Definition, Sloc);
1795 Set_Visible_Declarations (N, Visible_Declarations);
1796 Set_Private_Declarations (N, Private_Declarations);
1797 Set_End_Label (N, End_Label);
1799 end Make_Protected_Definition;
1801 function Make_Protected_Body (Sloc : Source_Ptr;
1802 Defining_Identifier : Node_Id;
1803 Declarations : List_Id;
1804 End_Label : Node_Id)
1807 N : constant Node_Id :=
1808 New_Node (N_Protected_Body, Sloc);
1810 Set_Defining_Identifier (N, Defining_Identifier);
1811 Set_Declarations (N, Declarations);
1812 Set_End_Label (N, End_Label);
1814 end Make_Protected_Body;
1816 function Make_Entry_Declaration (Sloc : Source_Ptr;
1817 Defining_Identifier : Node_Id;
1818 Discrete_Subtype_Definition : Node_Id := Empty;
1819 Parameter_Specifications : List_Id := No_List)
1822 N : constant Node_Id :=
1823 New_Node (N_Entry_Declaration, Sloc);
1825 Set_Defining_Identifier (N, Defining_Identifier);
1826 Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
1827 Set_Parameter_Specifications (N, Parameter_Specifications);
1829 end Make_Entry_Declaration;
1831 function Make_Accept_Statement (Sloc : Source_Ptr;
1832 Entry_Direct_Name : Node_Id;
1833 Entry_Index : Node_Id := Empty;
1834 Parameter_Specifications : List_Id := No_List;
1835 Handled_Statement_Sequence : Node_Id;
1836 Declarations : List_Id := No_List)
1839 N : constant Node_Id :=
1840 New_Node (N_Accept_Statement, Sloc);
1842 Set_Entry_Direct_Name (N, Entry_Direct_Name);
1843 Set_Entry_Index (N, Entry_Index);
1844 Set_Parameter_Specifications (N, Parameter_Specifications);
1845 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1846 Set_Declarations (N, Declarations);
1848 end Make_Accept_Statement;
1850 function Make_Entry_Body (Sloc : Source_Ptr;
1851 Defining_Identifier : Node_Id;
1852 Entry_Body_Formal_Part : Node_Id;
1853 Declarations : List_Id;
1854 Handled_Statement_Sequence : Node_Id)
1857 N : constant Node_Id :=
1858 New_Node (N_Entry_Body, Sloc);
1860 Set_Defining_Identifier (N, Defining_Identifier);
1861 Set_Entry_Body_Formal_Part (N, Entry_Body_Formal_Part);
1862 Set_Declarations (N, Declarations);
1863 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1865 end Make_Entry_Body;
1867 function Make_Entry_Body_Formal_Part (Sloc : Source_Ptr;
1868 Entry_Index_Specification : Node_Id := Empty;
1869 Parameter_Specifications : List_Id := No_List;
1870 Condition : Node_Id)
1873 N : constant Node_Id :=
1874 New_Node (N_Entry_Body_Formal_Part, Sloc);
1876 Set_Entry_Index_Specification (N, Entry_Index_Specification);
1877 Set_Parameter_Specifications (N, Parameter_Specifications);
1878 Set_Condition (N, Condition);
1880 end Make_Entry_Body_Formal_Part;
1882 function Make_Entry_Index_Specification (Sloc : Source_Ptr;
1883 Defining_Identifier : Node_Id;
1884 Discrete_Subtype_Definition : Node_Id)
1887 N : constant Node_Id :=
1888 New_Node (N_Entry_Index_Specification, Sloc);
1890 Set_Defining_Identifier (N, Defining_Identifier);
1891 Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
1893 end Make_Entry_Index_Specification;
1895 function Make_Entry_Call_Statement (Sloc : Source_Ptr;
1897 Parameter_Associations : List_Id := No_List)
1900 N : constant Node_Id :=
1901 New_Node (N_Entry_Call_Statement, Sloc);
1904 Set_Parameter_Associations (N, Parameter_Associations);
1906 end Make_Entry_Call_Statement;
1908 function Make_Requeue_Statement (Sloc : Source_Ptr;
1910 Abort_Present : Boolean := False)
1913 N : constant Node_Id :=
1914 New_Node (N_Requeue_Statement, Sloc);
1917 Set_Abort_Present (N, Abort_Present);
1919 end Make_Requeue_Statement;
1921 function Make_Delay_Until_Statement (Sloc : Source_Ptr;
1922 Expression : Node_Id)
1925 N : constant Node_Id :=
1926 New_Node (N_Delay_Until_Statement, Sloc);
1928 Set_Expression (N, Expression);
1930 end Make_Delay_Until_Statement;
1932 function Make_Delay_Relative_Statement (Sloc : Source_Ptr;
1933 Expression : Node_Id)
1936 N : constant Node_Id :=
1937 New_Node (N_Delay_Relative_Statement, Sloc);
1939 Set_Expression (N, Expression);
1941 end Make_Delay_Relative_Statement;
1943 function Make_Selective_Accept (Sloc : Source_Ptr;
1944 Select_Alternatives : List_Id;
1945 Else_Statements : List_Id := No_List)
1948 N : constant Node_Id :=
1949 New_Node (N_Selective_Accept, Sloc);
1951 Set_Select_Alternatives (N, Select_Alternatives);
1952 Set_Else_Statements (N, Else_Statements);
1954 end Make_Selective_Accept;
1956 function Make_Accept_Alternative (Sloc : Source_Ptr;
1957 Accept_Statement : Node_Id;
1958 Condition : Node_Id := Empty;
1959 Statements : List_Id := Empty_List;
1960 Pragmas_Before : List_Id := No_List)
1963 N : constant Node_Id :=
1964 New_Node (N_Accept_Alternative, Sloc);
1966 Set_Accept_Statement (N, Accept_Statement);
1967 Set_Condition (N, Condition);
1968 Set_Statements (N, Statements);
1969 Set_Pragmas_Before (N, Pragmas_Before);
1971 end Make_Accept_Alternative;
1973 function Make_Delay_Alternative (Sloc : Source_Ptr;
1974 Delay_Statement : Node_Id;
1975 Condition : Node_Id := Empty;
1976 Statements : List_Id := Empty_List;
1977 Pragmas_Before : List_Id := No_List)
1980 N : constant Node_Id :=
1981 New_Node (N_Delay_Alternative, Sloc);
1983 Set_Delay_Statement (N, Delay_Statement);
1984 Set_Condition (N, Condition);
1985 Set_Statements (N, Statements);
1986 Set_Pragmas_Before (N, Pragmas_Before);
1988 end Make_Delay_Alternative;
1990 function Make_Terminate_Alternative (Sloc : Source_Ptr;
1991 Condition : Node_Id := Empty;
1992 Pragmas_Before : List_Id := No_List;
1993 Pragmas_After : List_Id := No_List)
1996 N : constant Node_Id :=
1997 New_Node (N_Terminate_Alternative, Sloc);
1999 Set_Condition (N, Condition);
2000 Set_Pragmas_Before (N, Pragmas_Before);
2001 Set_Pragmas_After (N, Pragmas_After);
2003 end Make_Terminate_Alternative;
2005 function Make_Timed_Entry_Call (Sloc : Source_Ptr;
2006 Entry_Call_Alternative : Node_Id;
2007 Delay_Alternative : Node_Id)
2010 N : constant Node_Id :=
2011 New_Node (N_Timed_Entry_Call, Sloc);
2013 Set_Entry_Call_Alternative (N, Entry_Call_Alternative);
2014 Set_Delay_Alternative (N, Delay_Alternative);
2016 end Make_Timed_Entry_Call;
2018 function Make_Entry_Call_Alternative (Sloc : Source_Ptr;
2019 Entry_Call_Statement : Node_Id;
2020 Statements : List_Id := Empty_List;
2021 Pragmas_Before : List_Id := No_List)
2024 N : constant Node_Id :=
2025 New_Node (N_Entry_Call_Alternative, Sloc);
2027 Set_Entry_Call_Statement (N, Entry_Call_Statement);
2028 Set_Statements (N, Statements);
2029 Set_Pragmas_Before (N, Pragmas_Before);
2031 end Make_Entry_Call_Alternative;
2033 function Make_Conditional_Entry_Call (Sloc : Source_Ptr;
2034 Entry_Call_Alternative : Node_Id;
2035 Else_Statements : List_Id)
2038 N : constant Node_Id :=
2039 New_Node (N_Conditional_Entry_Call, Sloc);
2041 Set_Entry_Call_Alternative (N, Entry_Call_Alternative);
2042 Set_Else_Statements (N, Else_Statements);
2044 end Make_Conditional_Entry_Call;
2046 function Make_Asynchronous_Select (Sloc : Source_Ptr;
2047 Triggering_Alternative : Node_Id;
2048 Abortable_Part : Node_Id)
2051 N : constant Node_Id :=
2052 New_Node (N_Asynchronous_Select, Sloc);
2054 Set_Triggering_Alternative (N, Triggering_Alternative);
2055 Set_Abortable_Part (N, Abortable_Part);
2057 end Make_Asynchronous_Select;
2059 function Make_Triggering_Alternative (Sloc : Source_Ptr;
2060 Triggering_Statement : Node_Id;
2061 Statements : List_Id := Empty_List;
2062 Pragmas_Before : List_Id := No_List)
2065 N : constant Node_Id :=
2066 New_Node (N_Triggering_Alternative, Sloc);
2068 Set_Triggering_Statement (N, Triggering_Statement);
2069 Set_Statements (N, Statements);
2070 Set_Pragmas_Before (N, Pragmas_Before);
2072 end Make_Triggering_Alternative;
2074 function Make_Abortable_Part (Sloc : Source_Ptr;
2075 Statements : List_Id)
2078 N : constant Node_Id :=
2079 New_Node (N_Abortable_Part, Sloc);
2081 Set_Statements (N, Statements);
2083 end Make_Abortable_Part;
2085 function Make_Abort_Statement (Sloc : Source_Ptr;
2089 N : constant Node_Id :=
2090 New_Node (N_Abort_Statement, Sloc);
2092 Set_Names (N, Names);
2094 end Make_Abort_Statement;
2096 function Make_Compilation_Unit (Sloc : Source_Ptr;
2097 Context_Items : List_Id;
2098 Private_Present : Boolean := False;
2100 Aux_Decls_Node : Node_Id)
2103 N : constant Node_Id :=
2104 New_Node (N_Compilation_Unit, Sloc);
2106 Set_Context_Items (N, Context_Items);
2107 Set_Private_Present (N, Private_Present);
2109 Set_Aux_Decls_Node (N, Aux_Decls_Node);
2111 end Make_Compilation_Unit;
2113 function Make_Compilation_Unit_Aux (Sloc : Source_Ptr;
2114 Declarations : List_Id := No_List;
2115 Actions : List_Id := No_List;
2116 Pragmas_After : List_Id := No_List)
2119 N : constant Node_Id :=
2120 New_Node (N_Compilation_Unit_Aux, Sloc);
2122 Set_Declarations (N, Declarations);
2123 Set_Actions (N, Actions);
2124 Set_Pragmas_After (N, Pragmas_After);
2126 end Make_Compilation_Unit_Aux;
2128 function Make_With_Clause (Sloc : Source_Ptr;
2130 First_Name : Boolean := True;
2131 Last_Name : Boolean := True)
2134 N : constant Node_Id :=
2135 New_Node (N_With_Clause, Sloc);
2138 Set_First_Name (N, First_Name);
2139 Set_Last_Name (N, Last_Name);
2141 end Make_With_Clause;
2143 function Make_With_Type_Clause (Sloc : Source_Ptr;
2145 Tagged_Present : Boolean := False)
2148 N : constant Node_Id :=
2149 New_Node (N_With_Type_Clause, Sloc);
2152 Set_Tagged_Present (N, Tagged_Present);
2154 end Make_With_Type_Clause;
2156 function Make_Subprogram_Body_Stub (Sloc : Source_Ptr;
2157 Specification : Node_Id)
2160 N : constant Node_Id :=
2161 New_Node (N_Subprogram_Body_Stub, Sloc);
2163 Set_Specification (N, Specification);
2165 end Make_Subprogram_Body_Stub;
2167 function Make_Package_Body_Stub (Sloc : Source_Ptr;
2168 Defining_Identifier : Node_Id)
2171 N : constant Node_Id :=
2172 New_Node (N_Package_Body_Stub, Sloc);
2174 Set_Defining_Identifier (N, Defining_Identifier);
2176 end Make_Package_Body_Stub;
2178 function Make_Task_Body_Stub (Sloc : Source_Ptr;
2179 Defining_Identifier : Node_Id)
2182 N : constant Node_Id :=
2183 New_Node (N_Task_Body_Stub, Sloc);
2185 Set_Defining_Identifier (N, Defining_Identifier);
2187 end Make_Task_Body_Stub;
2189 function Make_Protected_Body_Stub (Sloc : Source_Ptr;
2190 Defining_Identifier : Node_Id)
2193 N : constant Node_Id :=
2194 New_Node (N_Protected_Body_Stub, Sloc);
2196 Set_Defining_Identifier (N, Defining_Identifier);
2198 end Make_Protected_Body_Stub;
2200 function Make_Subunit (Sloc : Source_Ptr;
2202 Proper_Body : Node_Id)
2205 N : constant Node_Id :=
2206 New_Node (N_Subunit, Sloc);
2209 Set_Proper_Body (N, Proper_Body);
2213 function Make_Exception_Declaration (Sloc : Source_Ptr;
2214 Defining_Identifier : Node_Id)
2217 N : constant Node_Id :=
2218 New_Node (N_Exception_Declaration, Sloc);
2220 Set_Defining_Identifier (N, Defining_Identifier);
2222 end Make_Exception_Declaration;
2224 function Make_Handled_Sequence_Of_Statements (Sloc : Source_Ptr;
2225 Statements : List_Id;
2226 End_Label : Node_Id := Empty;
2227 Exception_Handlers : List_Id := No_List;
2228 At_End_Proc : Node_Id := Empty)
2231 N : constant Node_Id :=
2232 New_Node (N_Handled_Sequence_Of_Statements, Sloc);
2234 Set_Statements (N, Statements);
2235 Set_End_Label (N, End_Label);
2236 Set_Exception_Handlers (N, Exception_Handlers);
2237 Set_At_End_Proc (N, At_End_Proc);
2239 end Make_Handled_Sequence_Of_Statements;
2241 function Make_Exception_Handler (Sloc : Source_Ptr;
2242 Choice_Parameter : Node_Id := Empty;
2243 Exception_Choices : List_Id;
2244 Statements : List_Id)
2247 N : constant Node_Id :=
2248 New_Node (N_Exception_Handler, Sloc);
2250 Set_Choice_Parameter (N, Choice_Parameter);
2251 Set_Exception_Choices (N, Exception_Choices);
2252 Set_Statements (N, Statements);
2254 end Make_Exception_Handler;
2256 function Make_Raise_Statement (Sloc : Source_Ptr;
2257 Name : Node_Id := Empty)
2260 N : constant Node_Id :=
2261 New_Node (N_Raise_Statement, Sloc);
2265 end Make_Raise_Statement;
2267 function Make_Generic_Subprogram_Declaration (Sloc : Source_Ptr;
2268 Specification : Node_Id;
2269 Generic_Formal_Declarations : List_Id)
2272 N : constant Node_Id :=
2273 New_Node (N_Generic_Subprogram_Declaration, Sloc);
2275 Set_Specification (N, Specification);
2276 Set_Generic_Formal_Declarations (N, Generic_Formal_Declarations);
2278 end Make_Generic_Subprogram_Declaration;
2280 function Make_Generic_Package_Declaration (Sloc : Source_Ptr;
2281 Specification : Node_Id;
2282 Generic_Formal_Declarations : List_Id)
2285 N : constant Node_Id :=
2286 New_Node (N_Generic_Package_Declaration, Sloc);
2288 Set_Specification (N, Specification);
2289 Set_Generic_Formal_Declarations (N, Generic_Formal_Declarations);
2291 end Make_Generic_Package_Declaration;
2293 function Make_Package_Instantiation (Sloc : Source_Ptr;
2294 Defining_Unit_Name : Node_Id;
2296 Generic_Associations : List_Id := No_List)
2299 N : constant Node_Id :=
2300 New_Node (N_Package_Instantiation, Sloc);
2302 Set_Defining_Unit_Name (N, Defining_Unit_Name);
2304 Set_Generic_Associations (N, Generic_Associations);
2306 end Make_Package_Instantiation;
2308 function Make_Procedure_Instantiation (Sloc : Source_Ptr;
2309 Defining_Unit_Name : Node_Id;
2311 Generic_Associations : List_Id := No_List)
2314 N : constant Node_Id :=
2315 New_Node (N_Procedure_Instantiation, Sloc);
2317 Set_Defining_Unit_Name (N, Defining_Unit_Name);
2319 Set_Generic_Associations (N, Generic_Associations);
2321 end Make_Procedure_Instantiation;
2323 function Make_Function_Instantiation (Sloc : Source_Ptr;
2324 Defining_Unit_Name : Node_Id;
2326 Generic_Associations : List_Id := No_List)
2329 N : constant Node_Id :=
2330 New_Node (N_Function_Instantiation, Sloc);
2332 Set_Defining_Unit_Name (N, Defining_Unit_Name);
2334 Set_Generic_Associations (N, Generic_Associations);
2336 end Make_Function_Instantiation;
2338 function Make_Generic_Association (Sloc : Source_Ptr;
2339 Selector_Name : Node_Id := Empty;
2340 Explicit_Generic_Actual_Parameter : Node_Id)
2343 N : constant Node_Id :=
2344 New_Node (N_Generic_Association, Sloc);
2346 Set_Selector_Name (N, Selector_Name);
2347 Set_Explicit_Generic_Actual_Parameter
2348 (N, Explicit_Generic_Actual_Parameter);
2350 end Make_Generic_Association;
2352 function Make_Formal_Object_Declaration (Sloc : Source_Ptr;
2353 Defining_Identifier : Node_Id;
2354 In_Present : Boolean := False;
2355 Out_Present : Boolean := False;
2356 Subtype_Mark : Node_Id;
2357 Expression : Node_Id := Empty)
2360 N : constant Node_Id :=
2361 New_Node (N_Formal_Object_Declaration, Sloc);
2363 Set_Defining_Identifier (N, Defining_Identifier);
2364 Set_In_Present (N, In_Present);
2365 Set_Out_Present (N, Out_Present);
2366 Set_Subtype_Mark (N, Subtype_Mark);
2367 Set_Expression (N, Expression);
2369 end Make_Formal_Object_Declaration;
2371 function Make_Formal_Type_Declaration (Sloc : Source_Ptr;
2372 Defining_Identifier : Node_Id;
2373 Formal_Type_Definition : Node_Id;
2374 Discriminant_Specifications : List_Id := No_List;
2375 Unknown_Discriminants_Present : Boolean := False)
2378 N : constant Node_Id :=
2379 New_Node (N_Formal_Type_Declaration, Sloc);
2381 Set_Defining_Identifier (N, Defining_Identifier);
2382 Set_Formal_Type_Definition (N, Formal_Type_Definition);
2383 Set_Discriminant_Specifications (N, Discriminant_Specifications);
2384 Set_Unknown_Discriminants_Present
2385 (N, Unknown_Discriminants_Present);
2387 end Make_Formal_Type_Declaration;
2389 function Make_Formal_Private_Type_Definition (Sloc : Source_Ptr;
2390 Abstract_Present : Boolean := False;
2391 Tagged_Present : Boolean := False;
2392 Limited_Present : Boolean := False)
2395 N : constant Node_Id :=
2396 New_Node (N_Formal_Private_Type_Definition, Sloc);
2398 Set_Abstract_Present (N, Abstract_Present);
2399 Set_Tagged_Present (N, Tagged_Present);
2400 Set_Limited_Present (N, Limited_Present);
2402 end Make_Formal_Private_Type_Definition;
2404 function Make_Formal_Derived_Type_Definition (Sloc : Source_Ptr;
2405 Subtype_Mark : Node_Id;
2406 Private_Present : Boolean := False;
2407 Abstract_Present : Boolean := False)
2410 N : constant Node_Id :=
2411 New_Node (N_Formal_Derived_Type_Definition, Sloc);
2413 Set_Subtype_Mark (N, Subtype_Mark);
2414 Set_Private_Present (N, Private_Present);
2415 Set_Abstract_Present (N, Abstract_Present);
2417 end Make_Formal_Derived_Type_Definition;
2419 function Make_Formal_Discrete_Type_Definition (Sloc : Source_Ptr)
2422 N : constant Node_Id :=
2423 New_Node (N_Formal_Discrete_Type_Definition, Sloc);
2426 end Make_Formal_Discrete_Type_Definition;
2428 function Make_Formal_Signed_Integer_Type_Definition (Sloc : Source_Ptr)
2431 N : constant Node_Id :=
2432 New_Node (N_Formal_Signed_Integer_Type_Definition, Sloc);
2435 end Make_Formal_Signed_Integer_Type_Definition;
2437 function Make_Formal_Modular_Type_Definition (Sloc : Source_Ptr)
2440 N : constant Node_Id :=
2441 New_Node (N_Formal_Modular_Type_Definition, Sloc);
2444 end Make_Formal_Modular_Type_Definition;
2446 function Make_Formal_Floating_Point_Definition (Sloc : Source_Ptr)
2449 N : constant Node_Id :=
2450 New_Node (N_Formal_Floating_Point_Definition, Sloc);
2453 end Make_Formal_Floating_Point_Definition;
2455 function Make_Formal_Ordinary_Fixed_Point_Definition (Sloc : Source_Ptr)
2458 N : constant Node_Id :=
2459 New_Node (N_Formal_Ordinary_Fixed_Point_Definition, Sloc);
2462 end Make_Formal_Ordinary_Fixed_Point_Definition;
2464 function Make_Formal_Decimal_Fixed_Point_Definition (Sloc : Source_Ptr)
2467 N : constant Node_Id :=
2468 New_Node (N_Formal_Decimal_Fixed_Point_Definition, Sloc);
2471 end Make_Formal_Decimal_Fixed_Point_Definition;
2473 function Make_Formal_Subprogram_Declaration (Sloc : Source_Ptr;
2474 Specification : Node_Id;
2475 Default_Name : Node_Id := Empty;
2476 Box_Present : Boolean := False)
2479 N : constant Node_Id :=
2480 New_Node (N_Formal_Subprogram_Declaration, Sloc);
2482 Set_Specification (N, Specification);
2483 Set_Default_Name (N, Default_Name);
2484 Set_Box_Present (N, Box_Present);
2486 end Make_Formal_Subprogram_Declaration;
2488 function Make_Formal_Package_Declaration (Sloc : Source_Ptr;
2489 Defining_Identifier : Node_Id;
2491 Generic_Associations : List_Id := No_List;
2492 Box_Present : Boolean := False)
2495 N : constant Node_Id :=
2496 New_Node (N_Formal_Package_Declaration, Sloc);
2498 Set_Defining_Identifier (N, Defining_Identifier);
2500 Set_Generic_Associations (N, Generic_Associations);
2501 Set_Box_Present (N, Box_Present);
2503 end Make_Formal_Package_Declaration;
2505 function Make_Attribute_Definition_Clause (Sloc : Source_Ptr;
2508 Expression : Node_Id)
2511 N : constant Node_Id :=
2512 New_Node (N_Attribute_Definition_Clause, Sloc);
2515 Set_Chars (N, Chars);
2516 Set_Expression (N, Expression);
2518 end Make_Attribute_Definition_Clause;
2520 function Make_Enumeration_Representation_Clause (Sloc : Source_Ptr;
2521 Identifier : Node_Id;
2522 Array_Aggregate : Node_Id)
2525 N : constant Node_Id :=
2526 New_Node (N_Enumeration_Representation_Clause, Sloc);
2528 Set_Identifier (N, Identifier);
2529 Set_Array_Aggregate (N, Array_Aggregate);
2531 end Make_Enumeration_Representation_Clause;
2533 function Make_Record_Representation_Clause (Sloc : Source_Ptr;
2534 Identifier : Node_Id;
2535 Mod_Clause : Node_Id := Empty;
2536 Component_Clauses : List_Id)
2539 N : constant Node_Id :=
2540 New_Node (N_Record_Representation_Clause, Sloc);
2542 Set_Identifier (N, Identifier);
2543 Set_Mod_Clause (N, Mod_Clause);
2544 Set_Component_Clauses (N, Component_Clauses);
2546 end Make_Record_Representation_Clause;
2548 function Make_Component_Clause (Sloc : Source_Ptr;
2549 Component_Name : Node_Id;
2551 First_Bit : Node_Id;
2555 N : constant Node_Id :=
2556 New_Node (N_Component_Clause, Sloc);
2558 Set_Component_Name (N, Component_Name);
2559 Set_Position (N, Position);
2560 Set_First_Bit (N, First_Bit);
2561 Set_Last_Bit (N, Last_Bit);
2563 end Make_Component_Clause;
2565 function Make_Code_Statement (Sloc : Source_Ptr;
2566 Expression : Node_Id)
2569 N : constant Node_Id :=
2570 New_Node (N_Code_Statement, Sloc);
2572 Set_Expression (N, Expression);
2574 end Make_Code_Statement;
2576 function Make_Op_Rotate_Left (Sloc : Source_Ptr;
2577 Left_Opnd : Node_Id;
2578 Right_Opnd : Node_Id)
2581 N : constant Node_Id :=
2582 New_Node (N_Op_Rotate_Left, Sloc);
2584 Set_Left_Opnd (N, Left_Opnd);
2585 Set_Right_Opnd (N, Right_Opnd);
2586 Set_Chars (N, Name_Rotate_Left);
2587 Set_Entity (N, Standard_Op_Rotate_Left);
2589 end Make_Op_Rotate_Left;
2591 function Make_Op_Rotate_Right (Sloc : Source_Ptr;
2592 Left_Opnd : Node_Id;
2593 Right_Opnd : Node_Id)
2596 N : constant Node_Id :=
2597 New_Node (N_Op_Rotate_Right, Sloc);
2599 Set_Left_Opnd (N, Left_Opnd);
2600 Set_Right_Opnd (N, Right_Opnd);
2601 Set_Chars (N, Name_Rotate_Right);
2602 Set_Entity (N, Standard_Op_Rotate_Right);
2604 end Make_Op_Rotate_Right;
2606 function Make_Op_Shift_Left (Sloc : Source_Ptr;
2607 Left_Opnd : Node_Id;
2608 Right_Opnd : Node_Id)
2611 N : constant Node_Id :=
2612 New_Node (N_Op_Shift_Left, Sloc);
2614 Set_Left_Opnd (N, Left_Opnd);
2615 Set_Right_Opnd (N, Right_Opnd);
2616 Set_Chars (N, Name_Shift_Left);
2617 Set_Entity (N, Standard_Op_Shift_Left);
2619 end Make_Op_Shift_Left;
2621 function Make_Op_Shift_Right_Arithmetic (Sloc : Source_Ptr;
2622 Left_Opnd : Node_Id;
2623 Right_Opnd : Node_Id)
2626 N : constant Node_Id :=
2627 New_Node (N_Op_Shift_Right_Arithmetic, Sloc);
2629 Set_Left_Opnd (N, Left_Opnd);
2630 Set_Right_Opnd (N, Right_Opnd);
2631 Set_Chars (N, Name_Shift_Right_Arithmetic);
2632 Set_Entity (N, Standard_Op_Shift_Right_Arithmetic);
2634 end Make_Op_Shift_Right_Arithmetic;
2636 function Make_Op_Shift_Right (Sloc : Source_Ptr;
2637 Left_Opnd : Node_Id;
2638 Right_Opnd : Node_Id)
2641 N : constant Node_Id :=
2642 New_Node (N_Op_Shift_Right, Sloc);
2644 Set_Left_Opnd (N, Left_Opnd);
2645 Set_Right_Opnd (N, Right_Opnd);
2646 Set_Chars (N, Name_Shift_Right);
2647 Set_Entity (N, Standard_Op_Shift_Right);
2649 end Make_Op_Shift_Right;
2651 function Make_Delta_Constraint (Sloc : Source_Ptr;
2652 Delta_Expression : Node_Id;
2653 Range_Constraint : Node_Id := Empty)
2656 N : constant Node_Id :=
2657 New_Node (N_Delta_Constraint, Sloc);
2659 Set_Delta_Expression (N, Delta_Expression);
2660 Set_Range_Constraint (N, Range_Constraint);
2662 end Make_Delta_Constraint;
2664 function Make_At_Clause (Sloc : Source_Ptr;
2665 Identifier : Node_Id;
2666 Expression : Node_Id)
2669 N : constant Node_Id :=
2670 New_Node (N_At_Clause, Sloc);
2672 Set_Identifier (N, Identifier);
2673 Set_Expression (N, Expression);
2677 function Make_Mod_Clause (Sloc : Source_Ptr;
2678 Expression : Node_Id;
2679 Pragmas_Before : List_Id)
2682 N : constant Node_Id :=
2683 New_Node (N_Mod_Clause, Sloc);
2685 Set_Expression (N, Expression);
2686 Set_Pragmas_Before (N, Pragmas_Before);
2688 end Make_Mod_Clause;
2690 function Make_Conditional_Expression (Sloc : Source_Ptr;
2691 Expressions : List_Id)
2694 N : constant Node_Id :=
2695 New_Node (N_Conditional_Expression, Sloc);
2697 Set_Expressions (N, Expressions);
2699 end Make_Conditional_Expression;
2701 function Make_Expanded_Name (Sloc : Source_Ptr;
2704 Selector_Name : Node_Id)
2707 N : constant Node_Id :=
2708 New_Node (N_Expanded_Name, Sloc);
2710 Set_Chars (N, Chars);
2711 Set_Prefix (N, Prefix);
2712 Set_Selector_Name (N, Selector_Name);
2714 end Make_Expanded_Name;
2716 function Make_Free_Statement (Sloc : Source_Ptr;
2717 Expression : Node_Id)
2720 N : constant Node_Id :=
2721 New_Node (N_Free_Statement, Sloc);
2723 Set_Expression (N, Expression);
2725 end Make_Free_Statement;
2727 function Make_Freeze_Entity (Sloc : Source_Ptr;
2728 Actions : List_Id := No_List)
2731 N : constant Node_Id :=
2732 New_Node (N_Freeze_Entity, Sloc);
2734 Set_Actions (N, Actions);
2736 end Make_Freeze_Entity;
2738 function Make_Implicit_Label_Declaration (Sloc : Source_Ptr;
2739 Defining_Identifier : Node_Id)
2742 N : constant Node_Id :=
2743 New_Node (N_Implicit_Label_Declaration, Sloc);
2745 Set_Defining_Identifier (N, Defining_Identifier);
2747 end Make_Implicit_Label_Declaration;
2749 function Make_Itype_Reference (Sloc : Source_Ptr)
2752 N : constant Node_Id :=
2753 New_Node (N_Itype_Reference, Sloc);
2756 end Make_Itype_Reference;
2758 function Make_Raise_Constraint_Error (Sloc : Source_Ptr;
2759 Condition : Node_Id := Empty)
2762 N : constant Node_Id :=
2763 New_Node (N_Raise_Constraint_Error, Sloc);
2765 Set_Condition (N, Condition);
2767 end Make_Raise_Constraint_Error;
2769 function Make_Raise_Program_Error (Sloc : Source_Ptr;
2770 Condition : Node_Id := Empty)
2773 N : constant Node_Id :=
2774 New_Node (N_Raise_Program_Error, Sloc);
2776 Set_Condition (N, Condition);
2778 end Make_Raise_Program_Error;
2780 function Make_Raise_Storage_Error (Sloc : Source_Ptr;
2781 Condition : Node_Id := Empty)
2784 N : constant Node_Id :=
2785 New_Node (N_Raise_Storage_Error, Sloc);
2787 Set_Condition (N, Condition);
2789 end Make_Raise_Storage_Error;
2791 function Make_Reference (Sloc : Source_Ptr;
2795 N : constant Node_Id :=
2796 New_Node (N_Reference, Sloc);
2798 Set_Prefix (N, Prefix);
2802 function Make_Subprogram_Info (Sloc : Source_Ptr;
2803 Identifier : Node_Id)
2806 N : constant Node_Id :=
2807 New_Node (N_Subprogram_Info, Sloc);
2809 Set_Identifier (N, Identifier);
2811 end Make_Subprogram_Info;
2813 function Make_Unchecked_Expression (Sloc : Source_Ptr;
2814 Expression : Node_Id)
2817 N : constant Node_Id :=
2818 New_Node (N_Unchecked_Expression, Sloc);
2820 Set_Expression (N, Expression);
2822 end Make_Unchecked_Expression;
2824 function Make_Unchecked_Type_Conversion (Sloc : Source_Ptr;
2825 Subtype_Mark : Node_Id;
2826 Expression : Node_Id)
2829 N : constant Node_Id :=
2830 New_Node (N_Unchecked_Type_Conversion, Sloc);
2832 Set_Subtype_Mark (N, Subtype_Mark);
2833 Set_Expression (N, Expression);
2835 end Make_Unchecked_Type_Conversion;
2837 function Make_Validate_Unchecked_Conversion (Sloc : Source_Ptr)
2840 N : constant Node_Id :=
2841 New_Node (N_Validate_Unchecked_Conversion, Sloc);
2844 end Make_Validate_Unchecked_Conversion;