comp.lang.ada
 help / color / mirror / Atom feed
From: "Marc A. Criley" <mcNOSPAM@mckae.com>
Subject: Re: ANNOUNCE: Avatox 1.0 is now available
Date: Sat, 09 Sep 2006 13:56:30 -0500
Date: 2006-09-09T13:56:30-05:00	[thread overview]
Message-ID: <a475a$45030e5e$41f0a638$9466@API-DIGITAL.COM> (raw)
In-Reply-To: <45027b40@news.upm.es>

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:
 >
 > <A_CLAUSE ... startLine="29" endLine="29" startCol="1" endCol="29">
 >   <A_WITH_CLAUSE ... startLine="29" endLine="29" startCol="1" endCol="29"/>
 >   <AN_EXPRESSION ... startLine="29" endLine="29" startCol="6" endCol="28">
 >     <A_SELECTED_COMPONENT ... startLine="29" endLine="29" startCol="6" 
endCol="28"/>
 >     <AN_EXPRESSION ... startLine="29" endLine="29" startCol="6" endCol="19">
 >       ....
 >
 > You can see that <A_WITH_CLAUSE> from (29,1) to (29,29) lexically 
contains <AN_EXPRESSION> 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 <A_SELECTED_COMPONENT> from (29,6) to (29,28) and 
<AN_EXPRESSION> 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





  parent reply	other threads:[~2006-09-09 18:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-17  0:58 ANNOUNCE: Avatox 1.0 is now available Marc A. Criley
2006-08-17  2:10 ` Jeffrey Creem
2006-08-18  8:03 ` Pascal Obry
2006-08-18  8:04 ` Pascal Obry
2006-08-18  8:05 ` Pascal Obry
2006-08-21 20:59 ` Simon Wright
2006-08-24  0:41   ` Marc A. Criley
2006-08-24  6:03     ` Simon Wright
2006-08-25  1:15       ` Marc A. Criley
2006-09-06 23:29       ` Randy Brukardt
2006-09-07 20:46         ` Simon Wright
2006-09-08  2:40           ` Randy Brukardt
2006-09-08 13:40             ` Georg Bauhaus
2006-09-09  8:28               ` Manuel Collado
2006-09-09 12:21                 ` Simon Wright
2006-09-11  7:58                   ` Manuel Collado
2006-09-09 18:56                 ` Marc A. Criley [this message]
2006-09-11  8:10                   ` 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