[comp.archives] [wanted...] Re: WANTED: Pascal to C translator

tml@tik.vtt.fi (Tor Lillqvist) (03/06/91)

Archive-name: languages/pascal/ptc/1991-03-04
Archive-directory: tik.vtt.fi:/pub/ptc/ [130.188.52.2]
Original-posting-by: tml@tik.vtt.fi (Tor Lillqvist)
Original-subject: Re: WANTED: Pascal to C translator
Reposted-by: emv@ox.com (Edward Vielmetti)

In article <1991Mar1.124857.28326@fwi.uva.nl> smagt@fwi.uva.nl (Patrick van der Smagt) writes:
   I'm looking for a program that can translate Pascal to C source code,
   pref. running under UNIX (sun4).  Any help would be very much
   appreciated.

There are two Pascal-to-C translators freely available that I know of.

One is called ptc, was written by Per Bergsten, and posted back in
1987, probably to what was called mod.sources then (?).  I have a
somewhat enhanced version available for ftp here, in
tik.vtt.fi:pub/ptc.  You might find the originally posted version,
plus a set of patches, from your favorite archive site.  Ptc handles
standard Pascal, with some small extensions.

Then there is p2c by Dave Gillepsie, posted to comp.sources.unix last
year (Volume 21, Issues 46--77 (yes, 32 parts)).  It has more features, for
example handles HP Pascal extensions (probably of no use to you).  P2c
should be available at various archive sites.

I have used ptc successfully to compile TeX, and can recommend it.
P2c also seems to be well written and tested, but I haven't used it.
--
Tor Lillqvist,
working, but not speaking, for the Technical Research Centre of Finland

daveg@near.cs.caltech.edu (Dave Gillespie) (03/07/91)

Archive-name: languages/pascal/p2c/1991-03-06
Archive: csvax.cs.caltech.edu:/pub/p2c-1.19.tar.Z [131.215.131.131]
Original-posting-by: daveg@near.cs.caltech.edu (Dave Gillespie)
Original-subject: Re: WANTED: Pascal to C translator
Reposted-by: emv@ox.com (Edward Vielmetti)

You can get p2c, my Pascal to C translator, from anonymous FTP on
csvax.cs.caltech.edu.  Or, you can get it from any comp.sources.unix
archive.  It can read many popular Pascal dialects including Sun Pascal,
Turbo Pascal, VAX Pascal, etc., and can generate ANSI or traditional C
code.  It also does a good job of formatting the output to be readable.

Patches for version 1.19 of p2c were just posted to comp.sources.unix.

                                                                -- Dave
--
Dave Gillespie
  256-80 Caltech Pasadena CA USA 91125
  daveg@csvax.cs.caltech.edu, ...!cit-vax!daveg

hleroy@irisa.fr (Hugues Leroy) (03/07/91)

Archive-name: languages/pascal/ptc/1991-03-06
Archive-directory: irisa.irisa.fr:/pub/pascal-to-c/ [131.254.2.3]
Original-posting-by: hleroy@irisa.fr (Hugues Leroy)
Original-subject: Re: WANTED: Pascal to C translator
Reposted-by: emv@ox.com (Edward Vielmetti)

try anonymous ftp from irisa.irisa.fr 
directory: ~ftp/pub/pascal-to-c

makefile.Z , ptc.p.Z, ptc.1.Z

======
source:

Copyright (C) 1987 by Per Bergsten, Gothenburg, Sweden
......
Several bugs were fixed by Claude Jard, Irisa Rennes, France 1988
======