Back when I was in college I picked up a contracting job at a Cobol shop to develop a system for calculating the McCabe Metric of their source code. To do this I had to be able to parse their code well enough to be able to build program flow graphs. The Cobol grammer, does not make this a trivial task. The grammar isn't compatible with Yacc without having to perform some ugly tricks with lexical look ahead. And that was just for the less than total parsing I needed. If you wanted to parse the entire grammer you'd be in for a massive task. Cobol is about as verbose as it gets. Antlr may be a bette bet than Lex/Yaxx.

Eventually I made it work well enough that they wanted to extend the system to perform a full pre-compilation syntax check with it. Their largest file, clocking in at over 100,000 lines, took over an hour to compile which made syntax errors rather expensive. My program took a minute or so on the same file so big time savings.

Automated language conversions usually leave you with an unreadable / unmaintainable mess. I've seen conversions of far simpler languages than Cobol meet only partial success. The resultant C could be built successfully on the target platforms (for which there was no compiler for the original language). It wasn't good enough to directly maintain however so all maintenance had to be done on the original source and reconverted.

Cobol is not dead, it just smells funny.


In reply to Re: COBOL to PERL by 5p1d3r
in thread COBOL to Perl by Scarborough

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.