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.
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:
A simple
if (trimmedContentArea.startsWith("\"\"") || trimmedContentArea.startsWith("''"))
fixed the problem for me.