home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 1
/
ADE-1.bin
/
ade-dist
/
gnat-2.06-src.tgz
/
tar.out
/
fsf
/
gnat
/
ada
/
sem_res.ads
< prev
next >
Wrap
Text File
|
1996-09-28
|
4KB
|
70 lines
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S E M _ R E S --
-- --
-- S p e c --
-- --
-- $Revision: 1.10 $ --
-- --
-- Copyright (c) 1992,1993,1994 NYU, All Rights Reserved --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. --
-- --
------------------------------------------------------------------------------
-- Resolution processing for all subexpression nodes. Note that the separate
-- package Sem_Aggr contains the actual resolution routines for aggregates,
-- which are separated off since aggregate processing is complex.
with Types; use Types;
package Sem_Res is
-- As described in Sem_Ch4, the type resolution proceeds in two phases.
-- The first phase is a bottom up pass that is achieved during the
-- recursive traversal performed by the Analyze procedures. This phase
-- determines unambiguous types, and collects sets of possible types
-- where the interpretation is potentially ambiguous.
-- On completing this bottom up pass, which corresponds to a call to
-- Analyze on a complete context, the Resolve routine is called which
-- performs a top down resolution with recursive calls to itself to
-- resolve operands.
-- Since in practice a lot of semantic analysis has to be postponed until
-- types are known (e.g. static folding, setting of suppress flags), the
-- Resolve routines also complete the semantic analyze, and also call the
-- expander for possibly expansion of the completely type resolved node.
procedure Resolve (N : Node_Id; Typ : Entity_Id);
-- Top level type-checking procedure, called in a complete context. The
-- construct N, which is a subexpression, has already been analyzed, and
-- is required to be of type Typ given the analysis of the context (which
-- uses the information gathered on the bottom up phase in Analyze). The
-- resolve routines do various other processing, e.g. static evaluation.
procedure Resolve_Discrete_Subtype_Indication
(N : Node_Id;
Typ : Entity_Id);
-- Resolve subtype indications in choices (case statements and
-- aggregates) and in index constraints. Note that the resulting Etype
-- of the subtype indication node is set to the Etype of the contained
-- range (i.e. an Itype is not constructed for the actual subtype).
procedure Resolve_Entry (Entry_Name : Node_Id);
-- Find name of entry being called, and resolve prefix of name with its
-- own type. For now we assume that the prefix cannot be overloaded and
-- the name of the entry plays no role in the resolution.
end Sem_Res;