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

Problems with continuation lines without consecutive quotation marks #80

Open
No77 opened this issue Jul 5, 2020 · 0 comments
Open

Comments

@No77
Copy link

No77 commented Jul 5, 2020

CobolLineIndicatorProcessorImpl does not seem to properly take into account the case of missing consecutive quotation marks.
if (trimmedContentArea.startsWith("\"") || trimmedContentArea.startsWith("'")) does also apply for non-compliant parsers starting the continuation line with only a single quotation mark. I ported your Implementation to C# for parsing Cobol for my master thesis so I am not exactly sure if the problem also applies to Java, but it looks that way.

The CobolParser is not able to parse preprocessed files containing Cobol like the following:

       STRING
           "...long string..."
  -        "...long string..."
            INTO identifier
       END-STRING

A simple if (trimmedContentArea.startsWith("\"\"") || trimmedContentArea.startsWith("''")) fixed the problem for me.

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

No branches or pull requests

1 participant