Skip to content

k-john-gough/gpcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gardens Point Component Pascal (GPCP)

Getting Started

Project Description

Gardens Point Component Pascal is an implementation of the Component Pascal Language (CP). There are implementations for both the CLR and the JVM.

Component Pascal is an object oriented language in the Pascal family. Its closest relatives are Oberon-2 and Oberon.

Gardens Point Component Pascal (gpcp) is an implementation of the language which was created for both the .NET and JVM. Both versions are here.

gpcp for .NET was one of the language implementations created for the .NET platform as part of Microsoft's "Project-7" which demonstrated the cross-language capability of .NET. The first release of the language was in mid-2000, at the Professional Developer's Conference, where .NET was announced. The language was also used as the running example in the book "Compiling for the .NET Common Language Runtime" (Prentice-Hall 2002).

gpcp provides a number of extensions to the standard Component Pascal language. These extensions are provided to allow programs to access the rich capabilities of the base class libraries of the .NET system. Thus types defined in gpcp programs are able to declare that they implement interfaces, or provide methods that override protected methods defined in other languages. Although Component Pascal does not allow the definition of overloaded methods, overloaded methods may be called from Component Pascal code. All such language extensions may be turned off by a command line option.

As well as the compiler, the distribution contains a number of other utilities

  • The program CPMake which performs a minimal consistent compilation of a set of Component Pascal modules, respecting the module dependencies explicitly declared in the source files.
  • The program PeToCps (for the .NET version) which creates a gpcp symbol file from a nominated "foreign language" PE file. Such symbol files are used by gpcp to perform type-safe separate compilation of Component Pascal modules that import foreign language libraries.
  • The program J2CPS (for the JVM version) which creates gpcp symbol files from a nominated java package. Such symbol files are used by gpcp to perform type-safe separate compilation of Component Pascal modules that import foreign language libraries.
  • The program Browse produces a readable, hyperlinked representation of gpcp symbol files.
  • The program MakeIndex which creates an index for all the html files created by Browse in a directory.

Special Note

Almost all of the sources of the gpcp tools are written in Component Pascal. It is not possible to use gpcp until you have executable code of the tools. And you cannot build the executables from this source repository unless you already have a Component Pascal compiler. Most users should start by downloading a recent release distribution from the link above. The releases have documentation, usage information and example programs.