 |
COBOL isn't dead, it just smells funny
Posted by robogeek on June 18, 2006 at 07:42 PM | Comments (6)
I was thinking the other day - what with the Visual Basic compiler for Java, it would make sense for there to be a COBOL compiler for Java. That way we could draw on yet another large body of software to run on top of the Java runtime.
Okay, so I get strange thoughts occasionally.
Of course the first step would be a grammer to parse the language .. the next step then would be a compiler to convert that to byte codes.
Well ... this guy A JavaCC grammar for Cobol found one here
Hurm... It's under the LGPL so someone who has a hankering could take it and run with it.
Bookmark blog post: del.icio.us Digg DZone Furl Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment
-
COBOL programs tend to be built around an IO model with no real Java counterpart. I'm not saying COBOL for the JVM is a bad idea, but it is only a very small part of what would be required for a usable migration path. The average COBOL programmer needs far more than the COBOL language to be productive.
Posted by: coxcu on June 18, 2006 at 08:42 PM
-
Or you could just use one of the already existing COBOL to Java compilers like:
http://www.legacyj.com/lgcyj_perc1.html
Posted by: spullara on June 18, 2006 at 11:09 PM
-
I've been working on a COBOL-to-Java translator for a while now. Should be finished "any day now" :) On the issue of the different IO model, COBOL embeds the file format details in with the code. This can be extracted, though, and that's what my product does ('will do'). Data is read from files a record at a time...something like:
CobolFileReader r = new CobolFileReader("myfile");
Person p;
Car c;
p = r.readRecord();
c = r.readRecord();
Unfortunately, I can't just generate the code above, because the COBOL code might just have a single "READ" statement and some flow control (while, goto, whatever) to read in the records :(
So I think it's doable, but the Java code will necessarily have a COBOL flavor to it.
See also softwaremining.com http://www.corporola.com/product/cobol2java.html http://www.cs.up.ac.za/cs/jbishop/Homepage/Pubs/Tech-reports/SourcetoJava.pdf
Posted by: atripp on June 19, 2006 at 08:31 AM
-
I allways think about COBOL > ByteCode, not COBOL > Java because I think that the same grammar and compiler parts could be used for COBOL > CIL.
I think that is pure academic issue since there is various commercial COBOL > Java compilers arround.
I never wrote a compiler and allways wonder if I have the enougth "grey mater" and time to do that.
If some one begins this project, contact me: sergiosamayoa (.at.) icon (.dot.) com (.dot.) gt
Posted by: ssamayoa on November 01, 2006 at 01:53 PM
-
I allways think about COBOL > ByteCode, not COBOL > Java because I think that the same grammar and compiler parts could be used for COBOL > CIL.
I think that is pure academic issue since there is various commercial COBOL > Java compilers arround.
I never wrote a compiler and allways wonder if I have the enougth "grey mater" and time to do that.
If some one begins this project, contact me: sergiosamayoa (.at.) icon (.dot.) com (.dot.) gt
Posted by: ssamayoa on November 01, 2006 at 01:55 PM
-
I know this is an old blog post, but there has been a cobol to java compiler for a very very long time - since 2000-2001. It's called perCOBOL and can be downloaded and reviewed at http://www.legacyj.com
Posted by: pangolin on March 21, 2007 at 04:54 AM
|