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_ch2.adb
< prev
next >
Wrap
Text File
|
1996-09-28
|
3KB
|
80 lines
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S E M _ C H 2 --
-- --
-- B o d y --
-- --
-- $Revision: 1.3 $ --
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
with Atree; use Atree;
with Opt; use Opt;
with Sinfo; use Sinfo;
with Stand; use Stand;
package body Sem_Ch2 is
-------------------------------
-- Analyze_Character_Literal --
-------------------------------
procedure Analyze_Character_Literal (N : Node_Id) is
begin
Set_Etype (N, Any_Character);
Set_Is_Static_Expression (N);
end Analyze_Character_Literal;
-----------------------------
-- Analyze_Integer_Literal --
-----------------------------
procedure Analyze_Integer_Literal (N : Node_Id) is
begin
Set_Etype (N, Universal_Integer);
Set_Is_Static_Expression (N);
end Analyze_Integer_Literal;
--------------------------
-- Analyze_Real_Literal --
--------------------------
procedure Analyze_Real_Literal (N : Node_Id) is
begin
Set_Etype (N, Universal_Real);
Set_Is_Static_Expression (N);
end Analyze_Real_Literal;
----------------------------
-- Analyze_String_Literal --
----------------------------
procedure Analyze_String_Literal (N : Node_Id) is
begin
Set_Etype (N, Any_String);
-- String literals are static in Ada 95. Note that if the subtype
-- turns out to be non-static, then the Is_Static_Expression flag
-- will be reset in Eval_String_Literal.
if Ada_95 then
Set_Is_Static_Expression (N);
end if;
end Analyze_String_Literal;
end Sem_Ch2;