Menu

Home

Scott Franco

Pascal-P6 Open source/Public domain project

Please forgive the state of this project, it is under development

Hi and welcome to the project. This is the GIT public depository for Pascal-P6.

Pascal-P was a series of compilers starting at Zurich. The last of the series from Zurich was the Pascal-P4 compiler, which is available at:

http://www.standardpascal.org/p4.html

It compiles and runs a subset of the Revised Pascal language. That subset was designed to be the minimum language required to self compile for a new machine implementation. It was part of a "bootstrapping" kit designed to facilitate porting Pascal to new machines.

Pascal-P5 is the next increment beyond Pascal-P4, and is extended to include all of the ISO 7185 Pascal language, as well as incorporate a series of ISO 7185 Pascal test services. It also includes the ability to self compile "out of the box", that is, it can compile and interpret itself as is (with only a few one line changes), something the original Pascal-P could not do. It is also a full language compiler, not a subset.

Pascal-P6 is the next step beyond Pascal-P5. P6 is the place for all of the things that didn't really belong in P5:

  • To also compile to a target machine, the 80386 (and perhaps other machines), as well as interpret.
  • To support language extensions.

Language of P6

P6 implements a language based on IOS 7185 called "Pascaline", named after the calculating machine Blaise Pascal was famous for inventing.

http://www.standardpascal.com/pascaline.htm
http://www.standardpascal.com/pascaline.pdf
http://www.standardpascal.com/pascaline.docx

Most extended Pascals are based on ad-hoc additions to the language. I wanted to create a new language that was not just a shopping cart of features, and so I put a lot of work into coming up with a language that fit together as a whole, and still maintained the style of Pascal.

Whats the difference between Pascaline and other extended Pascals?

When Pascal debuted in the 1970s, it was extended by several variants of the language to look like Basic (UCSD and Borland), and then in the 1980s and beyond extended to look like C, while retaining Basic string handling (Borland). This language family is well represented by Borland products and the great FPC or "Free Pascal" project today.

What Pascaline does is extend the array handling to cover dynamically created arrays (including of char), and create a type system based on classes (objects). At the same time Pascaline heavily covers modularity and especially multitasking/parallel tasking.

The basis for Pascaline is type safety/security (what has been derided as "Pascal as a B and D language" or "Bondage and Disclipline" language. However, type safety and security made a comeback with languages such as Java, C# (designed by the same author as Borland Pascal) and others. Thus, Pascaline is a type secure language that was always so, back through ISO 7185 Pascal.

Brief history of Pascaline

in 1980, I created a Z80 compiler (with no specific name). It was ISO 7185 compliant, and added a series of file handling functions like assign, close, etc., and also modularity along the lines of C. Procedures and functions used the "external" word-symbol, and Pascal components such as procedures, functions, variables, etc., could be put into separately compiled files. This compiler was written in Z80 assembly language.

In 1987, I started a second implementation on 80386 processors, entirely re-written in Pascal using the SVS 32 bit compiler (now defunct). This had the file handling of the old compiler, a new system of modular components, and variable length arrays. In 1993, that became operational. This was IP Pascal.

In 2003, I created a new specification that used the existing language of IP Pascal and greatly extended it. This was implemented on IP Pascal, and became the basis of the Pascaline specification.

Implementation language of P6

P6 is implemented in ISO 7185 Pascal. How is that possible? Actually most of the mechanics of a lanuguage, the storage allocation, the data manipulation, have little to do with the implementation language. Its a long tradition to write a new, extended version of an old language using the old implementation. Pascal itself was extended in this way.

The main issue with using an ISO 7185 compiler to create an extended compiler are the system calls, which typically center around the file management system. Its a basic operating system interface, and it can't be coded around. P6 handles that by using a series of "escape" routines for things like open file by name, seek in file, etc. In ISO 7185 mode, these are stub routines that just generate errors. However, in a non-ISO 7185 environment, they are filled out with the operations in terms of the host compiler. With A Pascaline compiler, they are filled out with Pascaline file operators.

What the repository contains

This repository contains the working set of files for the Pascal-P6 project. It contains all files, including source for the compiler, scripts to build, run and test it, and a full set of tests.

See the file "the_p6_compiler" in several document formats for all information on the project.

Releases

The procedure to distribute P6 is to zip up a "release" with a new version number. This will exist in the "files" tab/directory here on Sourceforge, as soon as we get a release worthy version (my decision). In the meantime, you can get a fileset from the code tree. Getting your code directly from GIT is essentially Alpha testing.

Goals of the project

  1. Upgrade Pascal-P5, an ISO 7185 standard compiler, to fully implement Pascaline, an extended Pascal language.
  2. Be a model of the implementation of a Pascaline compiler.
  3. Have as few differences between Pascal-P6 and Pascal-P5 as possible.

Mirror

This project is mirrored here:

https://github.com/samiam95124/Pascal-P6

Project Members: