comp.lang.ada
 help / color / mirror / Atom feed
From: thomas@cuivre.fr.eu.org (Thomas Quinot)
Subject: Re: Ada95 compiler using Ada83 as back-end
Date: 2000/04/03
Date: 2000-04-03T00:00:00+00:00	[thread overview]
Message-ID: <8catii$u14$1@melusine.cuivre.fr.eu.org> (raw)
In-Reply-To: 38E0D3DB.6DC99DA6@maths.unine.ch

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 981 bytes --]

Dans comp.lang.ada, Gautier  �crit :

>What I mean: a program that translates Ada 95 code into
>"intermediate" Ada 83 code, referencing some packages
>like Interfaces, implementation of streams etc., eventually
>system-dependant.

You may want to have a look at GNAT's expansion mechanism:
GNAT first parses an Ada 95 compilation unit into an abstract
tree whose structure is close to that of the grammar as
specified by the RM, then rewrites parts of that tree to remove
all "complicated" constructs such as tagged types and tasking.
The resulting expanded tree is then handed to the code generation
machinry.

The expanded tree does not always correspond to valid Ada constructions,
but it is probably closer to Ada 83 than the original Ada 95 tree.
Depending on your precise needs, this might be an appropriate starting
point.

You can obtain an Ada-like rendition of the expanded tree using
the -gnatD command line switch.

Thomas.

-- 
    Thomas.Quinot@Cuivre.FR.EU.ORG




      reply	other threads:[~2000-04-03  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-28  0:00 Ada95 compiler using Ada83 as back-end Gautier
2000-04-03  0:00 ` Thomas Quinot [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox