comp.lang.ada
 help / color / mirror / Atom feed
From: Francesco Bochicchio <bockman@virgilio.it>
Subject: Re: Splitting packages  in per-procedure separate files
Date: Sun, 11 Feb 2007 13:20:30 +0100
Date: 2007-02-11T13:20:30+01:00	[thread overview]
Message-ID: <pan.2007.02.11.12.20.21.95306@virgilio.it> (raw)
In-Reply-To: m2k5yphmq5.fsf@grendel.local

Il Sat, 10 Feb 2007 18:49:22 +0000, Simon Wright ha scritto:

> Francesco Bochicchio <bockman@virgilio.it> writes:
> 
>> due to coding standards which were not enforced when someone else
>> coded, I now have to split the packages of a 20000 LOC ADA program,
>> putting a single procedure per file (using the separate clause).
>>
>> While this is not a very big work. it would be nice t find some tool
>> to help in this task.
>>
>> Alternatively, I was tinking to prepare some script myself (Python +
>> some parser library ). In this case, it would help to have ADA
>> grammar rules written in yacc-style or similar. This could also be
>> useful in similar situation in the future.
> 
> You might consider an ASIS-based tool.
> 
> I had thought that Adalog (http://www.adalog.fr/) might have already
> done it, but it seems not (worth a look, though; AdaSubst is the tool
> I was thinking of).
> 
> There are (at least) 2 implementations of ASIS -> XML tools.  I would
> recommend my own
> (http://gnat-asis.sourceforge.net/pmwiki.php/Main/ASIS2XML) but you
> probably want to retain comments, so you might find Marc Criley's
> (http://www.mckae.com/avatox.html) more appropriate.
> 
> Marc says
> 
>   "Given that the Avatox XML representation of the source code
>   comprehensively represents the content and layout of the source
>   code, there's nothing stopping one from developing a utility to
>   reconstitute the Ada source from the XML.
> 
>   "Given that, XSLT transformations become available to modify the
>   Avatox XML to produce a modified version of the original program."
> 
> and of course you need a good grasp of XSLT (probably) and a fair
> amount of enthusiasm to contemplate doing the first part!

The problem is that I'm not very good at XML-related stuff and I have a
short time for the task, so if I can't  find  a quick slution I'll end
doing it by hand.

The links where interesting anyway, and the knowledge that exists tools
that convert ADA code in XML structure may come hany in the future.

Ciao & Thanks
------------
FB



  reply	other threads:[~2007-02-11 12:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-10 16:23 Splitting packages in per-procedure separate files Francesco Bochicchio
2007-02-10 17:50 ` Stephen Sangwine
2007-02-10 18:36   ` Anh Vo
2007-02-10 19:36   ` Jeffrey R. Carter
2007-02-11 12:09     ` Francesco Bochicchio
2007-02-11 14:08       ` Markus E Leypold
2007-02-11 19:29       ` Gautier
2007-02-12 10:45       ` Stephen Leake
2007-02-12 18:42         ` Francesco Bochicchio
2007-02-10 18:49 ` Simon Wright
2007-02-11 12:20   ` Francesco Bochicchio [this message]
2007-02-12  9:13   ` Jean-Pierre Rosen
2007-02-10 19:33 ` Jeffrey R. Carter
2007-02-11 13:45 ` Jeffrey Creem
replies disabled

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