len wrote:
> if fieldline.count('COMP.') > 0:
I take it you're only handling a particular subset of COBOL constructs: thus,
"COMP" is never "COMPUTATIONAL" or "USAGE IS COMPUTATIONAL", and it always
occurs just before the full-stop (can't remember enough COBOL syntax to be
sure if anything else can go afterwards).
> elif newline[0].isdigit() and 'PIC' in newline:
Similarly, "PIC" is never "PICTURE" or "PICTURE IS".
Aargh, I think I have to stop. I'm remembering more than I ever wanted to about
COBOL. Must ... rip ... brain ... out ...
--
http://mail.python.org/mailman/listinfo/python-list