comp.lang.ada
 help / color / mirror / Atom feed
* ASIS Question: Looking up procedure names.
@ 2005-05-07 20:10 Peter C. Chapin
  2005-05-09  8:49 ` Jean-Pierre Rosen
  2005-05-09 15:18 ` James Alan Farrell
  0 siblings, 2 replies; 7+ messages in thread
From: Peter C. Chapin @ 2005-05-07 20:10 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-05-18 18:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-07 20:10 ASIS Question: Looking up procedure names Peter C. Chapin
2005-05-09  8:49 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox