TypeCobol
TypeCobol copied to clipboard
Invalid decimal literals
Describe the bug
Some literals are not correctly reocgnized by our parser. Bug in PictureValidator
?
To Reproduce (Type)Cobol code that cause the bug : (if any)
IDENTIFICATION DIVISION.
PROGRAM-ID. MainPgm.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
DECIMAL-POINT IS COMMA.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 num-comp-2 COMP-2 VALUE 1,E-02.
END PROGRAM MainPgm.
IDENTIFICATION DIVISION.
PROGRAM-ID. StackedPgm.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 num-comp-2 COMP-2 VALUE 1.E-02.
END PROGRAM StackedPgm.
Both programs will give the Syntax error : mismatched input '1' expecting {alphanumeric literal, numeric literal, figurative constant, keyword}
diagnostic on data declaration.
Expected behavior
No error and correct value in InitialValue
property.
Technical Check the tokens produced by scanner. By the look of the diagnostic, it means that the decimal point has not been reocgnized (?)
How to test automatically Standard automated tests.