free-format support and handling/ignoring COBOL directives
In my humble opinion it would be best to just ignore any directive, that isn't supported, while adding a warning message.
If those are used. A directive is always "first non-space is >>
, followed by \s*
then some directive words (only "reserved" there).
The likely most famous one is:
>> SOURCE [FORMAT] [IS] FREE [*> optional inline-comment]
Supporting free format would be good to allow testing with "more modern" code (some people are effectively writing ANSI85 + intrinsic functions in free-form reference-format).