Thread: [Cobolforgcc-devel] GCC front end for COBOL
Status: Pre-Alpha
Brought to you by:
timjosling
|
From: Keisuke N. <kni...@ne...> - 2003-04-28 20:30:21
|
Hi, I am a developer of a COBOL compiler called OpenCOBOL, and I would like to make it a GCC front end. I have experimentally implemented a GCC front end by modifying OpenCOBOL, and it now compiles basic COBOL programs as much as OpenCOBOL can do. So, what should I do next? Could I contribute the code to the GCC team, or should I continue development by myself until it becomes more useful and stable? I have implemented the front end from scratch by myself and I am ready to send a copyright assignment (with my employer's disclaimer). The current status of my compiler is that it is partially compliant to the COBOL 85 standard. It can compile some useful COBOL programs, but still there is lots of work to be done. At this time, I implemented the front end based on the gcc-3_3-branch. I am aware of the tree-ssa branch, and probably I had better rewrite the front end using the new internal representation, but I am not sure when and how I should do that. The current implementation of my front end is more like a quick hack; it works, but is not so elegant. I am going to rewrite it to make it cleaner and more efficient. Before further going on, I would like to hear what people think about my project. Would GCC accept my front end for the COBOL language? With what version (branch) of GCC I should work? The source code of my COBOL front end is available at the following page: http://www.open-cobol.org/gcc.html Thanks, Keisuke Nishida |
|
From: Geoff K. <ge...@ge...> - 2003-04-28 21:54:59
|
Keisuke Nishida <kni...@ne...> writes: > Hi, > > I am a developer of a COBOL compiler called OpenCOBOL, > and I would like to make it a GCC front end. > > I have experimentally implemented a GCC front end by > modifying OpenCOBOL, and it now compiles basic COBOL > programs as much as OpenCOBOL can do. > > So, what should I do next? Could I contribute the > code to the GCC team, or should I continue development > by myself until it becomes more useful and stable? If it's now stable enough that it can be tested and can compile simple programs, that's a good point at which to integrate it. > Before further going on, I would like to hear what > people think about my project. Would GCC accept > my front end for the COBOL language? With what > version (branch) of GCC I should work? Yes, it's a goal of the GCC project to have new languages (see <http://gcc.gnu.org/gccmission.html>), so we'd like to accept your front-end. There are a few things that will make your front-end more successful: 1. A test-suite. Historically, front-ends without testsuites eventually end up so broken that they're unusable. 2. Write it in C, and try to make it work on as many platforms as possible (preferably, any platform where GCC can be built). Otherwise, some developers won't be able to test the frontend. (It looks like you've done this, right?) 3. Develop on the mainline, and integrate it well with the rest of GCC. Use tree inlining. Use the GCC coding style. Have documentation integrated with the rest of the documentation. None of these are absolute requirements, except maybe the test suite. One detail, though: are you aware that there's already a GCC frontend project for COBOL? It's at <http://sourceforge.net/projects/cobolforgcc/>. -- - Geoffrey Keating <ge...@ge...> |
|
From: Keisuke N. <kni...@ne...> - 2003-04-29 19:53:24
|
At 28 Apr 2003 14:54:20 -0700, Geoff Keating wrote: > > There are a few things that will make your front-end more successful: > > 1. A test-suite. Historically, front-ends without testsuites > eventually end up so broken that they're unusable. Yes, we have some, including NIST's COBOL Test Suite. > 2. Write it in C, and try to make it work on as many platforms as > possible (preferably, any platform where GCC can be built). > Otherwise, some developers won't be able to test the frontend. > (It looks like you've done this, right?) Right. The compiler and the run-time are both written in C. > 3. Develop on the mainline, and integrate it well with the rest of GCC. > Use tree inlining. Use the GCC coding style. Have documentation > integrated with the rest of the documentation. All right. I will look into the mainline. > One detail, though: are you aware that there's already a GCC frontend > project for COBOL? It's at <http://sourceforge.net/projects/cobolforgcc/>. Yes, but I started a new project for convenience. I will talk to them now. Thanks, Keisuke Nishida |
|
From: Tim J. <te...@me...> - 2003-04-29 20:12:04
|
Good. The main issues you will have to address are 1. A test suite. Existing languages have comprehensive test suites. 2. Coding standards, including comments. There are the FSF standards and on top of that the GCC standards. 3. Copyright assignment. Every significant contributor has to assign copyright to the FSF, and has to get a waiver from their school or employer. 4. Documentation, usually in texinfo format. Tim Josling Keisuke Nishida wrote: > Hi, > > I am a developer of a COBOL compiler called OpenCOBOL, > and I would like to make it a GCC front end. > ... > > http://www.open-cobol.org/gcc.html > > Thanks, > Keisuke Nishida |
|
From: <og...@nu...> - 2003-04-30 01:39:43
|
Hello. I'm director of knishida's company. > 3. Copyright assignment. Every significant contributor has to assign > copyright to the FSF, and has to get a waiver from their school or > employer. No problems. We permitted his project to contribute Gnu or other free software communities. # About 10 years ago, I started to make GnuCOBOL. But I can't complete it. -- og...@ne... -> http://www.netlab.jp Masami Ogoshi -> http://www.nurs.or.jp/~ogochan/ HarvestHouse 702 2-16 Maruyama-cho Shibuya-ku Tokyo 150-0044 JAPAN |
|
From: Keisuke N. <kni...@ne...> - 2003-04-30 19:50:37
|
At Wed, 30 Apr 2003 05:59:39 +1000, Tim Josling wrote: > > The main issues you will have to address are > > 1. A test suite. Existing languages have comprehensive test suites. > > 2. Coding standards, including comments. There are the FSF standards and > on top of that the GCC standards. > > 3. Copyright assignment. Every significant contributor has to assign > copyright to the FSF, and has to get a waiver from their school or > employer. > > 4. Documentation, usually in texinfo format. I think I need to write more documentation, including comments in the source. On the other hand, I want to spend more time on coding than commenting because I often rewrite the code. After having some thought on this, I have decided to keep development by myself for now, at least until the compiler becomes more stable and more people use it. Then, I will ask to include it in GCC again. Thanks, Keisuke Nishida |
|
From: Gerald P. <pf...@db...> - 2003-05-01 08:40:56
|
On Thu, 1 May 2003, Keisuke Nishida wrote: > I think I need to write more documentation, including comments in the > source. On the other hand, I want to spend more time on coding than > commenting because I often rewrite the code. > > After having some thought on this, I have decided to keep development > by myself for now, at least until the compiler becomes more stable > and more people use it. Then, I will ask to include it in GCC again. You may want to submit a patch for http://gcc.gnu.org/frontends.html to add/update the state of Cobol frontends. Tim, currently we have a link suggested by yourself; is that still fine as is? Gerald -- Gerald "Jerry" pf...@db... http://www.pfeifer.com/gerald/ |
|
From: Bernard G. <bg...@fr...> - 2003-05-02 13:54:30
|
Keisuke Nishida a écrit : > Hi, > > I am a developer of a COBOL compiler called OpenCOBOL, > and I would like to make it a GCC front end. > > I have experimentally implemented a GCC front end by > modifying OpenCOBOL, and it now compiles basic COBOL > programs as much as OpenCOBOL can do. > > A whole lot of thanks for the excellent work you've done so far, Keisuke !! I would just suggest changing the external name gcb (and the project name) to something like gcob: quicker to pronounce, and better imaging against GNU (like gcc, g77, ...). > So, what should I do next? Could I contribute the > code to the GCC team, or should I continue development > by myself until it becomes more useful and stable? I wonder how much easy it would be to continue to work with OpenCOBOL modified to have a structure more compatible to GCC, so that minimal modifications could be applied back to gcc-cobol ? > > I have implemented the front end from scratch by > myself and I am ready to send a copyright assignment > (with my employer's disclaimer). Better sending now your copyright assignment request, by experience, it takes time to proceed ! > > The current status of my compiler is that it is > partially compliant to the COBOL 85 standard. It > can compile some useful COBOL programs, but still > there is lots of work to be done. > > At this time, I implemented the front end based on > the gcc-3_3-branch. I am aware of the tree-ssa > branch, and probably I had better rewrite the front > end using the new internal representation, but I am > not sure when and how I should do that. > > The current implementation of my front end is more > like a quick hack; it works, but is not so elegant. > I am going to rewrite it to make it cleaner and > more efficient. > > Before further going on, I would like to hear what > people think about my project. Would GCC accept > my front end for the COBOL language? With what > version (branch) of GCC I should work? > > The source code of my COBOL front end is available > at the following page: > > http://www.open-cobol.org/gcc.html > A few technical hints when making the compiler: - on a RH8.0, I had to rename all malloc in cob-tree.c into xmalloc, following a error message about "poisonous malloc". - contrary to your instructions, you need OpenCOBOL 0.12. If 0.11, cob_get_environment and cob_put_environment are missing. If 0.20, then cob_decimal_get, cob_decimal_get_r and cob_error_code are missing. Also where should cobc1 be installed to make it work ? > > Thanks, > Keisuke Nishida -- Bernard Giroud TinyCOBOL Developer |
|
From: Keisuke N. <kni...@ne...> - 2003-05-04 19:12:31
|
Hi Bernard, At Fri, 02 May 2003 16:01:16 +0200, Bernard Giroud wrote: > > I would just suggest changing the external name > gcb (and the project name) to something like > gcob: quicker to pronounce, and better imaging > against GNU (like gcc, g77, ...). Yes, that might be better. > I wonder how much easy it would be to continue > to work with OpenCOBOL modified to have > a structure more compatible to GCC, so that minimal > modifications could be applied back to gcc-cobol ? It is not hard, but developing two compilers in parallel is troublesome. I am going to switch to gcc-cobol sooner or later. > A few technical hints when making the compiler: > > - on a RH8.0, I had to rename all malloc in cob-tree.c > into xmalloc, following a error message about > "poisonous malloc". > - contrary to your instructions, you need OpenCOBOL 0.12. > If 0.11, cob_get_environment and cob_put_environment > are missing. If 0.20, then cob_decimal_get, cob_decimal_get_r > and cob_error_code are missing. I will fix them. Thanks. > Also where should cobc1 be installed to make it work ? Anywhere on the PATH. Keisuke |
|
From: Bernard G. <bg...@fr...> - 2003-05-04 20:24:51
|
Mark Hahn a écrit : > Bernard Giroud a écrit : > > I would just suggest changing the external name > > gcb (and the project name) to something like > > gcob: quicker to pronounce, and better imaging > > against GNU (like gcc, g77, ...). > > I like "gobol" ;) Well done, Mark ! I like this one pretty much. Just a shame I realized only now that I was the sole destinator... Hence the publication in the lists. -- Bernard Giroud TinyCOBOL Developer |
|
From: Keisuke N. <kni...@ne...> - 2003-05-04 22:08:23
|
At Sun, 04 May 2003 22:31:39 +0200, Bernard Giroud wrote: > > > I like "gobol" ;) > > Well done, Mark ! I like this one pretty much. It's pretty :) I like it too. Keisuke |