[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnubol: Question



Edmund,

I am on the mailing list but not formally part of the GNU Cobol
project. Seeing noone else has replied to date here is some
information based on my involvement over the past 8 months. I
assume you have looked at the Web page. 

There are several free cobol projects that have been active over
the past few years. See the links from my web page
(www.geocities.com/timjosling). 

Alberto Santini was working on one for a while, but I think his
project is quiescient at present. 

The most active project at present is tiny cobol (see the link
from my web page). They are targeting cobol 74 initially.

GNU Cobol started off as a term project and went on from there.
They did a couple of proofs of concept but were dissatisfied with
the tools they were using, and are currently researching the
tools to use to generate the parser. The most promising ones seem
to be PCCTS (ALTLR), btyacc and bison. There is a partial grammar
in PCCTS. You can read the mailing list archives to get the
details of the history. Recently the leader of the project Laura
Tweedy left, due to work commitments.

I am also building a compiler (see my web page again) but sharing
some code with the other projects. Also sharing ideas and input
from the COBOL community. At the moment I have a grammar for the
cobol 85 nucleus level 2 written in bison, a yacc variant, with
assorted assist routines to get past the limitations of bison,
which only directly supports certain languages. At the moment
having written the grammar, I am working on integrating the
compiler into the GNU Compiler Collection (GCC), which does
efficient highly optimised code generation for many different
platforms. All the other projects have been generating their own
code, or generating C code for later translation into machine
code. This is easier than integrating into gcc, but IMO is likely
to lead to poorer code generation and more work in the long term,
and will make generating code for many platforms difficult.

There are several challenges involved in writing a free COBOL
compiler. First, COBOL is a very large language. Second, it is
fairly hard to parse, because the design objective was to make it
easy to read not easy to parse. Third, it is not a language
favoured by 'hackers' in general (see for example
http://www.tuxedo.org/~esr/jargon/html/entry/COBOL.html). Fourth,
most COBOL programmers do not know C, and most of the compiler
tools assume C/++ or Java, a C variant. Thus the pool of people
who know COBOL, and have the skills to write a compiler is small.
Fifth, PCs do not have the hardware support for COBOL that
mainframes have (eg packed decimal arithmetic instructions).

For this reason I am working on a two phase approach - build a
COBOL subset in the first phase. Then many of the subroutines
used in the runtime and even in the main compiler can be written
in COBOL - and we can tap the pool of people with COBOL skills.
Whether this theory works out in practice time will tell. 

Why are people working on free COBOL compilers? There are a lot
of COBOL programmers out there. It is a gap in the free software
portfolio. There is a lot of COBOL code out there. COBOL does
some things well like financial calculations and reporting. COBOL
is more self-documenting language than many others. A lot of
people find COBOL easier to program than other languages. To
annoy Eric Raymond (esr - see above). For fun / a challenge.

Feel free to email me if you have any questions.

Tim Josling

> Edmund Arranga wrote:
> 
> Hi -
> 
> My name is Ed Arranga. I am the guest editor the the March
> issue of IEEE Software magazine. The issue is devoted to Cobol.
> I would like to include some information in the issue about the
> GNU Cobol project. Could someone supply me with the status of
> the project, and perhaps an email address for follow up
> questions. Thanks.
> 
> Please reach me at earranga@objectz.com.
> 
> Best regards,
> Edmund C. Arranga

--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.