Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tolerate missing dot_fs #2253

Merged

Conversation

ap891843
Copy link
Contributor

@ap891843 ap891843 commented Mar 18, 2024

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Below code would give diagnostics for the missing DOT, but would still do the parsing of code. i.e variables hover and other LSP feature continue to work.
       IDENTIFICATION DIVISION
       PROGRAM-ID. testabd.
       ENVIRONMENT DIVISION
       CONFIGURATION SECTION
       SPECIAL-NAMES.
       SOURCE-COMPUTER    IBM-PC                                              
       OBJECT-COMPUTER    .IBM-PC CHARACTER SET.
       INPUT-OUTPUT SECTION
       FILE-CONTROL
       DATA DIVISION
        FILE SECTION
        WORKING-STORAGE SECTION
        01 test.
           05 testa pic x
        LINKAGE SECTION
       PROCEDURE DIVISION
        MAIN-PROCESSING SECTION.
         MAINLINE-PARAGRAPH.
             display TESTA
             STOP RUN.
       ABC
           display "under abc".

below code would throw error but should recover from those errors. i.e. we should be able to do variable navigations etc

       Identification Division. 
       Program-id.    Programa.
       Data Division.
       Working-Storage Section.
       01  PARENT1.
           03  CHILD1         PIC 9   VALUE IS '0'.
           03  CHILD2        PIC 9   VALUE IS '1'.
           03  CHILD3         PIC 9   VALUE IS '2'.
       Procedure Division
       000-Main-Logic
           DISPLAcxcdsdfdfd sdsd sdfds sds "hello".
           DISPLAY CHILD1 OF PARENT1. 
           ACCEPT CHILD2 END-ACCEPT.
       End program Programa.   
       IDENTIFICATION DIVISION
       PROGRAM-ID. testabd.
       ENVIRONMENT DIVISION
       CONFIGURATION SECTION
       SPECIAL-NAMES.
       SOURCE-COMPUTER    IBM-PC                                              
       OBJECT-COMPUTER    .IBM-PC CHARACTER SET.
       INPUT-OUTPUT SECTION
       FILE-CONTROL
       DATA DIVISION
        FILE SECTION
        WORKING-STORAGE SECTION
        01 test.
           05 testa pic x
        LINKAGE SECTION
       PROCEDURE DIVISION
        MAIN-PROCESSING SECTION.
         MAINLINE-PARAGRAPH.
             display TESTA
             STOP RUN.
       ABC
           display "under abc".

Checklist:

  • Each of my commits contains one meaningful change
  • I have performed rebase of my branch on top of the development
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

@ap891843 ap891843 requested review from zeibura and ishche March 18, 2024 16:23
@@ -24,6 +24,7 @@ CompilerDirectivesTransformation.sequenceNumber=The first character of the seque
ContinuationLineTransformation.compilerDirectiveContinued=Compiler directives cannot be continued on another line
ContinuationLineTransformation.continuationLineContentAreaA=A continuation line cannot contain values in the Content Area A
ContinuationLineTransformation.periodRequired=IGYDS1082-E A period was required.
missing.period=A period was assumed before "%s".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "assumed" mean? That it was missing in the code but the parser added it anyway?

Copy link
Contributor Author

@ap891843 ap891843 Mar 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The parser assumed it, went ahead to parse the code ahead, instead of just failing at that point.
IBM cobol compiler gives below message
"IGYPS2145-E A period was required. A period was assumed before "PERFORM".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah so if it's a copy of the compiler message that's fine

@ap891843 ap891843 marked this pull request as draft March 19, 2024 14:08
@ap891843 ap891843 force-pushed the fix/tolerate_missing_dot_fs branch from b66d7ed to fb8c8d0 Compare March 20, 2024 15:38
Signed-off-by: Aman Prashant <aman.prashant@broadcom.com>
@ap891843 ap891843 force-pushed the fix/tolerate_missing_dot_fs branch from fb8c8d0 to f53bd09 Compare March 20, 2024 15:59
@ap891843 ap891843 marked this pull request as ready for review March 25, 2024 10:35
@ap891843 ap891843 requested review from zeibura and ishche March 25, 2024 10:35
Signed-off-by: Aman Prashant <aman.prashant@broadcom.com>
@ap891843 ap891843 force-pushed the fix/tolerate_missing_dot_fs branch from 23c5aef to 0b24923 Compare March 27, 2024 15:49
@ap891843 ap891843 merged commit ff084dd into eclipse-che4z:development Apr 3, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants