ianfhunter / GNOLL

GNOLL is an efficient dice notation parser for multiple programming languages that supports a wide set of dice notation
https://www.ianhunter.ie/GNOLL/
GNU General Public License v3.0
39 stars 23 forks source link

Use getopts to enable and disable features on the commandline #431

Closed ianfhunter closed 9 months ago

ianfhunter commented 1 year ago

The commandline app should parse: --no-builtins --verbose / -v And similar if applicable.

Currently parsing --version and --help are done with custom logic. It would be possible to port these options to getopts_long but that's not standard across all platforms.

We could use the plain getopts but the likes of -nb is not very self explanatory. Manual parsing will require stripping the flags out before calling yacc/lex

ianfhunter commented 9 months ago

Solution provided by Kodiologist will suffice for this