TypeCobol
TypeCobol copied to clipboard
Handle paragraph and section identified by a number
Describe the bug Handle paragraph and section identified by a number.
To Reproduce Cobol code that cause the bug :
IDENTIFICATION DIVISION.
PROGRAM-ID. Pgm.
PROCEDURE DIVISION.
perform 300
perform 300 300 times
.
300.
exit.
END PROGRAM Pgm.
Expected behavior Accept paragraph and section identified by a number.
Technical
Idea:
Except for the case of perform 300 300 times
, everything can be done directly in the Scanner
.
Maybe perform 300 300 times
can be handled by the grammar with a rule like:
PERFORM UserDefinedWord UserDefinedWord TIMES
Then the second UserDefinedWord will be converted as an Integer by CodeElementBuilder
.