Article View: comp.text.tex
Article #11293Re: Info on WEB?
From: Darryl Okahata
Date: Wed, 21 Feb 1990 22:31
Date: Wed, 21 Feb 1990 22:31
78 lines
3648 bytes
3648 bytes
In comp.text.tex, tml@hemuli.tik.vtt.fi (Tor Lillqvist) writes:
> (Actually web2c translates Pascal to C.) There is also a free
> Pascal-to-C translator which is better than the web2c system (which,
> after all, is a bit of a hack). The translator, ptc, was posted to
> the net some years ago. I have made some enhancements to it, and
> could make it available for ftp if there is interest. I have used it
> to compile TeX 2.93 et al. successfully (don't yet ask about 2.9993).
There is, in my opinion, an even better Pascal to C/C++ translator
available. At the end of this message, I've included a copy of a
posting from comp.archives that describes where/how to get it.
Note that I'm just a happy user; I have NO connection with the
author of this program other than as a user.
Not only does this translator produce human-readable code, it will
use *different* C code constructs depending on how many times an array
is referenced within a loop and on whether or not the procedure being
translated is a nested procedure. It is a very intelligent translator,
and actually spends quite a bit of time trying to reformat the
translated C code to a user-definable indentation specification; it can
actually make unreadable (i.e., poorly-formatted) Pascal code appear
readable.
Features:
1. It can handle more than one dialect of "Pascal" (note that Modula-2 is
in this list):
HP (default; Pascal Workstation version)
MODCAL (HP's advanced Pascal)
HP-UX (almost same as HP)
TURBO (vers 5.0 for IBM PC)
OREGON (Oregon Software Pascal-2 V2.1)
VAX (VAX/VMS Pascal)
MODULA (Modula-2)
UCSD (almost same as TURBO)
MPW (MPW Pascal 2.0 for the Mac)
2. It can translate to C (K&R or ANSI) or C++ code.
3. Target machines can be: HPUX-300, SUN-68K, BSD-VAX, BSD, or SYSV
-- Darryl Okahata
UUCP: {hplabs!, hpcea!, hpfcla!} hpnmd!darrylo
Internet: darrylo%hpnmd@hpcea.HP.COM
DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion or policy of Hewlett-Packard or of the
little green men that have been following him all day.
-------------------------------------------------------------------------------
From: reid@cpswh.cps.msu.edu (Dr Richard J. Reid)
Date: Sat, 13 Jan 1990 02:26:57 GMT
Subject: [comp.lang.c] Summary: Pascal_to_C Translator
Newsgroups: comp.archives
Archive-name: p2c/how-to-get
Original-posting-by: reid@cpswh.cps.msu.edu (Dr Richard J. Reid)
Original-subject: Summary: Pascal_to_C Translator
Archive-site: csvax.caltech.edu [192.12.18.1]
Reposted-by: emv@math.lsa.umich.edu (Edward Vielmetti)
Thanks to those who have responded. The translator is
available from the ftp source: csvax.caltech.edu
as p2c.
It was written by Dave Gillespie and has provisions
for recognizing several dialects of Pascal. The translator
also accepts a Modula-2 flag for that source.
There was one inquiry about the AT&T FORTRAN_2_C but
I can't find my references about that. I know I
saw it posted here somewhere within the last few weeks.
Any help?
Dick
Technical Details
Message-ID:
<9340001@hpnmdla.HP.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!uw-beaver!Teknowledge.COM!unix!hplabs!hpl-opus!hpnmdla!darryloReferences:
<20574@netnews.upenn.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!uw-beaver!Teknowledge.COM!unix!hplabs!hpl-opus!hpnmdla!darrylo From: darrylo@hpnmdla.HP.COM (Darryl Okahata) Newsgroups: comp.text.tex Subject: Re: Info on WEB? Message-ID: <9340001@hpnmdla.HP.COM> Date: 21 Feb 90 22:31:24 GMT References: <20574@netnews.upenn.edu> Organization: HP Network Measurements Div, Santa Rosa, CA Lines: 78