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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ea40456edaea3d23 X-Google-Attributes: gid103376,public From: "wiljan" Subject: Re: Pascal to Ada translator/ aflex,ayacc GNAT ports Date: 1996/11/29 Message-ID: <01bbde30$7a63d4e0$11208b82@wd>#1/1 X-Deja-AN: 201470580 references: <57htn2$jm8@cnn.Princeton.EDU> <57i8af$p8m@felix.seas.gwu.edu> <57j17b$6pt@news.pacifier.com> organization: Philips Electronics N.V. newsgroups: comp.lang.ada Date: 1996-11-29T00:00:00+00:00 List-Id: Robert Dewar wrote in article ... > Yes, this is the obvious appropraite translation in this case, however, I > would say that the general goal of making the translated code look as much > like the original Pascal as possible is quite wrong, and illustrates what > is wrong with these translators. If you want Pascal-in-Ada what's the point, > you might as well write in Pascal. The only point in translating from Pascal > to Ada is to take advantage of the greater expressive power (e.g. generics) > available in Ada. I do not agree that this is the obvious translation. It depends on how the code is original written. In many cases you can of cause give an abvious translation to Ada but it depends from case to case. I think that such a translation process is of same difficulty for a computer as translating natural languages. The goal for my pascal to Ada translator was: * Have the Ada code close the original Pascal code. * Do not add to many constructs that gets you lost in the generated code. * Try to generate directly compilable Ada code, thus generate working Ada code from working pascal code. I things these goals where very well reached. That means for MY code. Anyway the translator certainly gave me a BIG advantage over rewriting all the code. In relative short time I had my code working again in Ada. AND what is very important to me: WITH the same bugs -> no Bugs where added. Note that my translator is different from the program mentioned in the original post. It is a real compiler that first reads all the pascal modules. It then analyses them and rearanges things to get reasonable Ada. For those interested the translator was written for EPASCAL, a pascal+++ dialect from digital used in the VAXELN toolkit. I know Steve has been very busy with it. I think he also found it a valuable tool. Any remarks Steve ?? Wiljan