From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,INVALID_MSGID, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,cb4ace8692938ec3 X-Google-Attributes: gid103376,public From: thomas@cuivre.fr.eu.org (Thomas Quinot) Subject: Re: Ada95 compiler using Ada83 as back-end Date: 2000/04/03 Message-ID: <8catii$u14$1@melusine.cuivre.fr.eu.org>#1/1 X-Deja-AN: 606963293 References: <38E0D3DB.6DC99DA6@maths.unine.ch> X-Trace: melusine.cuivre.fr.eu.org 954792338 30757 127.0.0.1 (3 Apr 2000 20:05:38 GMT) Organization: Cuivre, Argent, Or : un Alliage M�tallique Indestructible Newsgroups: comp.lang.ada Date: 2000-04-03T00:00:00+00:00 List-Id: 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