From: Simon Wright <simon@pushface.org>
Subject: GNAT ASIS & pragmas
Date: Fri, 08 Jun 2018 09:25:46 +0100
Date: 2018-06-08T09:25:46+01:00 [thread overview]
Message-ID: <lyh8md7khh.fsf@pushface.org> (raw)
In ASIS2XML[1] and gnat2xml, I see that the repreentation of pragmas
in GNAT ASIS doesn't follow the ARM syntax (2.8(2))[2],
pragma ::=
pragma identifier [(pragma_argument_association
{, pragma_argument_association})];
Instead, I see for example
ASIS2XML:
<restrictions_pragma>Restrictions
<pragma_argument_association>
<identifier>No_Exception_Propagation</identifier>
</pragma_argument_association></restrictions_pragma>
gnat2xml:
<restrictions_pragma pragma_name="Restrictions">
<sloc line="1" col="1" endline="1" endcol="47"/>
<pragma_argument_associations_ql>
<pragma_argument_association>
<sloc line="1" col="22" endline="1" endcol="45"/>
<formal_parameter_q>
<not_an_element>
<sloc line="1" col="1" endline="0" endcol="0"/>
</not_an_element>
</formal_parameter_q>
<actual_parameter_q>
<identifier ref_name="No_Exception_Propagation" ref="null" type="null">
<sloc line="1" col="22" endline="1" endcol="45"/>
</identifier>
</actual_parameter_q>
</pragma_argument_association>
</pragma_argument_associations_ql>
</restrictions_pragma>
(gosh!)
I'd like to change this (well, the one I have control over, ASIS2XML) to
something more natural and that corresponds better to the ARM, e.g.
<pragma kind='restrictions' name='Restrictions'>
<pragma_argument_association>
<identifier>No_Exception_Propagation</identifier>
</pragma_argument_association>
</pragma>
(the difference between kind & name being that name is as in the source,
whereas kind is lower-cased).
[1] https://sourceforge.net/projects/asis2xml
[2] http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-2-8.html#p2
next reply other threads:[~2018-06-08 8:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-08 8:25 Simon Wright [this message]
2018-06-08 14:58 ` GNAT ASIS & pragmas Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox