From: Simon Wright <simon@pushface.org>
Subject: Re: Kickstarter for beginning work on a new open-source Compiler
Date: Thu, 20 Mar 2014 21:06:03 +0000
Date: 2014-03-20T21:06:03+00:00 [thread overview]
Message-ID: <lywqfo37ic.fsf@pushface.org> (raw)
In-Reply-To: wcc7g7oubyn.fsf@shell01.TheWorld.com
Robert A Duff <bobduff@shell01.TheWorld.com> writes:
> Simon Wright <simon@pushface.org> writes:
>
>> Luke A. Guest <laguest@archeia.com> writes:
>>> ASIS doesn't have Ada 2012 support, yet. Unless there are unofficial
>>> extensions, do you have links?
>
> The latest GNAT Pro ASIS fully supports Ada 2012. I don't know if
> that has made it into the GPL version yet.
GNAT & ASIS GPL 2013 seem to do a pretty good job.
>> translates (using ASIS GPL 2012 and my ASIS2XML) to
>
> I didn't know about your ASIS2XML project until now.
>
> Do you know about gnat2xml? It is a similar tool produced by AdaCore.
> (I wrote it.) It is based on ASIS, and supports Ada 2012.
Yes, I saw it in ASIS GPL 2013. I was specially interested in the
ability to re-generate code from (possibly-modified) XML; but perhaps
this is only for testing purposes?
I was somewhat put off by what seemed to be unneeded verbosity: the code
fragment above starts
<compilation_unit
unit_kind="A_Package"
unit_class="A_Public_Declaration"
unit_origin="An_Application_Unit"
unit_full_name="Ada2012"
def_name="Ada2012"
source_file="ada2012.ads">
<sloc line="1" col="1" endline="5" endcol="12"/>
<context_clause_elements_ql>
</context_clause_elements_ql>
<unit_declaration_q>
<package_declaration>
<sloc line="1" col="1" endline="5" endcol="12"/>
<names_ql>
<defining_identifier
def_name="Ada2012" def="ada://package/Ada2012-1:9" type="null">
<sloc line="1" col="9" endline="1" endcol="15"/>
</defining_identifier>
</names_ql>
<aspect_specifications_ql>
</aspect_specifications_ql>
vs
<asis>
<compilation_unit
file="/Users/simon/sf/gnat-asis/tools/asis2xml/testing/ada2012.ads"
unit="Ada2012">
<context_clauses></context_clauses>
<unit_declaration>
<package_declaration>
<defining_identifier>Ada2012</defining_identifier>
I guess you use the _ql in <context_clause_elements_ql/> because that's
the result of a Query called Context_Clause_Elements that returns a
List; I didn't think the user needed to know that, so used just
<context_clauses/> (and I wonder whether it'd have been better to omit
an empty context clause list altogether).
This exercise has revealed a bug: I've left out all mention of private
parts! That's going to take some fixing ...
> Looking at:
>
> http://gnat-asis.sourceforge.net/pmwiki.php/Main/ASIS2XML
>
> I see some differences:
>
> gnat2xml has cross-links. E.g. each name points to the declaration
> it denotes, and each expression points to its type.
That wasn't necessary for the original motivations for ASIS2XML (one of
which you could now do using AdaControl, I'm sure).
> There is an XML schema, automatically generated by an ASIS-based tool
> called gnat2xsd.
Haven't seen that.
> Each XML element has a "source location", which tells you the starting
> and ending line and column numbers for the corresponding source text.
I can see where that would be useful! but not needed for my use case.
next prev parent reply other threads:[~2014-03-20 21:06 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-18 23:23 ANN: Kickstarter for beginning work on a new open-source Compiler Shark8
2014-03-19 9:06 ` Maciej Sobczak
2014-03-19 13:02 ` Peter Chapin
2014-03-19 13:48 ` Dmitry A. Kazakov
2014-03-19 22:11 ` Randy Brukardt
2014-03-20 14:56 ` Robert A Duff
2014-03-19 21:59 ` Randy Brukardt
2014-03-19 22:03 ` Randy Brukardt
2014-03-20 20:41 ` Shark8
2014-03-20 23:04 ` Randy Brukardt
2014-03-20 0:12 ` Luke A. Guest
2014-03-20 0:36 ` Peter Chapin
2014-03-20 0:52 ` Luke A. Guest
2014-03-20 12:10 ` Simon Wright
2014-03-20 12:45 ` Luke A. Guest
2014-03-20 13:22 ` Simon Wright
2014-03-20 14:13 ` Luke A. Guest
2014-03-20 14:17 ` J-P. Rosen
2014-03-21 2:13 ` Lucretia
2014-03-21 5:23 ` J-P. Rosen
2014-03-21 5:33 ` Lucretia
2014-03-21 6:43 ` J-P. Rosen
2014-03-21 22:51 ` Randy Brukardt
2014-03-22 1:13 ` Luke A. Guest
2014-03-22 6:27 ` Tero Koskinen
2014-03-22 7:02 ` J-P. Rosen
2014-03-24 20:50 ` Randy Brukardt
2014-03-24 22:42 ` Qun-Ying
2014-03-25 15:16 ` Tero Koskinen
2014-03-20 15:27 ` Robert A Duff
2014-03-20 21:06 ` Simon Wright [this message]
2014-03-21 16:07 ` Robert A Duff
2014-03-23 17:52 ` Simon Wright
2014-03-19 14:25 ` ANN: " Stephen Leake
2014-03-19 19:55 ` Shark8
2014-03-19 22:28 ` Randy Brukardt
2014-03-20 17:55 ` Shark8
2014-03-20 17:53 ` Dmitry A. Kazakov
2014-03-19 22:49 ` Brian Drummond
2014-03-20 10:21 ` Lucretia
2014-03-20 23:35 ` Stephen Leake
2014-03-21 8:17 ` Simon Wright
2014-03-23 21:14 ` erlo
2014-03-23 22:36 ` Simon Wright
2014-03-24 20:31 ` erlo
2014-03-19 21:04 ` Alan Browne
2014-03-19 22:22 ` Randy Brukardt
2014-03-20 20:30 ` Shark8
2014-03-21 2:18 ` Lucretia
2014-03-21 21:51 ` Shark8
2014-03-22 5:48 ` J-P. Rosen
2014-03-22 6:01 ` Jeffrey Carter
2014-03-24 21:03 ` Randy Brukardt
2014-03-22 9:14 ` Ludovic Brenta
2014-03-22 10:15 ` Pascal Obry
2014-03-22 10:25 ` Dirk Craeynest
2014-03-22 12:41 ` Niklas Holsti
2014-03-22 14:59 ` Dirk Craeynest
2014-03-22 16:20 ` Niklas Holsti
2014-03-22 17:05 ` Ludovic Brenta
2014-03-24 6:41 ` Shark8
2014-03-24 6:16 ` Luke A. Guest
2014-03-22 8:38 ` ANN: " Dmitry A. Kazakov
2014-03-22 19:28 ` Stephen Leake
2014-03-22 20:39 ` Shark8
2014-03-24 1:16 ` Stephen Leake
2014-03-24 6:40 ` Shark8
2014-03-25 20:04 ` Stephen Leake
2014-03-25 20:30 ` Dmitry A. Kazakov
2014-03-20 21:35 ` gautier_niouzes
2014-03-21 22:19 ` Shark8
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox