1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 2, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
20 -- MA 02111-1307, USA. --
22 -- GNAT was originally developed by the GNAT team at New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc. --
25 ------------------------------------------------------------------------------
27 pragma Style_Checks (All_Checks);
28 -- Turn off subprogram order checking, since the routines here are
29 -- generated automatically in order.
32 with Atree; use Atree;
33 with Sinfo; use Sinfo;
34 with Snames; use Snames;
35 with Stand; use Stand;
39 function Make_Unused_At_Start (Sloc : Source_Ptr)
42 N : constant Node_Id :=
43 New_Node (N_Unused_At_Start, Sloc);
46 end Make_Unused_At_Start;
48 function Make_Unused_At_End (Sloc : Source_Ptr)
51 N : constant Node_Id :=
52 New_Node (N_Unused_At_End, Sloc);
55 end Make_Unused_At_End;
57 function Make_Identifier (Sloc : Source_Ptr;
61 N : constant Node_Id :=
62 New_Node (N_Identifier, Sloc);
68 function Make_Integer_Literal (Sloc : Source_Ptr;
72 N : constant Node_Id :=
73 New_Node (N_Integer_Literal, Sloc);
75 Set_Intval (N, Intval);
77 end Make_Integer_Literal;
79 function Make_Real_Literal (Sloc : Source_Ptr;
83 N : constant Node_Id :=
84 New_Node (N_Real_Literal, Sloc);
86 Set_Realval (N, Realval);
88 end Make_Real_Literal;
90 function Make_Character_Literal (Sloc : Source_Ptr;
92 Char_Literal_Value : Char_Code)
95 N : constant Node_Id :=
96 New_Node (N_Character_Literal, Sloc);
99 Set_Char_Literal_Value (N, Char_Literal_Value);
101 end Make_Character_Literal;
103 function Make_String_Literal (Sloc : Source_Ptr;
107 N : constant Node_Id :=
108 New_Node (N_String_Literal, Sloc);
110 Set_Strval (N, Strval);
112 end Make_String_Literal;
114 function Make_Pragma (Sloc : Source_Ptr;
116 Pragma_Argument_Associations : List_Id := No_List;
117 Debug_Statement : Node_Id := Empty)
120 N : constant Node_Id :=
121 New_Node (N_Pragma, Sloc);
123 Set_Chars (N, Chars);
124 Set_Pragma_Argument_Associations
125 (N, Pragma_Argument_Associations);
126 Set_Debug_Statement (N, Debug_Statement);
130 function Make_Pragma_Argument_Association (Sloc : Source_Ptr;
131 Chars : Name_Id := No_Name;
132 Expression : Node_Id)
135 N : constant Node_Id :=
136 New_Node (N_Pragma_Argument_Association, Sloc);
138 Set_Chars (N, Chars);
139 Set_Expression (N, Expression);
141 end Make_Pragma_Argument_Association;
143 function Make_Defining_Identifier (Sloc : Source_Ptr;
147 N : constant Node_Id :=
148 New_Entity (N_Defining_Identifier, Sloc);
150 Set_Chars (N, Chars);
152 end Make_Defining_Identifier;
154 function Make_Full_Type_Declaration (Sloc : Source_Ptr;
155 Defining_Identifier : Node_Id;
156 Discriminant_Specifications : List_Id := No_List;
157 Type_Definition : Node_Id)
160 N : constant Node_Id :=
161 New_Node (N_Full_Type_Declaration, Sloc);
163 Set_Defining_Identifier (N, Defining_Identifier);
164 Set_Discriminant_Specifications (N, Discriminant_Specifications);
165 Set_Type_Definition (N, Type_Definition);
167 end Make_Full_Type_Declaration;
169 function Make_Subtype_Declaration (Sloc : Source_Ptr;
170 Defining_Identifier : Node_Id;
171 Subtype_Indication : Node_Id)
174 N : constant Node_Id :=
175 New_Node (N_Subtype_Declaration, Sloc);
177 Set_Defining_Identifier (N, Defining_Identifier);
178 Set_Subtype_Indication (N, Subtype_Indication);
180 end Make_Subtype_Declaration;
182 function Make_Subtype_Indication (Sloc : Source_Ptr;
183 Subtype_Mark : Node_Id;
184 Constraint : Node_Id)
187 N : constant Node_Id :=
188 New_Node (N_Subtype_Indication, Sloc);
190 Set_Subtype_Mark (N, Subtype_Mark);
191 Set_Constraint (N, Constraint);
193 end Make_Subtype_Indication;
195 function Make_Object_Declaration (Sloc : Source_Ptr;
196 Defining_Identifier : Node_Id;
197 Aliased_Present : Boolean := False;
198 Constant_Present : Boolean := False;
199 Object_Definition : Node_Id;
200 Expression : Node_Id := Empty)
203 N : constant Node_Id :=
204 New_Node (N_Object_Declaration, Sloc);
206 Set_Defining_Identifier (N, Defining_Identifier);
207 Set_Aliased_Present (N, Aliased_Present);
208 Set_Constant_Present (N, Constant_Present);
209 Set_Object_Definition (N, Object_Definition);
210 Set_Expression (N, Expression);
212 end Make_Object_Declaration;
214 function Make_Number_Declaration (Sloc : Source_Ptr;
215 Defining_Identifier : Node_Id;
216 Expression : Node_Id)
219 N : constant Node_Id :=
220 New_Node (N_Number_Declaration, Sloc);
222 Set_Defining_Identifier (N, Defining_Identifier);
223 Set_Expression (N, Expression);
225 end Make_Number_Declaration;
227 function Make_Derived_Type_Definition (Sloc : Source_Ptr;
228 Abstract_Present : Boolean := False;
229 Subtype_Indication : Node_Id;
230 Record_Extension_Part : Node_Id := Empty)
233 N : constant Node_Id :=
234 New_Node (N_Derived_Type_Definition, Sloc);
236 Set_Abstract_Present (N, Abstract_Present);
237 Set_Subtype_Indication (N, Subtype_Indication);
238 Set_Record_Extension_Part (N, Record_Extension_Part);
240 end Make_Derived_Type_Definition;
242 function Make_Range_Constraint (Sloc : Source_Ptr;
243 Range_Expression : Node_Id)
246 N : constant Node_Id :=
247 New_Node (N_Range_Constraint, Sloc);
249 Set_Range_Expression (N, Range_Expression);
251 end Make_Range_Constraint;
253 function Make_Range (Sloc : Source_Ptr;
255 High_Bound : Node_Id;
256 Includes_Infinities : Boolean := False)
259 N : constant Node_Id :=
260 New_Node (N_Range, Sloc);
262 Set_Low_Bound (N, Low_Bound);
263 Set_High_Bound (N, High_Bound);
264 Set_Includes_Infinities (N, Includes_Infinities);
268 function Make_Enumeration_Type_Definition (Sloc : Source_Ptr;
270 End_Label : Node_Id := Empty)
273 N : constant Node_Id :=
274 New_Node (N_Enumeration_Type_Definition, Sloc);
276 Set_Literals (N, Literals);
277 Set_End_Label (N, End_Label);
279 end Make_Enumeration_Type_Definition;
281 function Make_Defining_Character_Literal (Sloc : Source_Ptr;
285 N : constant Node_Id :=
286 New_Entity (N_Defining_Character_Literal, Sloc);
288 Set_Chars (N, Chars);
290 end Make_Defining_Character_Literal;
292 function Make_Signed_Integer_Type_Definition (Sloc : Source_Ptr;
294 High_Bound : Node_Id)
297 N : constant Node_Id :=
298 New_Node (N_Signed_Integer_Type_Definition, Sloc);
300 Set_Low_Bound (N, Low_Bound);
301 Set_High_Bound (N, High_Bound);
303 end Make_Signed_Integer_Type_Definition;
305 function Make_Modular_Type_Definition (Sloc : Source_Ptr;
306 Expression : Node_Id)
309 N : constant Node_Id :=
310 New_Node (N_Modular_Type_Definition, Sloc);
312 Set_Expression (N, Expression);
314 end Make_Modular_Type_Definition;
316 function Make_Floating_Point_Definition (Sloc : Source_Ptr;
317 Digits_Expression : Node_Id;
318 Real_Range_Specification : Node_Id := Empty)
321 N : constant Node_Id :=
322 New_Node (N_Floating_Point_Definition, Sloc);
324 Set_Digits_Expression (N, Digits_Expression);
325 Set_Real_Range_Specification (N, Real_Range_Specification);
327 end Make_Floating_Point_Definition;
329 function Make_Real_Range_Specification (Sloc : Source_Ptr;
331 High_Bound : Node_Id)
334 N : constant Node_Id :=
335 New_Node (N_Real_Range_Specification, Sloc);
337 Set_Low_Bound (N, Low_Bound);
338 Set_High_Bound (N, High_Bound);
340 end Make_Real_Range_Specification;
342 function Make_Ordinary_Fixed_Point_Definition (Sloc : Source_Ptr;
343 Delta_Expression : Node_Id;
344 Real_Range_Specification : Node_Id)
347 N : constant Node_Id :=
348 New_Node (N_Ordinary_Fixed_Point_Definition, Sloc);
350 Set_Delta_Expression (N, Delta_Expression);
351 Set_Real_Range_Specification (N, Real_Range_Specification);
353 end Make_Ordinary_Fixed_Point_Definition;
355 function Make_Decimal_Fixed_Point_Definition (Sloc : Source_Ptr;
356 Delta_Expression : Node_Id;
357 Digits_Expression : Node_Id;
358 Real_Range_Specification : Node_Id := Empty)
361 N : constant Node_Id :=
362 New_Node (N_Decimal_Fixed_Point_Definition, Sloc);
364 Set_Delta_Expression (N, Delta_Expression);
365 Set_Digits_Expression (N, Digits_Expression);
366 Set_Real_Range_Specification (N, Real_Range_Specification);
368 end Make_Decimal_Fixed_Point_Definition;
370 function Make_Digits_Constraint (Sloc : Source_Ptr;
371 Digits_Expression : Node_Id;
372 Range_Constraint : Node_Id := Empty)
375 N : constant Node_Id :=
376 New_Node (N_Digits_Constraint, Sloc);
378 Set_Digits_Expression (N, Digits_Expression);
379 Set_Range_Constraint (N, Range_Constraint);
381 end Make_Digits_Constraint;
383 function Make_Unconstrained_Array_Definition (Sloc : Source_Ptr;
384 Subtype_Marks : List_Id;
385 Aliased_Present : Boolean := False;
386 Subtype_Indication : Node_Id)
389 N : constant Node_Id :=
390 New_Node (N_Unconstrained_Array_Definition, Sloc);
392 Set_Subtype_Marks (N, Subtype_Marks);
393 Set_Aliased_Present (N, Aliased_Present);
394 Set_Subtype_Indication (N, Subtype_Indication);
396 end Make_Unconstrained_Array_Definition;
398 function Make_Constrained_Array_Definition (Sloc : Source_Ptr;
399 Discrete_Subtype_Definitions : List_Id;
400 Aliased_Present : Boolean := False;
401 Subtype_Indication : Node_Id)
404 N : constant Node_Id :=
405 New_Node (N_Constrained_Array_Definition, Sloc);
407 Set_Discrete_Subtype_Definitions
408 (N, Discrete_Subtype_Definitions);
409 Set_Aliased_Present (N, Aliased_Present);
410 Set_Subtype_Indication (N, Subtype_Indication);
412 end Make_Constrained_Array_Definition;
414 function Make_Discriminant_Specification (Sloc : Source_Ptr;
415 Defining_Identifier : Node_Id;
416 Discriminant_Type : Node_Id;
417 Expression : Node_Id := Empty)
420 N : constant Node_Id :=
421 New_Node (N_Discriminant_Specification, Sloc);
423 Set_Defining_Identifier (N, Defining_Identifier);
424 Set_Discriminant_Type (N, Discriminant_Type);
425 Set_Expression (N, Expression);
427 end Make_Discriminant_Specification;
429 function Make_Index_Or_Discriminant_Constraint (Sloc : Source_Ptr;
430 Constraints : List_Id)
433 N : constant Node_Id :=
434 New_Node (N_Index_Or_Discriminant_Constraint, Sloc);
436 Set_Constraints (N, Constraints);
438 end Make_Index_Or_Discriminant_Constraint;
440 function Make_Discriminant_Association (Sloc : Source_Ptr;
441 Selector_Names : List_Id;
442 Expression : Node_Id)
445 N : constant Node_Id :=
446 New_Node (N_Discriminant_Association, Sloc);
448 Set_Selector_Names (N, Selector_Names);
449 Set_Expression (N, Expression);
451 end Make_Discriminant_Association;
453 function Make_Record_Definition (Sloc : Source_Ptr;
454 End_Label : Node_Id := Empty;
455 Abstract_Present : Boolean := False;
456 Tagged_Present : Boolean := False;
457 Limited_Present : Boolean := False;
458 Component_List : Node_Id;
459 Null_Present : Boolean := False)
462 N : constant Node_Id :=
463 New_Node (N_Record_Definition, Sloc);
465 Set_End_Label (N, End_Label);
466 Set_Abstract_Present (N, Abstract_Present);
467 Set_Tagged_Present (N, Tagged_Present);
468 Set_Limited_Present (N, Limited_Present);
469 Set_Component_List (N, Component_List);
470 Set_Null_Present (N, Null_Present);
472 end Make_Record_Definition;
474 function Make_Component_List (Sloc : Source_Ptr;
475 Component_Items : List_Id;
476 Variant_Part : Node_Id := Empty;
477 Null_Present : Boolean := False)
480 N : constant Node_Id :=
481 New_Node (N_Component_List, Sloc);
483 Set_Component_Items (N, Component_Items);
484 Set_Variant_Part (N, Variant_Part);
485 Set_Null_Present (N, Null_Present);
487 end Make_Component_List;
489 function Make_Component_Declaration (Sloc : Source_Ptr;
490 Defining_Identifier : Node_Id;
491 Aliased_Present : Boolean := False;
492 Subtype_Indication : Node_Id;
493 Expression : Node_Id := Empty)
496 N : constant Node_Id :=
497 New_Node (N_Component_Declaration, Sloc);
499 Set_Defining_Identifier (N, Defining_Identifier);
500 Set_Aliased_Present (N, Aliased_Present);
501 Set_Subtype_Indication (N, Subtype_Indication);
502 Set_Expression (N, Expression);
504 end Make_Component_Declaration;
506 function Make_Variant_Part (Sloc : Source_Ptr;
511 N : constant Node_Id :=
512 New_Node (N_Variant_Part, Sloc);
515 Set_Variants (N, Variants);
517 end Make_Variant_Part;
519 function Make_Variant (Sloc : Source_Ptr;
520 Discrete_Choices : List_Id;
521 Component_List : Node_Id)
524 N : constant Node_Id :=
525 New_Node (N_Variant, Sloc);
527 Set_Discrete_Choices (N, Discrete_Choices);
528 Set_Component_List (N, Component_List);
532 function Make_Others_Choice (Sloc : Source_Ptr)
535 N : constant Node_Id :=
536 New_Node (N_Others_Choice, Sloc);
539 end Make_Others_Choice;
541 function Make_Access_To_Object_Definition (Sloc : Source_Ptr;
542 All_Present : Boolean := False;
543 Subtype_Indication : Node_Id;
544 Constant_Present : Boolean := False)
547 N : constant Node_Id :=
548 New_Node (N_Access_To_Object_Definition, Sloc);
550 Set_All_Present (N, All_Present);
551 Set_Subtype_Indication (N, Subtype_Indication);
552 Set_Constant_Present (N, Constant_Present);
554 end Make_Access_To_Object_Definition;
556 function Make_Access_Function_Definition (Sloc : Source_Ptr;
557 Protected_Present : Boolean := False;
558 Parameter_Specifications : List_Id := No_List;
559 Subtype_Mark : Node_Id)
562 N : constant Node_Id :=
563 New_Node (N_Access_Function_Definition, Sloc);
565 Set_Protected_Present (N, Protected_Present);
566 Set_Parameter_Specifications (N, Parameter_Specifications);
567 Set_Subtype_Mark (N, Subtype_Mark);
569 end Make_Access_Function_Definition;
571 function Make_Access_Procedure_Definition (Sloc : Source_Ptr;
572 Protected_Present : Boolean := False;
573 Parameter_Specifications : List_Id := No_List)
576 N : constant Node_Id :=
577 New_Node (N_Access_Procedure_Definition, Sloc);
579 Set_Protected_Present (N, Protected_Present);
580 Set_Parameter_Specifications (N, Parameter_Specifications);
582 end Make_Access_Procedure_Definition;
584 function Make_Access_Definition (Sloc : Source_Ptr;
585 Subtype_Mark : Node_Id)
588 N : constant Node_Id :=
589 New_Node (N_Access_Definition, Sloc);
591 Set_Subtype_Mark (N, Subtype_Mark);
593 end Make_Access_Definition;
595 function Make_Incomplete_Type_Declaration (Sloc : Source_Ptr;
596 Defining_Identifier : Node_Id;
597 Discriminant_Specifications : List_Id := No_List;
598 Unknown_Discriminants_Present : Boolean := False)
601 N : constant Node_Id :=
602 New_Node (N_Incomplete_Type_Declaration, Sloc);
604 Set_Defining_Identifier (N, Defining_Identifier);
605 Set_Discriminant_Specifications (N, Discriminant_Specifications);
606 Set_Unknown_Discriminants_Present
607 (N, Unknown_Discriminants_Present);
609 end Make_Incomplete_Type_Declaration;
611 function Make_Explicit_Dereference (Sloc : Source_Ptr;
615 N : constant Node_Id :=
616 New_Node (N_Explicit_Dereference, Sloc);
618 Set_Prefix (N, Prefix);
620 end Make_Explicit_Dereference;
622 function Make_Indexed_Component (Sloc : Source_Ptr;
624 Expressions : List_Id)
627 N : constant Node_Id :=
628 New_Node (N_Indexed_Component, Sloc);
630 Set_Prefix (N, Prefix);
631 Set_Expressions (N, Expressions);
633 end Make_Indexed_Component;
635 function Make_Slice (Sloc : Source_Ptr;
637 Discrete_Range : Node_Id)
640 N : constant Node_Id :=
641 New_Node (N_Slice, Sloc);
643 Set_Prefix (N, Prefix);
644 Set_Discrete_Range (N, Discrete_Range);
648 function Make_Selected_Component (Sloc : Source_Ptr;
650 Selector_Name : Node_Id)
653 N : constant Node_Id :=
654 New_Node (N_Selected_Component, Sloc);
656 Set_Prefix (N, Prefix);
657 Set_Selector_Name (N, Selector_Name);
659 end Make_Selected_Component;
661 function Make_Attribute_Reference (Sloc : Source_Ptr;
663 Attribute_Name : Name_Id;
664 Expressions : List_Id := No_List;
665 Must_Be_Byte_Aligned : Boolean := False)
668 N : constant Node_Id :=
669 New_Node (N_Attribute_Reference, Sloc);
671 Set_Prefix (N, Prefix);
672 Set_Attribute_Name (N, Attribute_Name);
673 Set_Expressions (N, Expressions);
674 Set_Must_Be_Byte_Aligned (N, Must_Be_Byte_Aligned);
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;
1227 Is_Null_Loop : Boolean := False)
1230 N : constant Node_Id :=
1231 New_Node (N_Loop_Statement, Sloc);
1233 Set_Identifier (N, Identifier);
1234 Set_Iteration_Scheme (N, Iteration_Scheme);
1235 Set_Statements (N, Statements);
1236 Set_End_Label (N, End_Label);
1237 Set_Has_Created_Identifier (N, Has_Created_Identifier);
1238 Set_Is_Null_Loop (N, Is_Null_Loop);
1240 end Make_Loop_Statement;
1242 function Make_Iteration_Scheme (Sloc : Source_Ptr;
1243 Condition : Node_Id := Empty;
1244 Loop_Parameter_Specification : Node_Id := Empty)
1247 N : constant Node_Id :=
1248 New_Node (N_Iteration_Scheme, Sloc);
1250 Set_Condition (N, Condition);
1251 Set_Loop_Parameter_Specification
1252 (N, Loop_Parameter_Specification);
1254 end Make_Iteration_Scheme;
1256 function Make_Loop_Parameter_Specification (Sloc : Source_Ptr;
1257 Defining_Identifier : Node_Id;
1258 Reverse_Present : Boolean := False;
1259 Discrete_Subtype_Definition : Node_Id)
1262 N : constant Node_Id :=
1263 New_Node (N_Loop_Parameter_Specification, Sloc);
1265 Set_Defining_Identifier (N, Defining_Identifier);
1266 Set_Reverse_Present (N, Reverse_Present);
1267 Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
1269 end Make_Loop_Parameter_Specification;
1271 function Make_Block_Statement (Sloc : Source_Ptr;
1272 Identifier : Node_Id := Empty;
1273 Declarations : List_Id := No_List;
1274 Handled_Statement_Sequence : Node_Id;
1275 Has_Created_Identifier : Boolean := False;
1276 Is_Task_Allocation_Block : Boolean := False;
1277 Is_Asynchronous_Call_Block : Boolean := False)
1280 N : constant Node_Id :=
1281 New_Node (N_Block_Statement, Sloc);
1283 Set_Identifier (N, Identifier);
1284 Set_Declarations (N, Declarations);
1285 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1286 Set_Has_Created_Identifier (N, Has_Created_Identifier);
1287 Set_Is_Task_Allocation_Block (N, Is_Task_Allocation_Block);
1288 Set_Is_Asynchronous_Call_Block (N, Is_Asynchronous_Call_Block);
1290 end Make_Block_Statement;
1292 function Make_Exit_Statement (Sloc : Source_Ptr;
1293 Name : Node_Id := Empty;
1294 Condition : Node_Id := Empty)
1297 N : constant Node_Id :=
1298 New_Node (N_Exit_Statement, Sloc);
1301 Set_Condition (N, Condition);
1303 end Make_Exit_Statement;
1305 function Make_Goto_Statement (Sloc : Source_Ptr;
1309 N : constant Node_Id :=
1310 New_Node (N_Goto_Statement, Sloc);
1314 end Make_Goto_Statement;
1316 function Make_Subprogram_Declaration (Sloc : Source_Ptr;
1317 Specification : Node_Id)
1320 N : constant Node_Id :=
1321 New_Node (N_Subprogram_Declaration, Sloc);
1323 Set_Specification (N, Specification);
1325 end Make_Subprogram_Declaration;
1327 function Make_Abstract_Subprogram_Declaration (Sloc : Source_Ptr;
1328 Specification : Node_Id)
1331 N : constant Node_Id :=
1332 New_Node (N_Abstract_Subprogram_Declaration, Sloc);
1334 Set_Specification (N, Specification);
1336 end Make_Abstract_Subprogram_Declaration;
1338 function Make_Function_Specification (Sloc : Source_Ptr;
1339 Defining_Unit_Name : Node_Id;
1340 Parameter_Specifications : List_Id := No_List;
1341 Subtype_Mark : Node_Id)
1344 N : constant Node_Id :=
1345 New_Node (N_Function_Specification, Sloc);
1347 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1348 Set_Parameter_Specifications (N, Parameter_Specifications);
1349 Set_Subtype_Mark (N, Subtype_Mark);
1351 end Make_Function_Specification;
1353 function Make_Procedure_Specification (Sloc : Source_Ptr;
1354 Defining_Unit_Name : Node_Id;
1355 Parameter_Specifications : List_Id := No_List)
1358 N : constant Node_Id :=
1359 New_Node (N_Procedure_Specification, Sloc);
1361 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1362 Set_Parameter_Specifications (N, Parameter_Specifications);
1364 end Make_Procedure_Specification;
1366 function Make_Designator (Sloc : Source_Ptr;
1368 Identifier : Node_Id)
1371 N : constant Node_Id :=
1372 New_Node (N_Designator, Sloc);
1375 Set_Identifier (N, Identifier);
1377 end Make_Designator;
1379 function Make_Defining_Program_Unit_Name (Sloc : Source_Ptr;
1381 Defining_Identifier : Node_Id)
1384 N : constant Node_Id :=
1385 New_Node (N_Defining_Program_Unit_Name, Sloc);
1388 Set_Defining_Identifier (N, Defining_Identifier);
1390 end Make_Defining_Program_Unit_Name;
1392 function Make_Operator_Symbol (Sloc : Source_Ptr;
1397 N : constant Node_Id :=
1398 New_Node (N_Operator_Symbol, Sloc);
1400 Set_Chars (N, Chars);
1401 Set_Strval (N, Strval);
1403 end Make_Operator_Symbol;
1405 function Make_Defining_Operator_Symbol (Sloc : Source_Ptr;
1409 N : constant Node_Id :=
1410 New_Entity (N_Defining_Operator_Symbol, Sloc);
1412 Set_Chars (N, Chars);
1414 end Make_Defining_Operator_Symbol;
1416 function Make_Parameter_Specification (Sloc : Source_Ptr;
1417 Defining_Identifier : Node_Id;
1418 In_Present : Boolean := False;
1419 Out_Present : Boolean := False;
1420 Parameter_Type : Node_Id;
1421 Expression : Node_Id := Empty)
1424 N : constant Node_Id :=
1425 New_Node (N_Parameter_Specification, Sloc);
1427 Set_Defining_Identifier (N, Defining_Identifier);
1428 Set_In_Present (N, In_Present);
1429 Set_Out_Present (N, Out_Present);
1430 Set_Parameter_Type (N, Parameter_Type);
1431 Set_Expression (N, Expression);
1433 end Make_Parameter_Specification;
1435 function Make_Subprogram_Body (Sloc : Source_Ptr;
1436 Specification : Node_Id;
1437 Declarations : List_Id;
1438 Handled_Statement_Sequence : Node_Id;
1439 Bad_Is_Detected : Boolean := False)
1442 N : constant Node_Id :=
1443 New_Node (N_Subprogram_Body, Sloc);
1445 Set_Specification (N, Specification);
1446 Set_Declarations (N, Declarations);
1447 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1448 Set_Bad_Is_Detected (N, Bad_Is_Detected);
1450 end Make_Subprogram_Body;
1452 function Make_Procedure_Call_Statement (Sloc : Source_Ptr;
1454 Parameter_Associations : List_Id := No_List)
1457 N : constant Node_Id :=
1458 New_Node (N_Procedure_Call_Statement, Sloc);
1461 Set_Parameter_Associations (N, Parameter_Associations);
1463 end Make_Procedure_Call_Statement;
1465 function Make_Function_Call (Sloc : Source_Ptr;
1467 Parameter_Associations : List_Id := No_List)
1470 N : constant Node_Id :=
1471 New_Node (N_Function_Call, Sloc);
1474 Set_Parameter_Associations (N, Parameter_Associations);
1476 end Make_Function_Call;
1478 function Make_Parameter_Association (Sloc : Source_Ptr;
1479 Selector_Name : Node_Id;
1480 Explicit_Actual_Parameter : Node_Id)
1483 N : constant Node_Id :=
1484 New_Node (N_Parameter_Association, Sloc);
1486 Set_Selector_Name (N, Selector_Name);
1487 Set_Explicit_Actual_Parameter (N, Explicit_Actual_Parameter);
1489 end Make_Parameter_Association;
1491 function Make_Return_Statement (Sloc : Source_Ptr;
1492 Expression : Node_Id := Empty)
1495 N : constant Node_Id :=
1496 New_Node (N_Return_Statement, Sloc);
1498 Set_Expression (N, Expression);
1500 end Make_Return_Statement;
1502 function Make_Package_Declaration (Sloc : Source_Ptr;
1503 Specification : Node_Id)
1506 N : constant Node_Id :=
1507 New_Node (N_Package_Declaration, Sloc);
1509 Set_Specification (N, Specification);
1511 end Make_Package_Declaration;
1513 function Make_Package_Specification (Sloc : Source_Ptr;
1514 Defining_Unit_Name : Node_Id;
1515 Visible_Declarations : List_Id;
1516 Private_Declarations : List_Id := No_List;
1517 End_Label : Node_Id)
1520 N : constant Node_Id :=
1521 New_Node (N_Package_Specification, Sloc);
1523 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1524 Set_Visible_Declarations (N, Visible_Declarations);
1525 Set_Private_Declarations (N, Private_Declarations);
1526 Set_End_Label (N, End_Label);
1528 end Make_Package_Specification;
1530 function Make_Package_Body (Sloc : Source_Ptr;
1531 Defining_Unit_Name : Node_Id;
1532 Declarations : List_Id;
1533 Handled_Statement_Sequence : Node_Id := Empty)
1536 N : constant Node_Id :=
1537 New_Node (N_Package_Body, Sloc);
1539 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1540 Set_Declarations (N, Declarations);
1541 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1543 end Make_Package_Body;
1545 function Make_Private_Type_Declaration (Sloc : Source_Ptr;
1546 Defining_Identifier : Node_Id;
1547 Discriminant_Specifications : List_Id := No_List;
1548 Unknown_Discriminants_Present : Boolean := False;
1549 Abstract_Present : Boolean := False;
1550 Tagged_Present : Boolean := False;
1551 Limited_Present : Boolean := False)
1554 N : constant Node_Id :=
1555 New_Node (N_Private_Type_Declaration, Sloc);
1557 Set_Defining_Identifier (N, Defining_Identifier);
1558 Set_Discriminant_Specifications (N, Discriminant_Specifications);
1559 Set_Unknown_Discriminants_Present
1560 (N, Unknown_Discriminants_Present);
1561 Set_Abstract_Present (N, Abstract_Present);
1562 Set_Tagged_Present (N, Tagged_Present);
1563 Set_Limited_Present (N, Limited_Present);
1565 end Make_Private_Type_Declaration;
1567 function Make_Private_Extension_Declaration (Sloc : Source_Ptr;
1568 Defining_Identifier : Node_Id;
1569 Discriminant_Specifications : List_Id := No_List;
1570 Unknown_Discriminants_Present : Boolean := False;
1571 Abstract_Present : Boolean := False;
1572 Subtype_Indication : Node_Id)
1575 N : constant Node_Id :=
1576 New_Node (N_Private_Extension_Declaration, Sloc);
1578 Set_Defining_Identifier (N, Defining_Identifier);
1579 Set_Discriminant_Specifications (N, Discriminant_Specifications);
1580 Set_Unknown_Discriminants_Present
1581 (N, Unknown_Discriminants_Present);
1582 Set_Abstract_Present (N, Abstract_Present);
1583 Set_Subtype_Indication (N, Subtype_Indication);
1585 end Make_Private_Extension_Declaration;
1587 function Make_Use_Package_Clause (Sloc : Source_Ptr;
1591 N : constant Node_Id :=
1592 New_Node (N_Use_Package_Clause, Sloc);
1594 Set_Names (N, Names);
1596 end Make_Use_Package_Clause;
1598 function Make_Use_Type_Clause (Sloc : Source_Ptr;
1599 Subtype_Marks : List_Id)
1602 N : constant Node_Id :=
1603 New_Node (N_Use_Type_Clause, Sloc);
1605 Set_Subtype_Marks (N, Subtype_Marks);
1607 end Make_Use_Type_Clause;
1609 function Make_Object_Renaming_Declaration (Sloc : Source_Ptr;
1610 Defining_Identifier : Node_Id;
1611 Subtype_Mark : Node_Id;
1615 N : constant Node_Id :=
1616 New_Node (N_Object_Renaming_Declaration, Sloc);
1618 Set_Defining_Identifier (N, Defining_Identifier);
1619 Set_Subtype_Mark (N, Subtype_Mark);
1622 end Make_Object_Renaming_Declaration;
1624 function Make_Exception_Renaming_Declaration (Sloc : Source_Ptr;
1625 Defining_Identifier : Node_Id;
1629 N : constant Node_Id :=
1630 New_Node (N_Exception_Renaming_Declaration, Sloc);
1632 Set_Defining_Identifier (N, Defining_Identifier);
1635 end Make_Exception_Renaming_Declaration;
1637 function Make_Package_Renaming_Declaration (Sloc : Source_Ptr;
1638 Defining_Unit_Name : Node_Id;
1642 N : constant Node_Id :=
1643 New_Node (N_Package_Renaming_Declaration, Sloc);
1645 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1648 end Make_Package_Renaming_Declaration;
1650 function Make_Subprogram_Renaming_Declaration (Sloc : Source_Ptr;
1651 Specification : Node_Id;
1655 N : constant Node_Id :=
1656 New_Node (N_Subprogram_Renaming_Declaration, Sloc);
1658 Set_Specification (N, Specification);
1661 end Make_Subprogram_Renaming_Declaration;
1663 function Make_Generic_Package_Renaming_Declaration (Sloc : Source_Ptr;
1664 Defining_Unit_Name : Node_Id;
1668 N : constant Node_Id :=
1669 New_Node (N_Generic_Package_Renaming_Declaration, Sloc);
1671 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1674 end Make_Generic_Package_Renaming_Declaration;
1676 function Make_Generic_Procedure_Renaming_Declaration (Sloc : Source_Ptr;
1677 Defining_Unit_Name : Node_Id;
1681 N : constant Node_Id :=
1682 New_Node (N_Generic_Procedure_Renaming_Declaration, Sloc);
1684 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1687 end Make_Generic_Procedure_Renaming_Declaration;
1689 function Make_Generic_Function_Renaming_Declaration (Sloc : Source_Ptr;
1690 Defining_Unit_Name : Node_Id;
1694 N : constant Node_Id :=
1695 New_Node (N_Generic_Function_Renaming_Declaration, Sloc);
1697 Set_Defining_Unit_Name (N, Defining_Unit_Name);
1700 end Make_Generic_Function_Renaming_Declaration;
1702 function Make_Task_Type_Declaration (Sloc : Source_Ptr;
1703 Defining_Identifier : Node_Id;
1704 Discriminant_Specifications : List_Id := No_List;
1705 Task_Definition : Node_Id := Empty)
1708 N : constant Node_Id :=
1709 New_Node (N_Task_Type_Declaration, Sloc);
1711 Set_Defining_Identifier (N, Defining_Identifier);
1712 Set_Discriminant_Specifications (N, Discriminant_Specifications);
1713 Set_Task_Definition (N, Task_Definition);
1715 end Make_Task_Type_Declaration;
1717 function Make_Single_Task_Declaration (Sloc : Source_Ptr;
1718 Defining_Identifier : Node_Id;
1719 Task_Definition : Node_Id := Empty)
1722 N : constant Node_Id :=
1723 New_Node (N_Single_Task_Declaration, Sloc);
1725 Set_Defining_Identifier (N, Defining_Identifier);
1726 Set_Task_Definition (N, Task_Definition);
1728 end Make_Single_Task_Declaration;
1730 function Make_Task_Definition (Sloc : Source_Ptr;
1731 Visible_Declarations : List_Id;
1732 Private_Declarations : List_Id := No_List;
1733 End_Label : Node_Id)
1736 N : constant Node_Id :=
1737 New_Node (N_Task_Definition, Sloc);
1739 Set_Visible_Declarations (N, Visible_Declarations);
1740 Set_Private_Declarations (N, Private_Declarations);
1741 Set_End_Label (N, End_Label);
1743 end Make_Task_Definition;
1745 function Make_Task_Body (Sloc : Source_Ptr;
1746 Defining_Identifier : Node_Id;
1747 Declarations : List_Id;
1748 Handled_Statement_Sequence : Node_Id)
1751 N : constant Node_Id :=
1752 New_Node (N_Task_Body, Sloc);
1754 Set_Defining_Identifier (N, Defining_Identifier);
1755 Set_Declarations (N, Declarations);
1756 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1760 function Make_Protected_Type_Declaration (Sloc : Source_Ptr;
1761 Defining_Identifier : Node_Id;
1762 Discriminant_Specifications : List_Id := No_List;
1763 Protected_Definition : Node_Id)
1766 N : constant Node_Id :=
1767 New_Node (N_Protected_Type_Declaration, Sloc);
1769 Set_Defining_Identifier (N, Defining_Identifier);
1770 Set_Discriminant_Specifications (N, Discriminant_Specifications);
1771 Set_Protected_Definition (N, Protected_Definition);
1773 end Make_Protected_Type_Declaration;
1775 function Make_Single_Protected_Declaration (Sloc : Source_Ptr;
1776 Defining_Identifier : Node_Id;
1777 Protected_Definition : Node_Id)
1780 N : constant Node_Id :=
1781 New_Node (N_Single_Protected_Declaration, Sloc);
1783 Set_Defining_Identifier (N, Defining_Identifier);
1784 Set_Protected_Definition (N, Protected_Definition);
1786 end Make_Single_Protected_Declaration;
1788 function Make_Protected_Definition (Sloc : Source_Ptr;
1789 Visible_Declarations : List_Id;
1790 Private_Declarations : List_Id := No_List;
1791 End_Label : Node_Id)
1794 N : constant Node_Id :=
1795 New_Node (N_Protected_Definition, Sloc);
1797 Set_Visible_Declarations (N, Visible_Declarations);
1798 Set_Private_Declarations (N, Private_Declarations);
1799 Set_End_Label (N, End_Label);
1801 end Make_Protected_Definition;
1803 function Make_Protected_Body (Sloc : Source_Ptr;
1804 Defining_Identifier : Node_Id;
1805 Declarations : List_Id;
1806 End_Label : Node_Id)
1809 N : constant Node_Id :=
1810 New_Node (N_Protected_Body, Sloc);
1812 Set_Defining_Identifier (N, Defining_Identifier);
1813 Set_Declarations (N, Declarations);
1814 Set_End_Label (N, End_Label);
1816 end Make_Protected_Body;
1818 function Make_Entry_Declaration (Sloc : Source_Ptr;
1819 Defining_Identifier : Node_Id;
1820 Discrete_Subtype_Definition : Node_Id := Empty;
1821 Parameter_Specifications : List_Id := No_List)
1824 N : constant Node_Id :=
1825 New_Node (N_Entry_Declaration, Sloc);
1827 Set_Defining_Identifier (N, Defining_Identifier);
1828 Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
1829 Set_Parameter_Specifications (N, Parameter_Specifications);
1831 end Make_Entry_Declaration;
1833 function Make_Accept_Statement (Sloc : Source_Ptr;
1834 Entry_Direct_Name : Node_Id;
1835 Entry_Index : Node_Id := Empty;
1836 Parameter_Specifications : List_Id := No_List;
1837 Handled_Statement_Sequence : Node_Id;
1838 Declarations : List_Id := No_List)
1841 N : constant Node_Id :=
1842 New_Node (N_Accept_Statement, Sloc);
1844 Set_Entry_Direct_Name (N, Entry_Direct_Name);
1845 Set_Entry_Index (N, Entry_Index);
1846 Set_Parameter_Specifications (N, Parameter_Specifications);
1847 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1848 Set_Declarations (N, Declarations);
1850 end Make_Accept_Statement;
1852 function Make_Entry_Body (Sloc : Source_Ptr;
1853 Defining_Identifier : Node_Id;
1854 Entry_Body_Formal_Part : Node_Id;
1855 Declarations : List_Id;
1856 Handled_Statement_Sequence : Node_Id)
1859 N : constant Node_Id :=
1860 New_Node (N_Entry_Body, Sloc);
1862 Set_Defining_Identifier (N, Defining_Identifier);
1863 Set_Entry_Body_Formal_Part (N, Entry_Body_Formal_Part);
1864 Set_Declarations (N, Declarations);
1865 Set_Handled_Statement_Sequence (N, Handled_Statement_Sequence);
1867 end Make_Entry_Body;
1869 function Make_Entry_Body_Formal_Part (Sloc : Source_Ptr;
1870 Entry_Index_Specification : Node_Id := Empty;
1871 Parameter_Specifications : List_Id := No_List;
1872 Condition : Node_Id)
1875 N : constant Node_Id :=
1876 New_Node (N_Entry_Body_Formal_Part, Sloc);
1878 Set_Entry_Index_Specification (N, Entry_Index_Specification);
1879 Set_Parameter_Specifications (N, Parameter_Specifications);
1880 Set_Condition (N, Condition);
1882 end Make_Entry_Body_Formal_Part;
1884 function Make_Entry_Index_Specification (Sloc : Source_Ptr;
1885 Defining_Identifier : Node_Id;
1886 Discrete_Subtype_Definition : Node_Id)
1889 N : constant Node_Id :=
1890 New_Node (N_Entry_Index_Specification, Sloc);
1892 Set_Defining_Identifier (N, Defining_Identifier);
1893 Set_Discrete_Subtype_Definition (N, Discrete_Subtype_Definition);
1895 end Make_Entry_Index_Specification;
1897 function Make_Entry_Call_Statement (Sloc : Source_Ptr;
1899 Parameter_Associations : List_Id := No_List)
1902 N : constant Node_Id :=
1903 New_Node (N_Entry_Call_Statement, Sloc);
1906 Set_Parameter_Associations (N, Parameter_Associations);
1908 end Make_Entry_Call_Statement;
1910 function Make_Requeue_Statement (Sloc : Source_Ptr;
1912 Abort_Present : Boolean := False)
1915 N : constant Node_Id :=
1916 New_Node (N_Requeue_Statement, Sloc);
1919 Set_Abort_Present (N, Abort_Present);
1921 end Make_Requeue_Statement;
1923 function Make_Delay_Until_Statement (Sloc : Source_Ptr;
1924 Expression : Node_Id)
1927 N : constant Node_Id :=
1928 New_Node (N_Delay_Until_Statement, Sloc);
1930 Set_Expression (N, Expression);
1932 end Make_Delay_Until_Statement;
1934 function Make_Delay_Relative_Statement (Sloc : Source_Ptr;
1935 Expression : Node_Id)
1938 N : constant Node_Id :=
1939 New_Node (N_Delay_Relative_Statement, Sloc);
1941 Set_Expression (N, Expression);
1943 end Make_Delay_Relative_Statement;
1945 function Make_Selective_Accept (Sloc : Source_Ptr;
1946 Select_Alternatives : List_Id;
1947 Else_Statements : List_Id := No_List)
1950 N : constant Node_Id :=
1951 New_Node (N_Selective_Accept, Sloc);
1953 Set_Select_Alternatives (N, Select_Alternatives);
1954 Set_Else_Statements (N, Else_Statements);
1956 end Make_Selective_Accept;
1958 function Make_Accept_Alternative (Sloc : Source_Ptr;
1959 Accept_Statement : Node_Id;
1960 Condition : Node_Id := Empty;
1961 Statements : List_Id := Empty_List;
1962 Pragmas_Before : List_Id := No_List)
1965 N : constant Node_Id :=
1966 New_Node (N_Accept_Alternative, Sloc);
1968 Set_Accept_Statement (N, Accept_Statement);
1969 Set_Condition (N, Condition);
1970 Set_Statements (N, Statements);
1971 Set_Pragmas_Before (N, Pragmas_Before);
1973 end Make_Accept_Alternative;
1975 function Make_Delay_Alternative (Sloc : Source_Ptr;
1976 Delay_Statement : Node_Id;
1977 Condition : Node_Id := Empty;
1978 Statements : List_Id := Empty_List;
1979 Pragmas_Before : List_Id := No_List)
1982 N : constant Node_Id :=
1983 New_Node (N_Delay_Alternative, Sloc);
1985 Set_Delay_Statement (N, Delay_Statement);
1986 Set_Condition (N, Condition);
1987 Set_Statements (N, Statements);
1988 Set_Pragmas_Before (N, Pragmas_Before);
1990 end Make_Delay_Alternative;
1992 function Make_Terminate_Alternative (Sloc : Source_Ptr;
1993 Condition : Node_Id := Empty;
1994 Pragmas_Before : List_Id := No_List;
1995 Pragmas_After : List_Id := No_List)
1998 N : constant Node_Id :=
1999 New_Node (N_Terminate_Alternative, Sloc);
2001 Set_Condition (N, Condition);
2002 Set_Pragmas_Before (N, Pragmas_Before);
2003 Set_Pragmas_After (N, Pragmas_After);
2005 end Make_Terminate_Alternative;
2007 function Make_Timed_Entry_Call (Sloc : Source_Ptr;
2008 Entry_Call_Alternative : Node_Id;
2009 Delay_Alternative : Node_Id)
2012 N : constant Node_Id :=
2013 New_Node (N_Timed_Entry_Call, Sloc);
2015 Set_Entry_Call_Alternative (N, Entry_Call_Alternative);
2016 Set_Delay_Alternative (N, Delay_Alternative);
2018 end Make_Timed_Entry_Call;
2020 function Make_Entry_Call_Alternative (Sloc : Source_Ptr;
2021 Entry_Call_Statement : Node_Id;
2022 Statements : List_Id := Empty_List;
2023 Pragmas_Before : List_Id := No_List)
2026 N : constant Node_Id :=
2027 New_Node (N_Entry_Call_Alternative, Sloc);
2029 Set_Entry_Call_Statement (N, Entry_Call_Statement);
2030 Set_Statements (N, Statements);
2031 Set_Pragmas_Before (N, Pragmas_Before);
2033 end Make_Entry_Call_Alternative;
2035 function Make_Conditional_Entry_Call (Sloc : Source_Ptr;
2036 Entry_Call_Alternative : Node_Id;
2037 Else_Statements : List_Id)
2040 N : constant Node_Id :=
2041 New_Node (N_Conditional_Entry_Call, Sloc);
2043 Set_Entry_Call_Alternative (N, Entry_Call_Alternative);
2044 Set_Else_Statements (N, Else_Statements);
2046 end Make_Conditional_Entry_Call;
2048 function Make_Asynchronous_Select (Sloc : Source_Ptr;
2049 Triggering_Alternative : Node_Id;
2050 Abortable_Part : Node_Id)
2053 N : constant Node_Id :=
2054 New_Node (N_Asynchronous_Select, Sloc);
2056 Set_Triggering_Alternative (N, Triggering_Alternative);
2057 Set_Abortable_Part (N, Abortable_Part);
2059 end Make_Asynchronous_Select;
2061 function Make_Triggering_Alternative (Sloc : Source_Ptr;
2062 Triggering_Statement : Node_Id;
2063 Statements : List_Id := Empty_List;
2064 Pragmas_Before : List_Id := No_List)
2067 N : constant Node_Id :=
2068 New_Node (N_Triggering_Alternative, Sloc);
2070 Set_Triggering_Statement (N, Triggering_Statement);
2071 Set_Statements (N, Statements);
2072 Set_Pragmas_Before (N, Pragmas_Before);
2074 end Make_Triggering_Alternative;
2076 function Make_Abortable_Part (Sloc : Source_Ptr;
2077 Statements : List_Id)
2080 N : constant Node_Id :=
2081 New_Node (N_Abortable_Part, Sloc);
2083 Set_Statements (N, Statements);
2085 end Make_Abortable_Part;
2087 function Make_Abort_Statement (Sloc : Source_Ptr;
2091 N : constant Node_Id :=
2092 New_Node (N_Abort_Statement, Sloc);
2094 Set_Names (N, Names);
2096 end Make_Abort_Statement;
2098 function Make_Compilation_Unit (Sloc : Source_Ptr;
2099 Context_Items : List_Id;
2100 Private_Present : Boolean := False;
2102 Aux_Decls_Node : Node_Id)
2105 N : constant Node_Id :=
2106 New_Node (N_Compilation_Unit, Sloc);
2108 Set_Context_Items (N, Context_Items);
2109 Set_Private_Present (N, Private_Present);
2111 Set_Aux_Decls_Node (N, Aux_Decls_Node);
2113 end Make_Compilation_Unit;
2115 function Make_Compilation_Unit_Aux (Sloc : Source_Ptr;
2116 Declarations : List_Id := No_List;
2117 Actions : List_Id := No_List;
2118 Pragmas_After : List_Id := No_List;
2119 Config_Pragmas : List_Id := Empty_List)
2122 N : constant Node_Id :=
2123 New_Node (N_Compilation_Unit_Aux, Sloc);
2125 Set_Declarations (N, Declarations);
2126 Set_Actions (N, Actions);
2127 Set_Pragmas_After (N, Pragmas_After);
2128 Set_Config_Pragmas (N, Config_Pragmas);
2130 end Make_Compilation_Unit_Aux;
2132 function Make_With_Clause (Sloc : Source_Ptr;
2134 First_Name : Boolean := True;
2135 Last_Name : Boolean := True;
2136 Limited_Present : Boolean := False)
2139 N : constant Node_Id :=
2140 New_Node (N_With_Clause, Sloc);
2143 Set_First_Name (N, First_Name);
2144 Set_Last_Name (N, Last_Name);
2145 Set_Limited_Present (N, Limited_Present);
2147 end Make_With_Clause;
2149 function Make_With_Type_Clause (Sloc : Source_Ptr;
2151 Tagged_Present : Boolean := False)
2154 N : constant Node_Id :=
2155 New_Node (N_With_Type_Clause, Sloc);
2158 Set_Tagged_Present (N, Tagged_Present);
2160 end Make_With_Type_Clause;
2162 function Make_Subprogram_Body_Stub (Sloc : Source_Ptr;
2163 Specification : Node_Id)
2166 N : constant Node_Id :=
2167 New_Node (N_Subprogram_Body_Stub, Sloc);
2169 Set_Specification (N, Specification);
2171 end Make_Subprogram_Body_Stub;
2173 function Make_Package_Body_Stub (Sloc : Source_Ptr;
2174 Defining_Identifier : Node_Id)
2177 N : constant Node_Id :=
2178 New_Node (N_Package_Body_Stub, Sloc);
2180 Set_Defining_Identifier (N, Defining_Identifier);
2182 end Make_Package_Body_Stub;
2184 function Make_Task_Body_Stub (Sloc : Source_Ptr;
2185 Defining_Identifier : Node_Id)
2188 N : constant Node_Id :=
2189 New_Node (N_Task_Body_Stub, Sloc);
2191 Set_Defining_Identifier (N, Defining_Identifier);
2193 end Make_Task_Body_Stub;
2195 function Make_Protected_Body_Stub (Sloc : Source_Ptr;
2196 Defining_Identifier : Node_Id)
2199 N : constant Node_Id :=
2200 New_Node (N_Protected_Body_Stub, Sloc);
2202 Set_Defining_Identifier (N, Defining_Identifier);
2204 end Make_Protected_Body_Stub;
2206 function Make_Subunit (Sloc : Source_Ptr;
2208 Proper_Body : Node_Id)
2211 N : constant Node_Id :=
2212 New_Node (N_Subunit, Sloc);
2215 Set_Proper_Body (N, Proper_Body);
2219 function Make_Exception_Declaration (Sloc : Source_Ptr;
2220 Defining_Identifier : Node_Id)
2223 N : constant Node_Id :=
2224 New_Node (N_Exception_Declaration, Sloc);
2226 Set_Defining_Identifier (N, Defining_Identifier);
2228 end Make_Exception_Declaration;
2230 function Make_Handled_Sequence_Of_Statements (Sloc : Source_Ptr;
2231 Statements : List_Id;
2232 End_Label : Node_Id := Empty;
2233 Exception_Handlers : List_Id := No_List;
2234 At_End_Proc : Node_Id := Empty)
2237 N : constant Node_Id :=
2238 New_Node (N_Handled_Sequence_Of_Statements, Sloc);
2240 Set_Statements (N, Statements);
2241 Set_End_Label (N, End_Label);
2242 Set_Exception_Handlers (N, Exception_Handlers);
2243 Set_At_End_Proc (N, At_End_Proc);
2245 end Make_Handled_Sequence_Of_Statements;
2247 function Make_Exception_Handler (Sloc : Source_Ptr;
2248 Choice_Parameter : Node_Id := Empty;
2249 Exception_Choices : List_Id;
2250 Statements : List_Id)
2253 N : constant Node_Id :=
2254 New_Node (N_Exception_Handler, Sloc);
2256 Set_Choice_Parameter (N, Choice_Parameter);
2257 Set_Exception_Choices (N, Exception_Choices);
2258 Set_Statements (N, Statements);
2260 end Make_Exception_Handler;
2262 function Make_Raise_Statement (Sloc : Source_Ptr;
2263 Name : Node_Id := Empty)
2266 N : constant Node_Id :=
2267 New_Node (N_Raise_Statement, Sloc);
2271 end Make_Raise_Statement;
2273 function Make_Generic_Subprogram_Declaration (Sloc : Source_Ptr;
2274 Specification : Node_Id;
2275 Generic_Formal_Declarations : List_Id)
2278 N : constant Node_Id :=
2279 New_Node (N_Generic_Subprogram_Declaration, Sloc);
2281 Set_Specification (N, Specification);
2282 Set_Generic_Formal_Declarations (N, Generic_Formal_Declarations);
2284 end Make_Generic_Subprogram_Declaration;
2286 function Make_Generic_Package_Declaration (Sloc : Source_Ptr;
2287 Specification : Node_Id;
2288 Generic_Formal_Declarations : List_Id)
2291 N : constant Node_Id :=
2292 New_Node (N_Generic_Package_Declaration, Sloc);
2294 Set_Specification (N, Specification);
2295 Set_Generic_Formal_Declarations (N, Generic_Formal_Declarations);
2297 end Make_Generic_Package_Declaration;
2299 function Make_Package_Instantiation (Sloc : Source_Ptr;
2300 Defining_Unit_Name : Node_Id;
2302 Generic_Associations : List_Id := No_List)
2305 N : constant Node_Id :=
2306 New_Node (N_Package_Instantiation, Sloc);
2308 Set_Defining_Unit_Name (N, Defining_Unit_Name);
2310 Set_Generic_Associations (N, Generic_Associations);
2312 end Make_Package_Instantiation;
2314 function Make_Procedure_Instantiation (Sloc : Source_Ptr;
2315 Defining_Unit_Name : Node_Id;
2317 Generic_Associations : List_Id := No_List)
2320 N : constant Node_Id :=
2321 New_Node (N_Procedure_Instantiation, Sloc);
2323 Set_Defining_Unit_Name (N, Defining_Unit_Name);
2325 Set_Generic_Associations (N, Generic_Associations);
2327 end Make_Procedure_Instantiation;
2329 function Make_Function_Instantiation (Sloc : Source_Ptr;
2330 Defining_Unit_Name : Node_Id;
2332 Generic_Associations : List_Id := No_List)
2335 N : constant Node_Id :=
2336 New_Node (N_Function_Instantiation, Sloc);
2338 Set_Defining_Unit_Name (N, Defining_Unit_Name);
2340 Set_Generic_Associations (N, Generic_Associations);
2342 end Make_Function_Instantiation;
2344 function Make_Generic_Association (Sloc : Source_Ptr;
2345 Selector_Name : Node_Id := Empty;
2346 Explicit_Generic_Actual_Parameter : Node_Id)
2349 N : constant Node_Id :=
2350 New_Node (N_Generic_Association, Sloc);
2352 Set_Selector_Name (N, Selector_Name);
2353 Set_Explicit_Generic_Actual_Parameter
2354 (N, Explicit_Generic_Actual_Parameter);
2356 end Make_Generic_Association;
2358 function Make_Formal_Object_Declaration (Sloc : Source_Ptr;
2359 Defining_Identifier : Node_Id;
2360 In_Present : Boolean := False;
2361 Out_Present : Boolean := False;
2362 Subtype_Mark : Node_Id;
2363 Expression : Node_Id := Empty)
2366 N : constant Node_Id :=
2367 New_Node (N_Formal_Object_Declaration, Sloc);
2369 Set_Defining_Identifier (N, Defining_Identifier);
2370 Set_In_Present (N, In_Present);
2371 Set_Out_Present (N, Out_Present);
2372 Set_Subtype_Mark (N, Subtype_Mark);
2373 Set_Expression (N, Expression);
2375 end Make_Formal_Object_Declaration;
2377 function Make_Formal_Type_Declaration (Sloc : Source_Ptr;
2378 Defining_Identifier : Node_Id;
2379 Formal_Type_Definition : Node_Id;
2380 Discriminant_Specifications : List_Id := No_List;
2381 Unknown_Discriminants_Present : Boolean := False)
2384 N : constant Node_Id :=
2385 New_Node (N_Formal_Type_Declaration, Sloc);
2387 Set_Defining_Identifier (N, Defining_Identifier);
2388 Set_Formal_Type_Definition (N, Formal_Type_Definition);
2389 Set_Discriminant_Specifications (N, Discriminant_Specifications);
2390 Set_Unknown_Discriminants_Present
2391 (N, Unknown_Discriminants_Present);
2393 end Make_Formal_Type_Declaration;
2395 function Make_Formal_Private_Type_Definition (Sloc : Source_Ptr;
2396 Abstract_Present : Boolean := False;
2397 Tagged_Present : Boolean := False;
2398 Limited_Present : Boolean := False)
2401 N : constant Node_Id :=
2402 New_Node (N_Formal_Private_Type_Definition, Sloc);
2404 Set_Abstract_Present (N, Abstract_Present);
2405 Set_Tagged_Present (N, Tagged_Present);
2406 Set_Limited_Present (N, Limited_Present);
2408 end Make_Formal_Private_Type_Definition;
2410 function Make_Formal_Derived_Type_Definition (Sloc : Source_Ptr;
2411 Subtype_Mark : Node_Id;
2412 Private_Present : Boolean := False;
2413 Abstract_Present : Boolean := False)
2416 N : constant Node_Id :=
2417 New_Node (N_Formal_Derived_Type_Definition, Sloc);
2419 Set_Subtype_Mark (N, Subtype_Mark);
2420 Set_Private_Present (N, Private_Present);
2421 Set_Abstract_Present (N, Abstract_Present);
2423 end Make_Formal_Derived_Type_Definition;
2425 function Make_Formal_Discrete_Type_Definition (Sloc : Source_Ptr)
2428 N : constant Node_Id :=
2429 New_Node (N_Formal_Discrete_Type_Definition, Sloc);
2432 end Make_Formal_Discrete_Type_Definition;
2434 function Make_Formal_Signed_Integer_Type_Definition (Sloc : Source_Ptr)
2437 N : constant Node_Id :=
2438 New_Node (N_Formal_Signed_Integer_Type_Definition, Sloc);
2441 end Make_Formal_Signed_Integer_Type_Definition;
2443 function Make_Formal_Modular_Type_Definition (Sloc : Source_Ptr)
2446 N : constant Node_Id :=
2447 New_Node (N_Formal_Modular_Type_Definition, Sloc);
2450 end Make_Formal_Modular_Type_Definition;
2452 function Make_Formal_Floating_Point_Definition (Sloc : Source_Ptr)
2455 N : constant Node_Id :=
2456 New_Node (N_Formal_Floating_Point_Definition, Sloc);
2459 end Make_Formal_Floating_Point_Definition;
2461 function Make_Formal_Ordinary_Fixed_Point_Definition (Sloc : Source_Ptr)
2464 N : constant Node_Id :=
2465 New_Node (N_Formal_Ordinary_Fixed_Point_Definition, Sloc);
2468 end Make_Formal_Ordinary_Fixed_Point_Definition;
2470 function Make_Formal_Decimal_Fixed_Point_Definition (Sloc : Source_Ptr)
2473 N : constant Node_Id :=
2474 New_Node (N_Formal_Decimal_Fixed_Point_Definition, Sloc);
2477 end Make_Formal_Decimal_Fixed_Point_Definition;
2479 function Make_Formal_Subprogram_Declaration (Sloc : Source_Ptr;
2480 Specification : Node_Id;
2481 Default_Name : Node_Id := Empty;
2482 Box_Present : Boolean := False)
2485 N : constant Node_Id :=
2486 New_Node (N_Formal_Subprogram_Declaration, Sloc);
2488 Set_Specification (N, Specification);
2489 Set_Default_Name (N, Default_Name);
2490 Set_Box_Present (N, Box_Present);
2492 end Make_Formal_Subprogram_Declaration;
2494 function Make_Formal_Package_Declaration (Sloc : Source_Ptr;
2495 Defining_Identifier : Node_Id;
2497 Generic_Associations : List_Id := No_List;
2498 Box_Present : Boolean := False)
2501 N : constant Node_Id :=
2502 New_Node (N_Formal_Package_Declaration, Sloc);
2504 Set_Defining_Identifier (N, Defining_Identifier);
2506 Set_Generic_Associations (N, Generic_Associations);
2507 Set_Box_Present (N, Box_Present);
2509 end Make_Formal_Package_Declaration;
2511 function Make_Attribute_Definition_Clause (Sloc : Source_Ptr;
2514 Expression : Node_Id)
2517 N : constant Node_Id :=
2518 New_Node (N_Attribute_Definition_Clause, Sloc);
2521 Set_Chars (N, Chars);
2522 Set_Expression (N, Expression);
2524 end Make_Attribute_Definition_Clause;
2526 function Make_Enumeration_Representation_Clause (Sloc : Source_Ptr;
2527 Identifier : Node_Id;
2528 Array_Aggregate : Node_Id)
2531 N : constant Node_Id :=
2532 New_Node (N_Enumeration_Representation_Clause, Sloc);
2534 Set_Identifier (N, Identifier);
2535 Set_Array_Aggregate (N, Array_Aggregate);
2537 end Make_Enumeration_Representation_Clause;
2539 function Make_Record_Representation_Clause (Sloc : Source_Ptr;
2540 Identifier : Node_Id;
2541 Mod_Clause : Node_Id := Empty;
2542 Component_Clauses : List_Id)
2545 N : constant Node_Id :=
2546 New_Node (N_Record_Representation_Clause, Sloc);
2548 Set_Identifier (N, Identifier);
2549 Set_Mod_Clause (N, Mod_Clause);
2550 Set_Component_Clauses (N, Component_Clauses);
2552 end Make_Record_Representation_Clause;
2554 function Make_Component_Clause (Sloc : Source_Ptr;
2555 Component_Name : Node_Id;
2557 First_Bit : Node_Id;
2561 N : constant Node_Id :=
2562 New_Node (N_Component_Clause, Sloc);
2564 Set_Component_Name (N, Component_Name);
2565 Set_Position (N, Position);
2566 Set_First_Bit (N, First_Bit);
2567 Set_Last_Bit (N, Last_Bit);
2569 end Make_Component_Clause;
2571 function Make_Code_Statement (Sloc : Source_Ptr;
2572 Expression : Node_Id)
2575 N : constant Node_Id :=
2576 New_Node (N_Code_Statement, Sloc);
2578 Set_Expression (N, Expression);
2580 end Make_Code_Statement;
2582 function Make_Op_Rotate_Left (Sloc : Source_Ptr;
2583 Left_Opnd : Node_Id;
2584 Right_Opnd : Node_Id)
2587 N : constant Node_Id :=
2588 New_Node (N_Op_Rotate_Left, Sloc);
2590 Set_Left_Opnd (N, Left_Opnd);
2591 Set_Right_Opnd (N, Right_Opnd);
2592 Set_Chars (N, Name_Rotate_Left);
2593 Set_Entity (N, Standard_Op_Rotate_Left);
2595 end Make_Op_Rotate_Left;
2597 function Make_Op_Rotate_Right (Sloc : Source_Ptr;
2598 Left_Opnd : Node_Id;
2599 Right_Opnd : Node_Id)
2602 N : constant Node_Id :=
2603 New_Node (N_Op_Rotate_Right, Sloc);
2605 Set_Left_Opnd (N, Left_Opnd);
2606 Set_Right_Opnd (N, Right_Opnd);
2607 Set_Chars (N, Name_Rotate_Right);
2608 Set_Entity (N, Standard_Op_Rotate_Right);
2610 end Make_Op_Rotate_Right;
2612 function Make_Op_Shift_Left (Sloc : Source_Ptr;
2613 Left_Opnd : Node_Id;
2614 Right_Opnd : Node_Id)
2617 N : constant Node_Id :=
2618 New_Node (N_Op_Shift_Left, Sloc);
2620 Set_Left_Opnd (N, Left_Opnd);
2621 Set_Right_Opnd (N, Right_Opnd);
2622 Set_Chars (N, Name_Shift_Left);
2623 Set_Entity (N, Standard_Op_Shift_Left);
2625 end Make_Op_Shift_Left;
2627 function Make_Op_Shift_Right_Arithmetic (Sloc : Source_Ptr;
2628 Left_Opnd : Node_Id;
2629 Right_Opnd : Node_Id)
2632 N : constant Node_Id :=
2633 New_Node (N_Op_Shift_Right_Arithmetic, Sloc);
2635 Set_Left_Opnd (N, Left_Opnd);
2636 Set_Right_Opnd (N, Right_Opnd);
2637 Set_Chars (N, Name_Shift_Right_Arithmetic);
2638 Set_Entity (N, Standard_Op_Shift_Right_Arithmetic);
2640 end Make_Op_Shift_Right_Arithmetic;
2642 function Make_Op_Shift_Right (Sloc : Source_Ptr;
2643 Left_Opnd : Node_Id;
2644 Right_Opnd : Node_Id)
2647 N : constant Node_Id :=
2648 New_Node (N_Op_Shift_Right, Sloc);
2650 Set_Left_Opnd (N, Left_Opnd);
2651 Set_Right_Opnd (N, Right_Opnd);
2652 Set_Chars (N, Name_Shift_Right);
2653 Set_Entity (N, Standard_Op_Shift_Right);
2655 end Make_Op_Shift_Right;
2657 function Make_Delta_Constraint (Sloc : Source_Ptr;
2658 Delta_Expression : Node_Id;
2659 Range_Constraint : Node_Id := Empty)
2662 N : constant Node_Id :=
2663 New_Node (N_Delta_Constraint, Sloc);
2665 Set_Delta_Expression (N, Delta_Expression);
2666 Set_Range_Constraint (N, Range_Constraint);
2668 end Make_Delta_Constraint;
2670 function Make_At_Clause (Sloc : Source_Ptr;
2671 Identifier : Node_Id;
2672 Expression : Node_Id)
2675 N : constant Node_Id :=
2676 New_Node (N_At_Clause, Sloc);
2678 Set_Identifier (N, Identifier);
2679 Set_Expression (N, Expression);
2683 function Make_Mod_Clause (Sloc : Source_Ptr;
2684 Expression : Node_Id;
2685 Pragmas_Before : List_Id)
2688 N : constant Node_Id :=
2689 New_Node (N_Mod_Clause, Sloc);
2691 Set_Expression (N, Expression);
2692 Set_Pragmas_Before (N, Pragmas_Before);
2694 end Make_Mod_Clause;
2696 function Make_Conditional_Expression (Sloc : Source_Ptr;
2697 Expressions : List_Id)
2700 N : constant Node_Id :=
2701 New_Node (N_Conditional_Expression, Sloc);
2703 Set_Expressions (N, Expressions);
2705 end Make_Conditional_Expression;
2707 function Make_Expanded_Name (Sloc : Source_Ptr;
2710 Selector_Name : Node_Id)
2713 N : constant Node_Id :=
2714 New_Node (N_Expanded_Name, Sloc);
2716 Set_Chars (N, Chars);
2717 Set_Prefix (N, Prefix);
2718 Set_Selector_Name (N, Selector_Name);
2720 end Make_Expanded_Name;
2722 function Make_Free_Statement (Sloc : Source_Ptr;
2723 Expression : Node_Id)
2726 N : constant Node_Id :=
2727 New_Node (N_Free_Statement, Sloc);
2729 Set_Expression (N, Expression);
2731 end Make_Free_Statement;
2733 function Make_Freeze_Entity (Sloc : Source_Ptr;
2734 Actions : List_Id := No_List)
2737 N : constant Node_Id :=
2738 New_Node (N_Freeze_Entity, Sloc);
2740 Set_Actions (N, Actions);
2742 end Make_Freeze_Entity;
2744 function Make_Implicit_Label_Declaration (Sloc : Source_Ptr;
2745 Defining_Identifier : Node_Id)
2748 N : constant Node_Id :=
2749 New_Node (N_Implicit_Label_Declaration, Sloc);
2751 Set_Defining_Identifier (N, Defining_Identifier);
2753 end Make_Implicit_Label_Declaration;
2755 function Make_Itype_Reference (Sloc : Source_Ptr)
2758 N : constant Node_Id :=
2759 New_Node (N_Itype_Reference, Sloc);
2762 end Make_Itype_Reference;
2764 function Make_Raise_Constraint_Error (Sloc : Source_Ptr;
2765 Condition : Node_Id := Empty;
2769 N : constant Node_Id :=
2770 New_Node (N_Raise_Constraint_Error, Sloc);
2772 Set_Condition (N, Condition);
2773 Set_Reason (N, Reason);
2775 end Make_Raise_Constraint_Error;
2777 function Make_Raise_Program_Error (Sloc : Source_Ptr;
2778 Condition : Node_Id := Empty;
2782 N : constant Node_Id :=
2783 New_Node (N_Raise_Program_Error, Sloc);
2785 Set_Condition (N, Condition);
2786 Set_Reason (N, Reason);
2788 end Make_Raise_Program_Error;
2790 function Make_Raise_Storage_Error (Sloc : Source_Ptr;
2791 Condition : Node_Id := Empty;
2795 N : constant Node_Id :=
2796 New_Node (N_Raise_Storage_Error, Sloc);
2798 Set_Condition (N, Condition);
2799 Set_Reason (N, Reason);
2801 end Make_Raise_Storage_Error;
2803 function Make_Reference (Sloc : Source_Ptr;
2807 N : constant Node_Id :=
2808 New_Node (N_Reference, Sloc);
2810 Set_Prefix (N, Prefix);
2814 function Make_Subprogram_Info (Sloc : Source_Ptr;
2815 Identifier : Node_Id)
2818 N : constant Node_Id :=
2819 New_Node (N_Subprogram_Info, Sloc);
2821 Set_Identifier (N, Identifier);
2823 end Make_Subprogram_Info;
2825 function Make_Unchecked_Expression (Sloc : Source_Ptr;
2826 Expression : Node_Id)
2829 N : constant Node_Id :=
2830 New_Node (N_Unchecked_Expression, Sloc);
2832 Set_Expression (N, Expression);
2834 end Make_Unchecked_Expression;
2836 function Make_Unchecked_Type_Conversion (Sloc : Source_Ptr;
2837 Subtype_Mark : Node_Id;
2838 Expression : Node_Id)
2841 N : constant Node_Id :=
2842 New_Node (N_Unchecked_Type_Conversion, Sloc);
2844 Set_Subtype_Mark (N, Subtype_Mark);
2845 Set_Expression (N, Expression);
2847 end Make_Unchecked_Type_Conversion;
2849 function Make_Validate_Unchecked_Conversion (Sloc : Source_Ptr)
2852 N : constant Node_Id :=
2853 New_Node (N_Validate_Unchecked_Conversion, Sloc);
2856 end Make_Validate_Unchecked_Conversion;