From: "Peter C. Chapin" <pchapin@sover.net>
Subject: ASIS Question: Looking up procedure names.
Date: Sat, 07 May 2005 20:10:46 GMT
Date: 2005-05-07T20:10:46+00:00 [thread overview]
Message-ID: <Xns964FA496D943pchapinsovernet@207.106.92.237> (raw)
Hi! I'm writing an ASIS program and I've encountered a problem that I'm
having trouble figuring out.
I have an element that I know is a procedure call statement. What I'm
looking for is the full name of the procedure, including package
membership. So for example
with Ada.Text_IO; use Ada.Text_IO;
procedure Hello is
begin
Put_Line("Hello, World");
end Hello;
When looking at the Put_Line procedure call statement, I want to get the
name "Ada.Text_IO.Put_Line." Is this possible?
Starting with the procedure call statement, I can use
Corresponding_Called_Entity to get the procedure declaration. I can then
use Names to get a list of defining names for that declaration (wouldn't
there always be only one such name for procedure declarations?). I can
then convert the first name on this list to program text using
Defining_Name_Image. However, the name returned in this case is just
'Put_Line' and not 'Ada.Text_IO.Put_Line' as desired.
I see in Asis.Declarations the function Defining_Prefix that takes
A_Defining_Expanded_Name and returns the prefix. So that tells me what I
need is a way to get A_Defining_Expanded_Name from my procedure call
statement. This is where I'm stuck.
TIA
Peter
next reply other threads:[~2005-05-07 20:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-07 20:10 Peter C. Chapin [this message]
2005-05-09 8:49 ` ASIS Question: Looking up procedure names Jean-Pierre Rosen
2005-05-09 11:25 ` Peter C. Chapin
2005-05-09 15:18 ` James Alan Farrell
2005-05-18 15:14 ` James Alan Farrell
2005-05-18 16:41 ` Jean-Pierre Rosen
2005-05-18 18:08 ` James Alan Farrell
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox