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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,473e6b129c2f30cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!atl-c08.usenetserver.com!news.usenetserver.com!pc02.usenetserver.com!API-DIGITAL.COM-a2kHrUvQQWlmc!not-for-mail Date: Sat, 09 Sep 2006 13:56:30 -0500 From: "Marc A. Criley" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: ANNOUNCE: Avatox 1.0 is now available References: <45018e97$0$17399$9b4e6d93@newsspool2.arcor-online.net> <45027b40@news.upm.es> In-Reply-To: <45027b40@news.upm.es> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Complaints-To: abuse@usenetserver.com Organization: UseNetServer.com X-Trace: a475a45030e5ee455039d09466 Xref: g2news2.google.com comp.lang.ada:6539 Date: 2006-09-09T13:56:30-05:00 List-Id: Manuel Collado wrote: > What puzzles me is that the XML structure (nesting) doesn't follows the lexical Ada source structure. Example from avatox.adb --> avatox.adb.xml: > > > > > > > .... > > You can see that from (29,1) to (29,29) lexically contains from (29,6) to (29,28). But the latest is not nested inside the former. Instead, it appears as a sibling of it. > > The same for from (29,6) to (29,28) and from (29,6) to (29,19). > > Is that the intended behaviour? Blame it on the Display_Source program which served as the progenitor of Avatox :-) Here's what Display_Source generates for the corresponding portion that you reference: A_CLAUSE A_WITH_CLAUSE ->AN_EXPRESSION -> A_SELECTED_COMPONENT --->AN_EXPRESSION Avatox really did little more to the output than wrap it with an XML syntax. It then added value by providing the position info and some basic "meta-information", i.e, the "pedigree" of an XML element, for the aid of post-processors. My interest is what can happen when starting with the XML and processing it, rather than trying to find the bestest XML representation of an Ada program. So I did minimal processing to get the XML, even if it means there's redundant stuff in it. So long as its consistent, well-ordered, and complete (meaning all the clauses, comments, and position info), I'm happy. -- Marc A. Criley -- Mckae Technologies -- www.mckae.com -- DTraq - Avatox - XIA - XML EZ Out