COBOL For GCC, a GNU Project

COBOL for GCC is a project to create a COBOL 85 compliant compiler for GNU/Linux and other operating systems, using the GCC (GNU Compiler Collection) code generation framework . Also included within the source code are two sample compiler front ends to GCC (exa and toy).

Project Links

History

Work commenced March 1999. To date we have written about 58,000 lines of code and 12,000 lines of documentation for the project. The compiler is not yet at the stage where it is a useful tool. However all the difficult technical problems are solved and adding extra function is now relatively easy.

At the moment the objective is to get a subset of COBOL implemented which will allow much of the rest of the compiler and runtime routines to be written in this subset of COBOL - rather than in C. So COBOL programmers will be able to help with the project.

Status - completed work

Documentation

COBOL for GCC manual.

The manual includes the chapter Writing a Compiler Front End, written originally by Joachim Nadler and translated from German and extended by me. This chapter explains how to write a compiler front end to GCC in 513 not-so-easy steps.

COBOL for GCC Manual - includes chapter on writing a GCC Front End

The Source forge project page has the task lists, bugs etc.

Source Code

File modules are available to download from SourceForge Project Main Page for this project

An easy way to look at the source code is to browse the CVS repository. A link to this is available from the main project links page above or directly at Source Code (cvs) Browsing

You can also check out (download) the source code anonymously using cvs, which is available for Unix and for Windows. Use the following commands:

cd directory_to_put_source (preferably with nothing else in it)
cvs -d:pserver:anonymous@cvs.CobolForGCC.sourceforge.net:/cvsroot/CobolForGCC login
cvs -d:pserver:anonymous@cvs.CobolForGCC.sourceforge.net:/cvsroot/CobolForGCC co .

The password is nothing ie just hit return when it asks for the password. Don't forget the "." as the checkout directory ID at the end.

Subsequently you can refresh the source with
cd directory_to_put_source
cvs update

A daily tar file of the project is also available at Source Code tarball (use tar -xzf to unpack; most recent zip programs should be able to unpack them also)

Other Free COBOL projects and other related Links.

Old gcc sample front end compilers toy and exa. Use with care due due to copyright issues (not all assigned to FSF).

The Tiny COBOL project is currently quite active. It started mid 1999 using a pre-existing DOS COBOL compiler as a base. They are generating X86 assembler for GNU/Linux. They have considerable functionality and several developers. They are not taking a very strict approach to adherence to the COBOL standard.

Tiny COBOL project

Cobcy is currently inactive. The function is fairly limited.

Alberto Santini's COBOL Compiler COBCY

The COBOL2C Project is currently inactive. They did two versions of COBOL compilers, both with limited function.



GCC Central has the GCC code, documentation including the full manual excluding my amendments above, mailing lists etc.

GCC Central

COBOL Links

COBOL 2002 Standards Activities

Free Compiler Links - the Free Country.com


Take the link below to get to the mailing lists, files, cvs access etc for the COBOL For GCC project
Cobol For GCC project work page at SourceForge

Take the link below to register with SourceForge or to search for projects.
Source Forge

VA Linux - sponsors of SourceForge.

Project coordinator's personal home page:

Tim Josling's Home Page

Changes

  1. 20 Mar 2001: Updates to accommodate move of the main project page to www.gnu.org. Status update.
  2. 20 Jan 2001: Free Country Link
  3. 24 Dec 2000: COBOLforGCC status update
  4. 23 Sep 2000: COBOL2C status update
  5. 16 Sep 2000: Linux -> GNU/Linux; COBOL For GCC a GNU Project
  6. 5 August July 2000: Move to SourceForge. Links all changed.
  7. 5 August July 2000: Move to SourceForge. Links all changed.
  8. 14 May 2000: Manual updates - more on building, prerequisites, internal structure; Code all converted to GCC garbage collection
  9. 06 May 2000: Manual updates include more suggested tasks for contributions. Code now runs with GCC garbage collection.
  10. 04 May 2000: Manual updates include suggested tasks for contributions and more information on current status; toy app updates for gcc changes; revamped error message handling and memory manegement for preprocessor and main compiler.
  11. 21 April 2000: New manual now available; example code available separately again
  12. 16 April 2000: Uploaded new code which includes the GCC integration. Added information on the status of the other free COBOL projects.