TypeCobol icon indicating copy to clipboard operation
TypeCobol copied to clipboard

Handle paragraph and section identified by a number

Open smedilol opened this issue 2 years ago • 0 comments

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.

smedilol avatar Apr 25 '22 16:04 smedilol