TypeCobol
TypeCobol copied to clipboard
Wrong severity on diagnostic for required space after semicolon
Describe the bug It looks like IBM compiler consider missing space after semicolon as a warning but not as an error.
To Reproduce (Type)Cobol code that cause the bug : (if any)
IDENTIFICATION DIVISION.
PROGRAM-ID. TCOFM117.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 group1.
05 array1 OCCURS 5.
10 array2 OCCURS 5.
15 item PIC X.
01 a PIC X.
01 b PIC X.
PROCEDURE DIVISION.
* Ok
DISPLAY item (1 1)
* Warning: A blank was missing before character"1"in column 28.
* A blank was assumed.
DISPLAY item (1;1)
* Warning: A blank was missing before character"a"in column 17.
* A blank was assumed.
* Warning: A blank was missing before character"T"in column 19.
* A blank was assumed.
* Warning: A blank was missing before character"b"in column 22.
* A blank was assumed.
MOVE;a;TO;b
GOBACK
.
End Program TCOFM117.
Expected behavior 4 warnings instead of 4 errors.
Technical
Change the severity of associated diagnostic ? This should have no impact as the scanner produces token of the same length and type regardless of the presence or absence of a space after.
Check uses of Scanner.ScanOneCharFollowedBySpaceOrNumericLiteral
and Scanner.ScanOneCharFollowedBySpace
methods for other chars that may be accepted by IBM compiler without a space after them.
How to test automatically Standard tests are enough.