From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,21a8034919747a69 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.germany.com!feeder.news.tin.it!spool.news.tin.it!not-for-mail From: Francesco Bochicchio Subject: Re: Splitting packages in per-procedure separate files Date: Sun, 11 Feb 2007 13:20:30 +0100 User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table (Debian GNU/Linux)) Message-ID: Newsgroups: comp.lang.ada References: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Organization: TIN.IT (http://www.tin.it) X-Comments: Please send technical notifications to newsmaster@tin.it NNTP-Posting-Host: 82.55.255.215 X-Trace: 1171196561 reader5.news.tin.it 6019 82.55.255.215:4339 X-Complaints-To: Please send abuse reports to abuse@tin.it Xref: g2news2.google.com comp.lang.ada:9258 Date: 2007-02-11T13:20:30+01:00 List-Id: Il Sat, 10 Feb 2007 18:49:22 +0000, Simon Wright ha scritto: > Francesco Bochicchio 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