Newbie code review of parsing program Please
Lawrence D'Oliveiro
ldo at geek-central.gen.new_zealand
Sun Nov 16 22:57:16 EST 2008
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 ...
More information about the Python-list
mailing list