Closed Reinhard-Prehofer closed 6 years ago
In 2299b5bdca5d4d3efa452402d609843e1ba16aeb I added 1 AST and 1 ASG unit test for the statement given by you.
Unfortunately, both unit tests pass. Especially the AST test shows, that the parser correctly parses the qualified data name, i. e. "A in B" qualifier.
So I assume that another statement surrounding the COMPUTE statement is the culprit. If you can, please feel free to issue the surrounding parts, or send them to me via email so that I can extract a generalized unit test.
I will reduce the huge program to a sample to isolate the erroneous Part in the late evening!Best regards, Reinhard
Attached find a cobol file to reproduce the error. I also renamed the issue description to index move-corr, since obviously the compute-Statement is not the culprit ...
You are right, the bug was about the missing identifier in MOVE CORR. Fixed in 64d1c1ad47625520ed40bd7facf7d6afe7cb54cd and added a unit test.
Just deployed as:
<dependency>
<groupId>io.github.uwol</groupId>
<artifactId>cobol85parser</artifactId>
<version>2.4.0-SNAPSHOT</version>
</dependency>
Will be part of version 2.4.0, which probably will be available until end of this month.
the following two move corr (using an INDEX) statements lead to parsing errors.
looks like an indexed expression ist not allowed in the grammar for the move-corr-statement: