Xref: utzoo comp.lang.c:25794 comp.lang.pascal:3066 comp.lang.misc:4057 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!brutus.cs.uiuc.edu!jarthur!elroy.jpl.nasa.gov!cit-vax!hemphill From: hemphill@cit-vax.Caltech.Edu (Scott Hemphill) Newsgroups: comp.lang.c,comp.lang.pascal,comp.lang.misc Subject: Re: Pascal to C Conversion Summary: Good translator available at Caltech Keywords: translator, Pascal, C Message-ID: <13785@cit-vax.Caltech.Edu> Date: 8 Feb 90 16:33:48 GMT References: <52037@XAIT.Xerox.COM> <1990Feb2.172112.4509@cunixf.cc.columbia.edu> <3576@garth.UUCP> <4007@cbnewsl.ATT.COM> Reply-To: hemphill@cit-vax.UUCP (Scott Hemphill) Distribution: usa Organization: California Institute of Technology Lines: 27 In article <4007@cbnewsl.ATT.COM> feg@clyde.ATT.COM writes: > >Although any of the these Pascal-C translators can handle >most of the job, none of them can unravel Pascal's nested >functions. The translators leave that task to humans. This is not true. Here at Caltech, Dave Gillespie has written a truly wonderful Pascal to C translator. It is called p2c, and is available via anonymous ftp from csvax.caltech.edu. It is also in the queue to be posted to comp.sources.unix. It translates the following Pascal dialects: o HP Pascal o Turbo/UCSD Pascal o VAX Pascal o Oregon Software Pascal/2 o Macintosh Programmer's Workshop Pascal It also supports Modula-2 syntax. Output C code can be machine-independent, or can be targeted for a specific machine and compiler. It produces well- formatted (you can configure it for your own indentation style) human readable and maintainable C, using C idioms when possible. Every program I have translated has required no human intervention at all. It even passes a large part of a Pascal validation test suite. -- Scott Hemphill hemphill@csvax.caltech.edu ...!ames!elroy!cit-vax!hemphill