Parsing cobol is actually not bad. The grammar is pretty simple; the "rail road" diagrams correspond to the recursive descent parser very directly.
https://www.ibm.com/docs/en/cobol-zos/6.1?topic=division-ide...
https://www.ibm.com/docs/en/cobol-zos/6.1?topic=division-ide...
Hmm, yea. I guess I'll have to take a look and see how they handled it. Thanks for the link!