Topic: ADA to C/C++ Converter
Author: kvilekva@nic.cerf.net (Kristian Kvilekval)
Date: 11 Jun 1994 03:58:28 GMT Raw View
mark@vsfl.demon.co.uk (Mark Statham) writes:
>Does anyone out there know of any Ada to C/C++ translators? if any such ones exist, has anyone else out there ever been tempted down the path of moving from Ada to C/C++. I would be interested to hear your comments on this emmotive subject.
Something of the sort was built by retargeting a SubAda->Pascal to SubAda->C.
I did this in order to bootstrap the DDC Ada-83 compiler (written in SubAda).
>Specific things that I would like your comments on are:
> How well does it handle variables in nested functions?
Variable from the global scope are passed in as pointer to a structure
that describe the stack frame.
i.e.
procedure F is
X : integer;
Y : real;
procedure in_f is
begin
y := x;
end;
begin
in_f;
end;
void in_f (struct { int x; float y; } *__globs)
{
__globs->y = __globs->x;
}
F ()
{
struct {
int x;
float y;
} __lvars;
in_f (&__lvars);
}
> How well does it handle exceptions?
setjmp and longjmp were used. The preprocess assigned a 16bit module
number and a 16 bit exception number which could be tested for.
> How well does it handle generics?
Didn;t have it. Sorry.
> What (if any) has to be done manually?
Some code had to be modified to use the subset of Ada that was defined.
>I dont' mind whether or not its commercial or PD just really want comments in the first instance.
I'm not sure if it's available still. I you want to take a look I'll
send you the name of the company that has the rights.
I Also have the beginnings of one that I wrote from scratch to handle
full Ada. Unfortunately I got distracted and never completed it.
Kris
Kris@savantics.com
Author: mark@vsfl.demon.co.uk (Mark Statham)
Date: Wed, 8 Jun 1994 10:23:08 +0000 Raw View
Hi Netters,
Does anyone out there know of any Ada to C/C++ translators? if any such ones exist, has anyone else out there ever been tempted down the path of moving from Ada to C/C++. I would be interested to hear your comments on this emmotive subject.
Specific things that I would like your comments on are:
How well does it handle variables in nested functions?
How well does it handle exceptions?
How well does it handle generics?
What (if any) has to be done manually?
I dont' mind whether or not its commercial or PD just really want comments in the first instance.
Looking forward to hearing from you all, either follow-up or mail
Mark
--
===============================================================================
Mark Jonathan Statham mark@vsfl.demon.co.uk (WORK)
Underpaid/Overworked Placement Student statham@bmth.ac.uk (UNI)
National & Provincial Building Society "Anybody got an asbestios shield"