comp.lang.ada
 help / color / mirror / Atom feed
From: Marco <prenom_nomus@yahoo.com>
Subject: Re: Ada to C translator for small microcontrollers
Date: Sun, 10 Jun 2012 08:41:38 -0700 (PDT)
Date: 2012-06-10T08:41:38-07:00	[thread overview]
Message-ID: <ff298580-c3db-4373-b1ff-b032039373b7@googlegroups.com> (raw)
In-Reply-To: <7ad13453-fea5-4b3a-9a93-306302f073da@googlegroups.com>

On Tuesday, June 5, 2012 2:18:11 AM UTC-7, kalvi...@gmail.com wrote:
> lauantai, 2. kesäkuuta 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:
> > 
> > > Eiffel also generates C; there is a GPL edition of
> > > the compiler. Don't know whether it is suitable
> > > for µControllers, though.
> > 
> > SmartEiffel
> > http://en.wikipedia.org/wiki/SmartEiffel
> > http://smarteiffel.loria.fr/
> > 
> > Could be used for ideas on creating a subset Ada to C "compiler".
> 
> Good pointer, thanks!
> 
> Actually, there have been quite a few good suggestions on how to create an translator.
> 
> As Niklas Holsti suggested sometime above, the translation from GNAT IR to C might be the easiest way. I thought about this, and as there exists a GNAT 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?
> 

  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 equivalent C to see if this is a viable option forward. At the very least you will learn more about GNAT.




      parent reply	other threads:[~2012-06-10 15:43 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26 12:48 Ada to C translator for small microcontrollers Tomi Saarnio
2012-03-26 13:44 ` Rego, P.
2012-03-26 14:14 ` Niklas Holsti
2012-03-26 15:48   ` Ludovic Brenta
2012-03-26 16:20     ` Simon Wright
2012-03-26 14:46 ` georg bauhaus
2012-03-26 19:16 ` anon
2012-03-27  9:46 ` kalvin.news
2012-03-27 17:22   ` anon
2012-03-27 20:13     ` kalvin.news
2012-03-28 14:29       ` KK6GM
2012-03-28 16:36       ` Niklas Holsti
2012-03-28 17:56         ` KK6GM
2012-03-28 21:03         ` Georg Bauhaus
2012-03-30 11:54           ` phil.clayton
2012-03-31 15:46         ` kalvin.news
2012-03-31 19:52           ` Rugxulo
2012-04-01 11:23             ` kalvin.news
2012-04-02 21:46             ` Niklas Holsti
2012-04-03  5:56               ` J-P. Rosen
2012-04-03  2:08 ` BrianG
2012-04-03  9:29   ` Georg Bauhaus
2012-05-21 10:35 ` kalvin.news
2012-05-21 12:27   ` Georg Bauhaus
2012-06-02 15:27     ` Marco
2012-06-05  9:18       ` kalvin.news
2012-06-05 12:17         ` Brian Drummond
2012-06-06  5:21           ` J-P. Rosen
2012-06-06 11:50             ` Brian Drummond
2012-06-10 15:41         ` Marco [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