Menu

Tree [f9ebe6] master /
 History

HTTPS access


File Date Author Commit
 bin 2016-11-20 samiam95124 samiam95124 [e4162b] Initial commit.
 c_support 2016-11-20 samiam95124 samiam95124 [e4162b] Initial commit.
 doc 2018-02-11 samiam95124 samiam95124 [f9ebe6] Documentation fixups
 gpc 2018-02-11 samiam95124 samiam95124 [9cc821] 1. General cleanup of unused files, etc.
 ip_pascal 2018-02-11 samiam95124 samiam95124 [9cc821] 1. General cleanup of unused files, etc.
 sample_programs 2018-02-11 samiam95124 samiam95124 [9cc821] 1. General cleanup of unused files, etc.
 source 2016-11-20 samiam95124 samiam95124 [e4162b] Initial commit.
 INSTALL 2016-11-20 samiam95124 samiam95124 [e4162b] Initial commit.
 LICENSE 2016-11-20 samiam95124 samiam95124 [e4162b] Initial commit.
 Makefile 2018-02-11 samiam95124 samiam95124 [9cc821] 1. General cleanup of unused files, etc.
 NEWS 2016-11-20 samiam95124 samiam95124 [e4162b] Initial commit.
 README 2016-11-20 samiam95124 samiam95124 [e4162b] Initial commit.
 TODO 2016-11-20 samiam95124 samiam95124 [e4162b] Initial commit.
 configure 2016-11-20 samiam95124 samiam95124 [e4162b] Initial commit.
 configure.bat 2016-11-20 samiam95124 samiam95124 [e4162b] Initial commit.
 setpath 2018-02-11 samiam95124 samiam95124 [9cc821] 1. General cleanup of unused files, etc.
 setpath.bat 2016-11-20 samiam95124 samiam95124 [e4162b] Initial commit.

Read Me

                         THE PASCAL-P2 COMPILER/INTERPRETER

============================== Description =====================================

This is the 2nd version of the Pascal-P compiler from Zurich. It is mostly
identical to the compiler released from Zurich. I made minor changes in it
to allow it to compile under ISO 7185 Pascal, and to change the sizes of
internal tables to run programs.

This is the Pascal-p2 compiler modified to be ISO 7185 Pascal compliant,
both in the implementation language.

Pascal-P was an implementation kit, created between 1972 and 1974, for the
original language Pascal. The source for the original compiler was passed around
and modified quite a bit, but Niklaus Wirth noted that it was very popular, and
represented a good method to popularize the language. He gathered the source
into a clean version called Pascal-P2, which was the basis of UCSD Pascal, which
in turn was the base language for Borland Pascal. The Zurich group then created
an improved version called Pascal-p2.

============================== Quick start =====================================

Pascal-p2 uses the standard GNU release layout. You execute:

[Windows]

> setpath
> configure
> make

[linux]

> ./setpath
> ./configure
> make

(You can avoid "setpath" by placing the ./bin directory on your path)

This will make the compiler and interpreter set. You can then try a sample
program as:

> p2 sample_programs/hello

Note: Pascal-p2 has an issue where it tries to load the first character of the
input before the program runs. Because of this, it is usually necessary to
hit a carriage return to start the program.

================================== Problems ====================================

You need a working gpc implementation. It is strongly suggested you use the
gpc version 20070904. gpc has/had various compliance issues with ISO 7185, and
the compiler has ceased to be supported. This version is found to be solid.

You will need a working set of linux tooling (grep, ls, rm, etc). Mingw has
an excellent set of tools for Windows users.

You need the "flip" line ending adapation program. If you don't have it, we
include a copy you can compile, or you can simply go find it. It is a widely
available program.