Skip to content

Conversation

@emilienlemaire
Copy link

@emilienlemaire emilienlemaire commented Nov 26, 2025

Allow inspect with or conditions in inspect region, when inspect-with-or dialect support is enabled

@emilienlemaire emilienlemaire added the MF-AIX This issue is specific to the use of GnuCOBOL on code for MF on AIX label Nov 26, 2025
Copy link
Collaborator

@GitMensch GitMensch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commenting as it isn't a draft...

Please always start with the testcases Here you want a syntax/extension one for the dialect option (seems like that is really only mf-strict.conf allowing it, default and lax would with a warning as it does not conflict with anything) - and of course for each place where after-before-ohrase is applicable also a test case compiling with -finspect-or=ok.

as soon as doing the first change create a Changelog entry - this way you've documented what you did already and don't need to think about it later (which is especially useful when coming back to a change later or if someone takes over),

cobc/parser.y Outdated
}
| BEFORE _initial inspect_or_list
{
cb_verify(cb_inspect_or, _("INSPECT or"));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that string does not need a translation as both INSPECT and OR reference keywords; you possibly can improve that string in any case

@emilienlemaire
Copy link
Author

Hi Simon!
Thanks for the review, I'll edit the config files to the defaults you suggested.
I'll also mark the PR as draft, as I just forgot to check the box when creating the PR

@emilienlemaire emilienlemaire marked this pull request as draft November 27, 2025 08:45
@lefessan
Copy link
Member

What would be the better workaround to do in standard GnuCOBOL to do the same thing without INSPECT OR ? Because for me, if there is no better workaround, it should be enabled by default so that everybody can use it, no ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MF-AIX This issue is specific to the use of GnuCOBOL on code for MF on AIX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants