gnucobol-users
[Top][All Lists]
Advanced

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

Re: [open-cobol-list] COBOL for GCC


From: Tim Josling
Subject: Re: [open-cobol-list] COBOL for GCC
Date: Sun, 06 Jan 2008 22:06:01 +1100

On Sun, 2007-12-30 at 21:03 -0700, Frank Swarbrick wrote:

> 
> Hi Tim,
> 
> I am curious about your decision to code COBOL for GCC in Lisp.  How
> does this affect what is needed to compile a Cobol program?  Will some
> sort of "Lisp runtime" be required?  Or will just the regular C runtime
> be required?  How about just running the compiled Cobol program?  I
> assume there will be a Cobol runtime that will be required, but will a
> Lisp runtime also be required?
> 
> I will be quite interested to see the compiler.  I've learned a lot
> about compilers just by reading the source for OpenCobol, and comparing
> to another Cobol compiler should be very interesting!
> 
> I've also been studying a lot of languages recently, and while Lisp is
> not one of them, Scheme is.  Which Lisp compiler are you using for Cobol
> for GCC?
> 

I am testing with gcl and sbcl and CMUlisp. I will probably also try out
some commercial vendors' offerings where they have free downloads that
are usable.

> Of course the more languages I learn the more I come to hate Cobol,
> but...  :-)
> 
> Does Cobol for GCC produce the GCC "intermediate language" as its
> output, and then feed that in to gcc?

GCC has changed to an interface called "Gimple" internally for most
front end to middle end communications. The back end still uses RTL. The
file format will in effect be a cobol specific version of Gimple I
expect. 

> 
> Finally, do you plan on supporting anything in Cobol 2002 and beyond,
> like OpenCobol does?
> 

Popular dialects of cobol 85 are the initial target. Then useful
features from 2002.

I have finished writing the lexical analyser, there being no suitable
lisp offering. I have adapted Bison for use with lisp programs., just
finished today. 

The next step is the preprocessor which should be a straightforward
conversion from the C version I wrote before. Then to the main compiler.

You can learn a lot about compilers looking at the GCC code and
documentation, and following the GCC mailing lists. There are a lot of
white papers etc. Search for GCC Summit.

Rehards,
Tim Josling

> Frank
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]