File: README

package info (click to toggle)
p2c 1.21alpha2-1
  • links: PTS
  • area: main
  • in suites: potato, woody
  • size: 1,996 kB
  • ctags: 3,399
  • sloc: ansic: 38,617; pascal: 2,499; makefile: 213; perl: 101
file content (48 lines) | stat: -rw-r--r-- 1,508 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

This directory contains examples for "p2c", a Pascal to C translator.

"p2c"  Copyright 1989, 1990, 1991, 1992, 1993  Free Software Foundation, Inc.

Written and maintained by:   Dave Gillespie
			     c/o Synaptics, Inc.
			     2698 Orchard Parkway
			     San Jose CA 95134
			     daveg@synaptics.com, uunet!synaptx!daveg




Here are some sample programs you can run through p2c.  The Makefile
for this directory knows how to translate and compile all programs.
The "c" subdirectory contains pre-translated files you can compare
with your p2c output.  (The "c" subdirectory is present in the ftp
distribution only, not in the shar distribution.)

To translate only:          make trans   or just   make
To translate and compile:   make comp

These programs have been culled from various places around the Caltech
C.S. educational lab.  All programs are by Dave Gillespie except as
noted, and are in the HP Pascal dialect.


fact.p   	The obligatory recursive factorial program.  Try this
		one first: "make fact.c" to translate, or "make fact"
		to translate and compile.


e.p   		Program for computing "e" to high precision.
		(Courtesy of Scott Hemphill.)


self.p   	A self-printing program in Pascal.  Try translating,
		running, and diff'ing the output with self.p.


cref.p   	A cross-referencer for Pascal programs.  Enter source
		file name(s), then a blank line, then output file name.


basic.p   	An interpreter for the Basic language, just for kicks!
		See "basic.doc" for documentation.