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.
31 -- This file is a template used as input to the utility program XNmake,
32 -- which reads this template, and the spec of Sinfo (sinfo.ads) and
33 -- generates the body and/or the spec for the Nmake package (files
34 -- nmake.ads and nmake.adb)
36 with Atree; use Atree; -- body only
37 with Nlists; use Nlists; -- spec only
38 with Sinfo; use Sinfo; -- body only
39 with Snames; use Snames; -- body only
40 with Stand; use Stand; -- body only
41 with Types; use Types; -- spec only
42 with Uintp; use Uintp; -- spec only
43 with Urealp; use Urealp; -- spec only
47 -- This package contains a set of routines used to construct tree nodes
48 -- using a functional style. There is one routine for each node type defined
49 -- in Sinfo with the general interface:
51 -- function Make_xxx (Sloc : Source_Ptr,
52 -- Field_Name_1 : Field_Name_1_Type [:= default]
53 -- Field_Name_2 : Field_Name_2_Type [:= default]
57 -- Only syntactic fields are included (i.e. fields marked as "-Sem" or "-Lib"
58 -- in the Sinfo spec are excluded). In addition, the following four syntactic
59 -- fields are excluded:
66 -- since they are very rarely set in expanded code. If they need to be set,
67 -- to other than the default values (False, False, False, zero), then the
68 -- appropriate Set_xxx procedures must be used on the returned value.
70 -- Default values are provided only for flag fields (where the default is
71 -- False), and for optional fields. An optional field is one where the
72 -- comment line describing the field contains the string "(set to xxx if".
73 -- For such fields, a default value of xxx is provided."
75 -- Warning: since calls to Make_xxx routines are normal function calls, the
76 -- arguments can be evaluated in any order. This means that at most one such
77 -- argument can have side effects (e.g. be a call to a parse routine).
79 !!TEMPLATE INSERTION POINT