comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: Any Ada source XML serialization standard?
Date: Sat, 07 Apr 2012 16:54:22 +0200
Date: 2012-04-07T16:54:22+02:00	[thread overview]
Message-ID: <op.wceg0wjcule2fv@douda-yannick> (raw)
In-Reply-To: NbKdnaPIVaUAoOLS4p2dnAA@giganews.com

Hi Peter,

Le Fri, 06 Apr 2012 21:01:46 +0200, Peter C. Chapin <PChapin@vtc.vsc.edu>  
a écrit:

> On 2012-04-06 13:54, Yannick Duchêne (Hibou57) wrote:
>
>> I read about a so called cppML, whose purpose was precisely that, but
>> for C++. As there use to be a cppML, I naively searched for an adaML or
>> some sort of that, but failed. By the way, this cppML seems dead, or am
>> I wrong?
>
> I wonder if one could hijack ASIS for this purpose. That is, define an  
> XML representation of Ada source using XML elements with names that  
> correspond to ASIS elements. Such an approach might allow a certain  
> amount of "mindshare" between the two systems. A person familiar with  
> ASIS could easily understand the XML representation or visa-versa.

ASIS adds interpretation, while an XML representation of Ada source should  
not. There are, in the Ada language, some intentional ambiguities, like  
the famous one which allow to write the same way, a function invocation  
and a reference to an array element. It's a long time I did not play with  
ASIS, however if my mind is right, for ASIS, “E (F)” is not same when E is  
a function or an array.

Using the BNF grammars terms as found in the RM, may not always be OK for  
the same reasons (as the terms refers to interpretations), while it seems  
to be the best starting point. If the RM could explicitly point  
intentional ambiguities and provides names for these intentionally  
ambiguous source constructs, this would be an aid.

The purpose is to get ride of formating (would be automatically applied by  
the view depending on user own preferences) and to be able to easily  
access to source as structured data. With the addition of XML namepaces to  
be able to add meta‑data more handily than with bloated comments and  
mini‑languages in comments, to allow filtered view, outlining, and other  
things, and my favorite one: cross references between sources and  
documentations.

This is language neutral, there is no complaints about Ada here ;) Just  
that such a standard would be welcome and would not cost too much I  
believe.

If you forgive me a bit of out‑of‑topic for an Ada Usenet, here are the  
readings I could find on the topic:

[Source Code Files as Structured  
Documents](http://www.sdml.info/papers/iwpc02.pdf)
[Towards Portable Source Code Representations Using  
XML](http://www.sdml.info/library/Mamas00.pdf)

There was a now abandoned close research area, named Intentional  
Programming. But this differs in many points and the above is far less  
specific.

-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University



  parent reply	other threads:[~2012-04-07 14:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-06 17:54 Any Ada source XML serialization standard? Yannick Duchêne (Hibou57)
2012-04-06 19:01 ` Peter C. Chapin
2012-04-06 21:41   ` Simon Wright
2012-04-07 14:54   ` Yannick Duchêne (Hibou57) [this message]
2012-04-09 21:25     ` Manuel Collado
replies disabled

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