[Chapel Merge] This PR adds boolean flags to the argument parser

Branch: refs/heads/main
Revision: dbedccc
Author: arezaii
Log Message:

Merge pull request #18155 from arezaii/bool-flags

This PR adds boolean flags to the argument parser.

Scope of work defined in Cray/chapel-private#2301, this work satisfies
the main goals of that issue which are to:

  1. Allow the developer to add boolean flags to their CLI
  2. Allow options, subcommands, and flags to be entered together

Relates to broader implementation task in Cray/chapel-private#2192

Tests added for flags and mixing subcommands with options and flags.

Example updated to include flags.


After running make cleanall from $CHPL_HOME:

  • [x] Can make
  • [x] Can make docs
  • [x] Can make mason
  • [x] Can make check
  • [x] Passing tests from util/start_test test/mason/mason-argparse

Reviewed by @mppf

Signed-off-by: Ahmad Rezaii ahmad.rezaii@hpe.com

Modified Files:
M test/mason/mason-argparse/MasonArgParseExample.chpl

M test/mason/mason-argparse/MasonArgParseExample.good
M test/mason/mason-argparse/MasonArgParseExample.lastexecopts
M test/mason/mason-argparse/MasonArgParseTests.chpl
M test/mason/mason-argparse/MasonArgParseTests.good
M tools/mason/MasonArgParse.chpl

Compare: https://github.com/chapel-lang/chapel/compare/7b318e12597f...dbedcccf8014