comp.lang.ada
 help / color / mirror / Atom feed
From: Craig Carey <research@ijs.co.nz>
Subject: Re: C to Ada for windows?
Date: Fri, 29 Nov 2002 19:04:07 +1300
Date: 2002-11-29T19:04:07+13:00	[thread overview]
Message-ID: <0quduukhdts9fbnqccfaiudhflautjocbf@4ax.com> (raw)
In-Reply-To: 2ecf22d9290d3669ff87b7c85342e5f5.110780@mygate.mailgate.org

On Mon, 25 Nov 2002 11:18:12 +0000 (UTC), "Sim Con" <sicon@hotmail.com>
wrote to comp.lang.ada:

>Hello! Is there a program that converts C to Ada for [the] Windows OS?.
>Thanks in advance!.

Sure there could be a C to Ada parser.

ASF+SDF seems to be a best/quality choice for implementing a C to Ada 95
parser. It can even separate out "xy" as "x * y" and implement the mixfix
notation. After the abject failure of the DoD (AJPO??) funded JGNAT
project I became sure that a parser would port all languages to Ada 95.

Here is the ASF+SDF reference manual:

http://www.cwi.nl/projects/MetaEnv/meta/doc/manual/user-manual.html

Some interesting parts are:

(*) section 9.14 ("Equations"). Equations can specify the output when the
 parser is rewriting a program.

(*) section 10.3 ("Code Generation"). There is an example in that section
 implying that ASF+SDF can transform programs. It can also rewrite yacc
 rules into ASF+SDF format.

The software installs easily and it compiles in Cygwin, and
an investigation could be held by the absence of information on what
MS-DOS (etc.) command causes the Assembly language example to run
correctly.

Adagide has a prettifier. (They have a generic program prettifier named).

Eiffel to Ada is a parser that could be nice following those blowhard
arguments saying that there had to be two types of assertion pragma,
one for the top and a quite different assert pragma at the bottom of
procedures. For those that don't like their Ada 95 compiler, could later
preprocess their *.ada files and strip off all the language extensions
that the ARG members would not vote for.



Craig Carey
Ada 95 mailing lists: htp://www.ijs.co.nz/ada_95.htm





  parent reply	other threads:[~2002-11-29  6:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-25 11:18 C to Ada for windows? Sim Con
2002-11-25 15:10 ` Ira Baxter
2002-11-27 19:07 ` Jorg van Daelen
2002-11-29  6:04 ` Craig Carey [this message]
2002-11-29 11:23 ` Dmitriy Anisimkov
replies disabled

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