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.3 required=5.0 tests=BAYES_00,FORGED_YAHOO_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5f6125e9594f9968 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.219.170 with SMTP id pp10mr5568634pbc.1.1339343007438; Sun, 10 Jun 2012 08:43:27 -0700 (PDT) Path: l9ni37850pbj.0!nntp.google.com!news2.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Marco Newsgroups: comp.lang.ada Subject: Re: Ada to C translator for small microcontrollers Date: Sun, 10 Jun 2012 08:41:38 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <2424259e-cf1c-408e-a57e-f2c948087186@i2g2000vbv.googlegroups.com> <4fba349b$0$6560$9b4e6d93@newsspool4.arcor-online.net> <7ad13453-fea5-4b3a-9a93-306302f073da@googlegroups.com> NNTP-Posting-Host: 67.1.138.111 Mime-Version: 1.0 X-Trace: posting.google.com 1339343007 10040 127.0.0.1 (10 Jun 2012 15:43:27 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 10 Jun 2012 15:43:27 +0000 (UTC) In-Reply-To: <7ad13453-fea5-4b3a-9a93-306302f073da@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=67.1.138.111; posting-account=WITAxQkAAAAHjnLda9Lofpqp8mERTWL4 User-Agent: G2/1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-06-10T08:41:38-07:00 List-Id: On Tuesday, June 5, 2012 2:18:11 AM UTC-7, kalvi...@gmail.com wrote: > lauantai, 2. kes=E4kuuta 2012 18.27.06 UTC+3 Marco kirjoitti: > > On Monday, May 21, 2012 5:27:07 AM UTC-7, Georg Bauhaus wrote: > > > On 21.05.12 12:35, kalvin wrote: > >=20 > > > Eiffel also generates C; there is a GPL edition of > > > the compiler. Don't know whether it is suitable > > > for =B5Controllers, though. > >=20 > > SmartEiffel > > http://en.wikipedia.org/wiki/SmartEiffel > > http://smarteiffel.loria.fr/ > >=20 > > Could be used for ideas on creating a subset Ada to C "compiler". >=20 > Good pointer, thanks! >=20 > Actually, there have been quite a few good suggestions on how to create a= n translator. >=20 > As Niklas Holsti suggested sometime above, the translation from GNAT IR t= o C might be the easiest way. I thought about this, and as there exists a G= NAT Ada Pretty Printer, and if I have understood it correctly, it uses GNAT= IR for recreating the source code. This might be the easiest way to create= the translator, as rewriting the source code formatting rules to produce C= source instead. Any comments on this possible approach? >=20 Create a small Ada program with some short procedures and functions (skip= tasks and IO) and try to "hack up" the GNAT Ada Pretty Printer to output e= quivalent C to see if this is a viable option forward. At the very least yo= u will learn more about GNAT.