Add UNSET directive to ParmParse#2
Draft
Copilot wants to merge 10 commits intodevelopmentfrom
Draft
Conversation
Agent-Logs-Url: https://github.com/baperry2/amrex/sessions/a504d233-b5bc-419b-aaf3-e0626460eb7c Co-authored-by: baperry2 <[email protected]>
Agent-Logs-Url: https://github.com/baperry2/amrex/sessions/a504d233-b5bc-419b-aaf3-e0626460eb7c Co-authored-by: baperry2 <[email protected]>
Agent-Logs-Url: https://github.com/baperry2/amrex/sessions/a504d233-b5bc-419b-aaf3-e0626460eb7c Co-authored-by: baperry2 <[email protected]>
Agent-Logs-Url: https://github.com/baperry2/amrex/sessions/a504d233-b5bc-419b-aaf3-e0626460eb7c Co-authored-by: baperry2 <[email protected]>
Copilot
AI
changed the title
[WIP] Add UNSET directive to parmparse for keyword removal
Add UNSET directive to ParmParse
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an
UNSETdirective to ParmParse that removes a previously-defined keyword from the parse table. This enables input files to conditionally suppress parameters — for example, an included file can cancel a key set by its parent.Multiple keys can be removed in a single directive:
Additional background
Mirrors the design of the existing
FILEdirective. The newParmParse::UnsetKeyword = "UNSET"static is exposed in the header for symmetry withFileKeyword. The directive is handled inaddDefn()by erasing each listed key from the table; keys not present are silently ignored.Tests added to
Tests/ParmParse/inputsandTests/ParmParse/main.cppcover single-key unset, multi-key unset, and verifying that non-listed keys are unaffected.Checklist
The proposed changes: