comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@acm.org>
Subject: Re: ANN: Ada source code decorator
Date: Fri, 26 May 2006 07:24:39 -0400
Date: 2006-05-26T07:24:39-04:00	[thread overview]
Message-ID: <uk689av0o.fsf@acm.org> (raw)
In-Reply-To: m2vert6fv0.fsf@grendel.local

Simon Wright <simon@pushface.org> writes:

> Stephen Leake <stephen_leake@acm.org> writes:
>
>> Simon Wright <simon@pushface.org> writes:
>>
>>> Georg Bauhaus <bauhaus@futureapps.de> writes:
>>>
>>>>   (* XML      - time permitting, using Simon Wright's ASIS based GIs.)
>>>
>>> Although that work was useful, a lot more needs to be done on it to
>>> make it anywhere near complete. It would be a lot easier if ASIS
>>> (the standard) was open-source.
>>
>> The ASIS _standard_ is open-source; it consists of Ada specs giving
>> the API.
>>
>> The GNAT implementation is also open-source.
>>
>> So what is missing?
>
> Something to make it clear what the actual structure is. I found it
> very hard indeed to understand what the API was trying to tell me; 

Perhaps there needs to be more user-friendly documentation of the ASIS
structure. 

> for example, a qualified name a.b.c is stored in something like
>
>   (a (b (c)))
>
> which you can understand a compiler using, 

Well, yes; ASIS is designed to represent the information a compiler
knows. So it helps to be able to think like a compiler :).

> rather than
>
>   <name>
>       <component>a</component>
>       <component>b</component>
>       <component>c</component>
>    </name>

Well, this has nothing to do with being "open source".

You are arguing that the particular structure defined in the ASIS spec
is not one you would use for your particular application. 

That is certainly your choice. Everyone else will also have a
particular choice; probably different. I suspect the choice of
structure depends heavily on the algorithm you want to implement.

So it will be very difficult to get agreement on a _standard_ XML
representation of Ada source code. But it's probably worth trying. 

> and asis2xml would _definitely_ produce the latter (I forget whether
> it actually does at this stage).

http://www.pushface.org/asis2xml/ says the structure output by
asis2xml follows that of ASIS, so I'd be surprised if it did what you
describe above. 

I would argue that an XML structure that is as close as possible to
the ASIS structure would be the best one to standardize.

When you (Simon Wright), as the author of asis2xml, decided to change
the representation of a qualified name as above, what criteria were
you using to determine the "right" structure?

How would that transformation handle expressions like

    Array_1 (i).Function_Pointer_2 (x, y, z).Component

?

When using ASIS to implement a non-trivial source processing
algorithm, the first step is to transform the ASIS-defined structure
into one that is better for your algorithm; that's what auto_text_io
does (my ASIS tool). Even if you start from an ASIS-equivalent XML
representation, that will still be true.

-- 
-- Stephe



  reply	other threads:[~2006-05-26 11:24 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-23 10:59 ANN: Ada source code decorator Georg Bauhaus
2006-05-23 21:01 ` Simon Wright
2006-05-25  0:28   ` Stephen Leake
2006-05-25  4:54     ` Jeffrey R. Carter
2006-05-25 12:36       ` Georg Bauhaus
2006-05-25 13:48       ` Stephen Leake
2006-05-25 16:16         ` Manuel Collado
2006-05-26  5:54           ` Martin Krischik
2006-05-26 11:08             ` Georg Bauhaus
2006-05-26 20:35             ` Simon Wright
2006-05-27  8:59               ` Martin Krischik
2006-05-27 11:25                 ` Georg Bauhaus
2006-05-27 12:13                   ` Martin Krischik
2006-05-27 12:06                 ` Simon Wright
2006-05-30 17:50               ` Martin Dowie
2006-05-25 19:53     ` Simon Wright
2006-05-26 11:24       ` Stephen Leake [this message]
2006-05-26 21:01         ` Simon Wright
2006-05-27 11:51           ` Stephen Leake
2006-05-27 17:38             ` Simon Wright
replies disabled

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