Parsing error with Cobol MICROFOCUS Dialect

cobol
parse-error

(Sylvain Leroy) #1

Issue with Sonar Cobol with a files using MICROFOCUS dialect.

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)

Sonar Cobol : >= 4.3.0.3019
Dialect : MICROFOCUS

  • error observed

Statements that could not compile :

Move LENGTH OF "INTERNAL VALOR #" To TRIM-LEN-17847
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Basically any LENGTH OF with a QUOTED LITERAL.

We are compiling the COBOL with Microfocus compiler without any particular issue.


(Pierre-Yves Nicolas) #2

Hi,

Indeed, our parser wrongly requires LENGTH OF to be followed by a data name even when using Microfocus.
We will fix that: SONARCOBOL-1517

Thanks a lot for the feedback!

Pierre-Yves