From: Simon Wright <simon.j.wright@mac.com>
Subject: Re: Splitting packages in per-procedure separate files
Date: Sat, 10 Feb 2007 18:49:22 +0000
Date: 2007-02-10T18:49:22+00:00 [thread overview]
Message-ID: <m2k5yphmq5.fsf@grendel.local> (raw)
In-Reply-To: pan.2007.02.10.16.23.07.43888@virgilio.it
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!
next prev parent reply other threads:[~2007-02-10 18:49 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 [this message]
2007-02-11 12:20 ` Francesco Bochicchio
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