1
0
forked from Alepha/Alepha
Commit Graph

14 Commits

Author SHA1 Message Date
e41198c294 Initial draft of how short options work.
I went with expansion here, as it was easier to implement,
given the complexities of how the options parsing code works.

Rather than try to maintain state machines and parsing for both
forms of argument, we can transform the short options into the
long form options.  This, then, might lead to some issues when
the code is expanded to handle arguments to those options.
I'll probably just add a state tracking bit to that parameter to
say that it was expanded from a specific short form.

It might be worth it to permit a short form to expand to a long
form _with_ specific hardcoded option.  This gets into defaults,
which might be the better way to underpin that.

For expanding these into the automatic help documentation, the
Long options (the main option definition struct) should maintain
a list of the short forms that it supports.

I also need to add a neat syntax.  Something like:

```
-'o'_option <= --"long-option"_option
```

It might be beneficial to auto generate something like:

```
-'O'_option <= --"no-long-option"_option
```

for boolean toggles.  Should it always be so?  Maybe an extra
sigil to allow both?
2025-09-06 01:22:53 -04:00
4116db0103 Fixup an example in comments on options. 2025-08-27 23:36:20 -04:00
8250680e6c Modernize some of how program options emits help.
Alepha IOStreams supports adaptors for most of what used to be
temporary string functions.
2024-04-03 14:24:03 -04:00
373b07e1c4 Apply the newer namespace rules and layout/formatting. 2024-04-02 23:32:02 -04:00
6a77318df8 Fix typo in options code. 2023-11-09 14:28:52 -05:00
25b9cf0ac8 More hydrogenation. 2023-11-08 04:42:17 -05:00
d1157cabf7 Start the C++23 adoption. 2023-11-07 05:30:50 -05:00
a62335960e Rename string gen to IOStreams::String. 2023-10-25 20:54:39 -04:00
c2bc8dae2e Stream builder notation for strings.
This should be less boilerplate than repeated `lexical_cast`
or `stringify` calls when building strings.
2023-10-25 04:03:39 -04:00
32fc4b481d Merge branch 'master' of github.com:adamlsd/Alepha
Conflicts:
	cmake/rules.cmake
2023-10-20 04:50:11 -04:00
0b63658815 Unify the evaluation helpers implementations. 2023-10-20 04:49:07 -04:00
e4b8b3f6ef Clean up the external-boost framework. 2023-10-18 13:58:34 -04:00
76606fca97 Add a simple commandline parser example.
Also cleaned up a few files.  Since these were pulled from various
scratch repos from informal ISO discussions over the years, they don't
quite line up.  This at least gets everything building again.
2023-10-10 02:24:58 -04:00
ae53cff323 Program options parser from my scratch projects. 2023-10-09 20:34:10 -04:00