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

performVaryingPhrase accepts a literal where it should accept an indexName #103

Open
wfahle opened this issue Mar 14, 2024 · 0 comments
Open

Comments

@wfahle
Copy link

wfahle commented Mar 14, 2024

performVaryingPhrase
: (identifier | literal) performFrom performBy performUntil
;

is only used in the following contexts:
performVaryingClause
: VARYING performVaryingPhrase performAfter*
;
and
performAfter
: AFTER performVaryingPhrase
;

which in both cases accepts only a literal. It makes no sense semantically to say : PERFORM PARA VARYING 1 BY 1 UNTIL 1=3 or anything like that, and the AFTER semantics is similar, providing an outer loop variable to vary. See for example: https://www.ibm.com/docs/en/cobol-zos/6.2?topic=identifiers-varying-three

The grammar should instead read:
performVaryingPhrase
: (identifier | indexName) performFrom performBy performUntil
;
with the rest unaltered.

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