We are trying to parse Cobol sources.
Trailing comma’s cause a lot of parsing errors, while the compiler has no problems with them.
So why don’t you ignore comma’s alltogether for AcuCobol (like you apparently do for other Cobol dialects)
Versions used:
Cobol: AcuCobol version 10.2.1, fixed format
SonarQube: Enterprise Edition Version 9.6.1 (build 59531)
– extract from the parser logging –
ERROR: Unable to parse COBOL source file : /build/builds/_NwxSV3v/0/dataserver-utilities/tdeltaplayground/sonar-parse-errors/cobol-src/source/PP0020 at line 13
Original contents starting from line 1 till line 13:
IDENTIFICATION DIVISION.
PROGRAM-ID. PP0020.
WORKING-STORAGE SECTION.
01 VARIABLE PIC 9.
PROCEDURE DIVISION.
MOVE 1 TO VARIABLE,
GOBACK.
Preprocessed contents:
Parse error at line 13:
1: IDENTIFICATION DIVISION .
2: PROGRAM-ID . PP0020 .
3: WORKING-STORAGE SECTION .
4: 01 VARIABLE PIC 9 .
5: PROCEDURE DIVISION .
12: MOVE 1 TO VARIABLE ,
13: GOBACK .
^
14: EOF