comp.lang.ada
 help / color / mirror / Atom feed
* Ada95 compiler using Ada83 as back-end
@ 2000-03-28  0:00 Gautier
  2000-04-03  0:00 ` Thomas Quinot
  0 siblings, 1 reply; 2+ messages in thread
From: Gautier @ 2000-03-28  0:00 UTC (permalink / raw)


... does it exist ?

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.

Just curious...

[Some people (at least 1 in c.l.a.) will ask: but why would
you want to look for such a beast ? My answer: there are
very good Ada 83 compilers, that may have been replaced by
other Ada 95 compilers not based on their predecessors, maybe
not as efficient on some points - e.g. optimised numerics,
arrays etc. It would be useful to compare evolution of some
features and maybe help tuning new Ada 95 compiler versions.
Of course one can compile Ada 83 programs
on both 83 and 95 compilers, first. But it could be interesting
to compile Ada 95 with these old compilers for special needs]

______________________________________________________
Gautier  --  http://members.xoom.com/gdemont/gsoft.htm




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Ada95 compiler using Ada83 as back-end
  2000-03-28  0:00 Ada95 compiler using Ada83 as back-end Gautier
@ 2000-04-03  0:00 ` Thomas Quinot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Quinot @ 2000-04-03  0:00 UTC (permalink / raw)


[-- 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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-04-03  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-28  0:00 Ada95 compiler using Ada83 as back-end Gautier
2000-04-03  0:00 ` Thomas Quinot

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