1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
10 -- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
12 -- GNAT is free software; you can redistribute it and/or modify it under --
13 -- terms of the GNU General Public License as published by the Free Soft- --
14 -- ware Foundation; either version 2, or (at your option) any later ver- --
15 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
16 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
17 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
18 -- for more details. You should have received a copy of the GNU General --
19 -- Public License distributed with GNAT; see file COPYING. If not, write --
20 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
21 -- MA 02111-1307, USA. --
23 -- GNAT was originally developed by the GNAT team at New York University. --
24 -- Extensive contributions were provided by Ada Core Technologies Inc. --
26 ------------------------------------------------------------------------------
28 pragma Style_Checks (All_Checks);
29 -- Turn off subprogram order checking, since the routines here are
30 -- generated automatically in order.
32 -- This file is a template used as input to the utility program XNmake,
33 -- which reads this template, and the spec of Sinfo (sinfo.ads) and
34 -- generates the body and/or the spec for the Nmake package (files
35 -- nmake.ads and nmake.adb)
37 with Atree; use Atree; -- body only
38 with Nlists; use Nlists; -- spec only
39 with Sinfo; use Sinfo; -- body only
40 with Snames; use Snames; -- body only
41 with Stand; use Stand; -- body only
42 with Types; use Types; -- spec only
43 with Uintp; use Uintp; -- spec only
44 with Urealp; use Urealp; -- spec only
48 -- This package contains a set of routines used to construct tree nodes
49 -- using a functional style. There is one routine for each node type defined
50 -- in Sinfo with the general interface:
52 -- function Make_xxx (Sloc : Source_Ptr,
53 -- Field_Name_1 : Field_Name_1_Type [:= default]
54 -- Field_Name_2 : Field_Name_2_Type [:= default]
58 -- Only syntactic fields are included (i.e. fields marked as "-Sem" or "-Lib"
59 -- in the Sinfo spec are excluded). In addition, the following four syntactic
60 -- fields are excluded:
67 -- since they are very rarely set in expanded code. If they need to be set,
68 -- to other than the default values (False, False, False, zero), then the
69 -- appropriate Set_xxx procedures must be used on the returned value.
71 -- Default values are provided only for flag fields (where the default is
72 -- False), and for optional fields. An optional field is one where the
73 -- comment line describing the field contains the string "(set to xxx if".
74 -- For such fields, a default value of xxx is provided."
76 -- Warning: since calls to Make_xxx routines are normal function calls, the
77 -- arguments can be evaluated in any order. This means that at most one such
78 -- argument can have side effects (e.g. be a call to a parse routine).
80 !!TEMPLATE INSERTION POINT