[Cobolforgcc-devel] Re: [open-cobol-list] GCC front end for COBOL
Status: Pre-Alpha
Brought to you by:
timjosling
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 |