p2c -- a Pascal to C translator

p2c converts the computer language Pascal to C which you can then compile with cc or gcc.

The p2c program was written by Dave Gillespie. A copy of his original home page is Dave Gillespie Home Page. It has some useful information about the translator but the links are now broken.


2015 Oct 05. The original package p2c-1.21alpha2.tar.Z provided above gives compile errors on Mac OS X 10.10.5. These appear to come from more restrictive name conventions in the gcc compiler.

To correct the errors, make two name changes in these files:
TAGS
p2c.hdrs
comment.c
out.c
lex.c
parse.c
trans.c

rename: logf to logfile
rename: getline to getaline

add: -DTEST_MALLOC to src/Makefile on the DEFS line

CORRECTED p2c Compiler:
p2c-2.01.tar.gz


Additional Links:

color bar Small icon for Theory of Molecular Machines: physics,
chemistry, biology, molecular biology, evolutionary theory,
genetic engineering, sequence logos, information theory,
electrical engineering, thermodynamics, statistical
mechanics, hypersphere packing, gumball machines, Maxwell's
Daemon, limits of computers


Schneider Lab

origin:    2013 Feb 23
updated: 2015 Nov 18

color bar


U.S. Department of Health and Human Services  |  National Institutes of Health  |  National Cancer Institute  |  USA.gov  | 
Policies  |  Viewing Files  |  Accessibility  |  FOIA