Skip to content

Handle copy replacing with ==::== #1752

@smedilol

Description

@smedilol

Describe the bug
Our parser cannot use standard Cobol Copy with a replacing clause containing string ::.

       01  xxxENT. COPY YxxxENT REPLACING ==::== BY ====. 

YxxxENT contains:

           05  xxxENT::-FCT01.
               10 xxxENT::-FCT01-Var1            PIC X(05).

The parser interpret :: as TypeCobol operator but inside a replacing clause (Pseudo text), this operator should be considered as plain text.

Expected behavior
No error.
The expanded source is:

       01  xxxENT. 
           05  xxxENT-FCT01.
               10 xxxENT-FCT01-Var1            PIC X(05).

Technical
See Scanner class and use property IsInsidePseudoText of the ScanState to inhibit creation of token :: inside pseudo text.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions