README
上传用户:upcnvip
上传日期:2007-01-06
资源大小:474k
文件大小:1k
源码类别:

编译器/解释器

开发平台:

C/C++

  1. This directory contains examples for "p2c", a Pascal to C translator.
  2. "p2c"  Copyright 1989  Dave Gillespie
  3.                        256-80 Caltech
  4.                        Pasadena CA 91125
  5.                        daveg@csvax.caltech.edu, cit-vax!daveg
  6. Here are some sample programs you can run through p2c.  The Makefile
  7. for this directory knows how to translate and compile all programs.
  8. The "c" subdirectory contains pre-translated files you can compare
  9. with your p2c output.  (The "c" subdirectory is present in the ftp
  10. distribution only, not in the shar distribution.)
  11. To translate only:          make trans   or just   make
  12. To translate and compile:   make comp
  13. These programs have been culled from various places around the Caltech
  14. C.S. educational lab.  All programs are by Dave Gillespie except as
  15. noted, and are in the HP Pascal dialect.
  16. fact.p    The obligatory recursive factorial program.  Try this
  17. one first: "make fact.c" to translate, or "make fact"
  18. to translate and compile.
  19. e.p    Program for computing "e" to high precision.
  20. (Courtesy of Scott Hemphill.)
  21. self.p    A self-printing program in Pascal.  Try translating,
  22. running, and diff'ing the output with self.p.
  23. cref.p    A cross-referencer for Pascal programs.  Enter source
  24. file name(s), then a blank line, then output file name.
  25. basic.p    An interpreter for the Basic language, just for kicks!
  26. See "basic.doc" for documentation.