1 |
12 |
jlechner |
------------------------------------------------------------------------------
|
2 |
|
|
-- --
|
3 |
|
|
-- GNAT COMPILER COMPONENTS --
|
4 |
|
|
-- --
|
5 |
|
|
-- N M A K E --
|
6 |
|
|
-- --
|
7 |
|
|
-- T e m p l a t e --
|
8 |
|
|
-- --
|
9 |
|
|
-- Copyright (C) 1992-2005 Free Software Foundation, Inc. --
|
10 |
|
|
-- --
|
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, 51 Franklin Street, Fifth Floor, --
|
20 |
|
|
-- Boston, MA 02110-1301, USA. --
|
21 |
|
|
-- --
|
22 |
|
|
-- GNAT was originally developed by the GNAT team at New York University. --
|
23 |
|
|
-- Extensive contributions were provided by Ada Core Technologies Inc. --
|
24 |
|
|
-- --
|
25 |
|
|
------------------------------------------------------------------------------
|
26 |
|
|
-- This file is a template used as input to the utility program XNmake,
|
27 |
|
|
-- which reads this template, and the spec of Sinfo (sinfo.ads) and
|
28 |
|
|
-- generates the body and/or the spec for the Nmake package (files
|
29 |
|
|
-- nmake.ads and nmake.adb)
|
30 |
|
|
|
31 |
|
|
pragma Style_Checks (All_Checks);
|
32 |
|
|
-- Turn off subprogram order checking, since the routines here are
|
33 |
|
|
-- generated automatically in order.
|
34 |
|
|
|
35 |
|
|
with Atree; use Atree; -- body only
|
36 |
|
|
with Nlists; use Nlists; -- spec only
|
37 |
|
|
with Sinfo; use Sinfo; -- body only
|
38 |
|
|
with Snames; use Snames; -- body only
|
39 |
|
|
with Stand; use Stand; -- body only
|
40 |
|
|
with Types; use Types; -- spec only
|
41 |
|
|
with Uintp; use Uintp; -- spec only
|
42 |
|
|
with Urealp; use Urealp; -- spec only
|
43 |
|
|
|
44 |
|
|
package Nmake is
|
45 |
|
|
|
46 |
|
|
-- This package contains a set of routines used to construct tree nodes
|
47 |
|
|
-- using a functional style. There is one routine for each node type defined
|
48 |
|
|
-- in Sinfo with the general interface:
|
49 |
|
|
|
50 |
|
|
-- function Make_xxx (Sloc : Source_Ptr,
|
51 |
|
|
-- Field_Name_1 : Field_Name_1_Type [:= default]
|
52 |
|
|
-- Field_Name_2 : Field_Name_2_Type [:= default]
|
53 |
|
|
-- ...)
|
54 |
|
|
-- return Node_Id
|
55 |
|
|
|
56 |
|
|
-- Only syntactic fields are included (i.e. fields marked as "-Sem" or "-Lib"
|
57 |
|
|
-- in the Sinfo spec are excluded). In addition, the following four syntactic
|
58 |
|
|
-- fields are excluded:
|
59 |
|
|
|
60 |
|
|
-- Prev_Ids
|
61 |
|
|
-- More_Ids
|
62 |
|
|
-- Comes_From_Source
|
63 |
|
|
-- Paren_Count
|
64 |
|
|
|
65 |
|
|
-- since they are very rarely set in expanded code. If they need to be set,
|
66 |
|
|
-- to other than the default values (False, False, False, zero), then the
|
67 |
|
|
-- appropriate Set_xxx procedures must be used on the returned value.
|
68 |
|
|
|
69 |
|
|
-- Default values are provided only for flag fields (where the default is
|
70 |
|
|
-- False), and for optional fields. An optional field is one where the
|
71 |
|
|
-- comment line describing the field contains the string "(set to xxx if".
|
72 |
|
|
-- For such fields, a default value of xxx is provided."
|
73 |
|
|
|
74 |
|
|
-- Warning: since calls to Make_xxx routines are normal function calls, the
|
75 |
|
|
-- arguments can be evaluated in any order. This means that at most one such
|
76 |
|
|
-- argument can have side effects (e.g. be a call to a parse routine).
|
77 |
|
|
|
78 |
|
|
!!TEMPLATE INSERTION POINT
|
79 |
|
|
|
80 |
|
|
end Nmake;
|