uwol / proleap-cobol-parser

ProLeap ANTLR4-based parser for COBOL
MIT License
136 stars 74 forks source link

Igore compiler output formatting directives like EJECT, SKIP1 #31

Closed Reinhard-Prehofer closed 6 years ago

Reinhard-Prehofer commented 7 years ago

An almost trivial issue, but currently such occurrences in source code lead to parsing-errors.

I think it's an IBM extension only and no real standard - well you know, COBOL ... - but output formatting commands like the following should be recognized (and ignored) by the parser:

typically these listoutput formatting commands are written on a single line, everywhere in the code and have no semantic meaning at all. SUPPRESS - like mentioned in https://github.com/uwol/cobol85parser/issues/15 falls into the same category, though this output suppressing command is typicall written following a copy xxx statement.

uwol commented 6 years ago

Yes, the parser indeed should be able to cope with these real-world imperfections. Fixed in 0112a1549dc7b6e45d6ed7a33f5be30c4460b763 and added to the ASG, in case anyone wants execute these statements :-)

Thanks!