Specification compliance

This page is a synthesis of the specification compliance for each parser.

Legend

General features support

Feature id Description Shel Python C PHP
switch Switch option Supported Supported Supported Supported
sarg Single argument option Supported Supported Supported Supported
marg Multi argument option Supported Supported Supported Supported
grp Simple option group Supported Supported Supported Supported
xgrp Mutually exclusive option group Supported Supported Supported Supported
pa Positional arguments Supported Supported Supported Supported
sc Subcommand Supported Supported Supported Supported
son Short option name (-a) Supported Supported Supported Supported
lon Long option name (--option) Supported Supported Supported Supported
eoo End of options marker Supported Supported Supported Supported
eoa End of arguments marker Supported Supported Supported Supported
son-combined Short option name combination (-aBcdE) Supported Supported Supported Supported
son-arg-separated Short option name with separated argument (-a value) Supported Supported Supported Supported
son-arg-combined Short option name with combined argument (-aValue) Supported Supported Supported Supported
lon-arg-seperated Long option name with separated argument (--arg value) Supported Supported Supported Supported
lon-arg-combined Long option name with combined argument (--arg=value) Supported Supported Supported Supported
on-aliasing Option name aliasing between global options and subcommand options Supported Supported Supported Supported
escape-markers Escape markers by prefixing it with a backslash (\--option-name \--eoa) Supported Supported Supported Supported

Behavior

Behavior id Description Shel Python C PHP
sarg-missing-arg Raise error on missing argument for single argument option Supported Supported Supported Supported
marg-missing-arg Raise error on missing argument for multiple argument option Supported Supported Supported Supported
marg-arg-stop-at-on Stop considering current command line argument as arguments of option when an option name is found Supported Supported Supported Supported
marg-arg-append Append arguments of all multi-argument option apparition Supported Supported Supported Supported
marg-max-rule Stop considering current command line argument as arguments of muoption if argument limit is reached Supported Supported Supported Supported
marg-invalid-arg-null If argument does not validate multi argument specs, add as null value Not supported Not supported Not tested/Unknown Not tested/Unknown
grp-subgrp Option group may contains sub groups Supported Supported Supported Supported
grp-set-cascade Mark all parent groups as present (set) when a sub option is set Supported Not tested/Unknown Supported Supported
xgrp-same-option The same option of an exclusive group can appear more than once without error Supported Not tested/Unknown Supported Supported
xgrp-mutex Check mutual exclusion rule in exclusive groups Not tested/Unknown Not tested/Unknown Supported Supported
sc-name A sub command name must appear as the first positional argument Supported Supported Supported Supported
sc-alias-name Always report active subcommand by its main name, even if an alias was used on the command line Supported Supported Supported Supported
sc-options Subcommand options support Supported Supported Supported Supported
on-aliasing-before-sc Aliased option names positioned before subcommand name refer to program-scope options Supported Supported Supported Supported
on-aliasing-after-sc Aliased option names positioned after subcommand name refer to subcommand-scope options Supported Supported Supported Supported
on-firstarg-exception Ignore option name if the previous command line argument is a single/multiple argument option name (without combined argument) Supported Supported Supported Supported
son-combined-arg-at-last A (multi)argument option appears in the short option name combination Supported Supported Supported Supported
lon-arg-combined-switch Silently ignore switch combined argument if the value Is empty Supported Supported Supported Supported
lon-arg-combined-empty-arg Accept the empty string as a valid argument when long option names with combined argument is used (--arg=) Supported Supported Supported Supported
eoa-outofcontext Ignore eod-of-argument behavior outside of multi-argument option parsing Not supported Supported Supported Supported
eoa-firstarg-exception Do not consider – as the first argument of the current multi argument option Supported Supported Supported Supported
escape-eoa Escape end-of-arguments marker by prefixing it with a backslash Supported Supported Supported Supported
escape-eoo Escape end-of-options marker Supported Supported Supported Supported
escape-son Escape short option name markers Supported Supported Supported Supported
escape-lon Escape long option name markers Supported Supported Supported Supported
escape-unescape Remove leading backslash when escaped marker is stored as (positional) argument Supported Supported Supported Supported
parse-unexpected-option Parse option normally even if the option breaks a mutually exclusive rule Not supported Supported Supported Supported
parse-call-all-validators Call all argument validators (even if a preceding one failed to validate) Not tested/Unknown Supported Supported Supported
postproc-required Look for missing required option Supported Supported Supported Supported
postproc-required-in-xgrp Inside exclusive groups, the required rule for option O applies only if the group selected option is O or an ancestor of O Supported Supported Supported Supported
postproc-marg-minmax Minimum and maximum argument count rules are checked after all command line argument were parsed Supported Supported Supported Supported
postproc-sarg-default Set single argument default value if the option was not present and does not break mutual-exclusion rule Supported Supported Supported Supported
postproc-unset-option Unset present options which does not validate the post-processing phase Not supported Supported Supported Supported
validation-number Check if argument is a number Supported Supported Supported Supported
validation-number-range Check if a number argument is between a given interval Supported Supported Supported Supported
validation-pathexists Validate existence of filesystem item existence Not tested/Unknown Not tested/Unknown Not tested/Unknown Not tested/Unknown
validation-pathaccess Validate filesystem item permissions Not tested/Unknown Not tested/Unknown Not tested/Unknown Not tested/Unknown
validation-pathkind Validate filesystem item kind(s) Not tested/Unknown Not tested/Unknown Not tested/Unknown Not tested/Unknown
validation-enum Validate restricted value Supported Supported Supported Supported
msg-e8-once Report Error #8 only once Supported Supported Supported Supported
msg-e9-once Report Error #9 only once Supported Supported Supported Supported

Messages

List of messages that the parsers raise during command line argument processing

Level Code Message Description Shell Python C PHP
Fatal error 1 Unknown option <option-cli-name> The option name does not correspond to any name described in the program interface XML definition Supported Not tested/Unknown Supported Supported
Error 1 invalid value for option <option-cli-name>. <expected-values> The option value does not validate one or more rule of the option's value validators Not tested/Unknown Not tested/Unknown Supported Supported
Error 2 Invalid value for positional argument <number>. <expected values> The option value does not validate one or more rule of the positional argument's value validators Not tested/Unknown Not tested/Unknown Supported Supported
Error 3 Missing argument for option <option-cli-name> The argument of a single or multiple argument is missing Not tested/Unknown Not tested/Unknown Supported Supported
Error 4 Missing required option <option-cli-name> An option marked as required in the program interface XML description file is not present on the command line Not tested/Unknown Not tested/Unknown Supported Supported
Error 5 At least one of the following options have to be set: <option-cli-name1 ...> Not tested/Unknown Not tested/Unknown Not supported Supported
Error 6 One of the following options have to be set: <option-cli-name1 ...> Not tested/Unknown Not tested/Unknown Not supported Supported
Error 7 Required positional argument %d is missing An positional argument marked as required in the program interface XML description file is not present on the command line Not tested/Unknown Not tested/Unknown Supported Supported
Error 8 Program does not accept positional arguments Not tested/Unknown Not tested/Unknown Supported Supported
Error 9 Subcommand <sc-name> does not accept positional arguments Not supported Not supported Supported Supported
Error 10 Too many positional arguments There is more positional arguments in the command line than the maximum expected by the program or the subcommand Not tested/Unknown Not tested/Unknown Supported Supported
Error 11 At least <number> arguments required for <option-cli-name> A multi argument option is present on the command line but the number of argument does not validate its minimal argument count restriction Not tested/Unknown Not tested/Unknown Supported Supported
Error 12 Unexpected option <option-cli-name> An option conflicts with another due to exclusive group restriction Not tested/Unknown Not tested/Unknown Supported Supported
Error 13 Option <option-cli-name> does not allow an argument An argument was given to a switch by combining the value to a long option name Supported Supported Supported Supported
Warning 2 Ignore end-of-argument marker The 'end-of-argument' marker '-' was set as the first argument of a multi-argument option Not tested/Unknown Not tested/Unknown Supported Supported

The program interface definition framework