Skip to content

Add rfl::cli aliases, counters, constraints, negatable flags, SingleDashLong, PreserveNames, and BoolValueTokens - #64

Closed
clockblocker wants to merge 1 commit into
cli-parsing-modes-and-occurrencesfrom
cli-attributes-and-syntax-processors
Closed

clockblocker wants to merge 1 commit into
cli-parsing-modes-and-occurrencesfrom
cli-attributes-and-syntax-processors

Conversation

@clockblocker

Copy link
Copy Markdown
Owner

Adds declarative option attributes and CLI syntax processors for real-world C++ CLIs:

  • rfl::cli::attr::Alias<"name"> (repeatable long aliases resolving to canonical field name, supporting abbreviations)
  • rfl::cli::attr::Counter (additive repeatable count flags such as -v, -vvv, --verbose)
  • rfl::cli::attr::Excludes<"opt"> and rfl::cli::attr::Needs<"opt"> (declarative mutual-exclusion and co-dependency checks)
  • rfl::cli::attr::Negatable<Prefix> and rfl::cli::attr::NegatedName<"name"> (e.g. --pyc / --no-pyc, -finline / -fno-inline)
  • rfl::cli::SingleDashLong: accept single-dash long options (-datadir=...)
  • rfl::cli::PreserveNames: opt out of automatic SnakeCaseToKebabCase conversion
  • rfl::cli::BoolValueTokens: accept separate boolean literal tokens after long flags (--use-gpu 0 / --use-gpu 1)
  • Rich rfl::cli::OptionOccurrence metadata (name, value, has_value, negated, raw)

Stacked on cli-parsing-modes-and-occurrences (#63). Verified with ASan + UBSan across all CLI tests.

@clockblocker
clockblocker force-pushed the cli-attributes-and-syntax-processors branch from 175eca5 to 8569e03 Compare November 27, 2026 07:30
@clockblocker

Copy link
Copy Markdown
Owner Author

Closing mega-PR: SingleDashLong, PreserveNames, BoolValueTokens, NegatedName, and OptionOccurrence are cut (0 uses / bugs); kept pieces (Alias, Counter, Negatable) will be split cleanly behind the Wave 4 RFC (branch preserved).

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

Successfully merging this pull request may close these issues.

1 participant