1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
|
[= AutoGen5 Template texi
(setenv "SHELL" "/bin/sh")
=]
[= (dne " " "@ignore ") =]
@end ignore
@node Comparison
@section Competitive Feature Analysis
Here is a feature comparison of AutoOpts and six other command line
parser generators. Nearly all of them share these characteristics:
@itemize @bullet
@item
They read a file that describes the program
options and produce code to parse command line options. Each has their
own format for describing options.
@item
All versions support both short options (flags) and GNU-type long
options. clig, however, is unique in that you must choose one or the
other. Either way, clig options are introduced with a single hyphen.
The other packages identify long options with doubled hyphens.
@item
They produce tailored code for parsing the command line.
@item
They support the C programming language.
@item
The global option state is stored in a global structure.
@item
They produce usage text.
@end itemize
@noindent
The [=(count "competitor")=] parsers compared are:
@enumerate[=
(define fraction (sprintf " .%02d" (quotient 70 (count "competitor")))) =][=
FOR competitor =]
@item
[= ?% disc "%s" (sprintf
"Little is known by me [Bruce] about @strong{%s}." (get "name")) =]
[=ENDFOR
=]@end enumerate[=
do-multitable
=][=
FOR competitor =][=
FOR note =]
[[=(for-index) =]] [=note=][=
ENDFOR =][=
ENDFOR
=]
@*
-- James R. Van Zandt
@*
-- Bruce Korb[=
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # =][=
DEFINE do-multitable
=]
@center Comparative Analysis of Differentiating Features
@*
If a feature is present (or absent) in only one or two implementations,
then the "yes" or "no" is upper cased for emphasis.
@multitable @columnfractions .26[=
FOR competitor =][=(. fraction)=][=ENDFOR=]
@item Feature \ Package #[=
FOR competitor =]
@tab [=(for-index)=][=
ENDFOR =]
@item shell script app[=
FOR competitor =]
@tab [=? does_sh "YES" "no"=][=
ENDFOR =]
@item Scheme app[=
FOR competitor =]
@tab [=? does_scheme "YES" "no"=][=
ENDFOR =]
@item Perl app[=
FOR competitor =]
@tab [=? does_perl "YES" "no"=][=
ENDFOR =]
@item config file input[=
FOR competitor =]
@tab [=? config "yes" "no"=][=
ENDFOR =]
@item environment input[=
FOR competitor =]
@tab [=? env "YES" "no"=][=
ENDFOR =]
@item config file output[=
FOR competitor =]
@tab [=? conf-out "YES" "no"=][=
ENDFOR =]
@item callback functions[=
FOR competitor =]
@tab [=? callback "yes" "NO"=][=
ENDFOR =]
@item multiple occurrence[=
FOR competitor =]
@tab [=? multi-parms "YES" "no"=][=
ENDFOR =]
@item parameter types[=
FOR competitor =]
@tab [=argtyp=][=
ENDFOR =]
@item enumeration opts[=
FOR competitor =]
@tab [=? enum-opts "YES" "no"=][=
ENDFOR =]
@item optional argument[=
FOR competitor =]
@tab [=? opt-args "YES" "no"=][=
ENDFOR =]
@item default values[=
FOR competitor =]
@tab [=? default-vals "yes" "NO"=][=
ENDFOR =]
@item interactive[=
FOR competitor =]
@tab [=? interactive "YES" "no"=][=
ENDFOR =]
@item range checks[=
FOR competitor =]
@tab [=? range-chk "yes" "no"=][=
ENDFOR =]
@item consistency checks[=
FOR competitor =]
@tab [=? consistency "YES" "no"=][=
ENDFOR =]
@item standard opts[=
FOR competitor =]
@tab [=? std-opts "YES" "no"=][=
ENDFOR =]
@item man page[=
FOR competitor =]
@tab [=? man-page "YES" "no"=][=
ENDFOR =]
@item texinfo invoking[=
FOR competitor =]
@tab [=? texi-usage "YES" "no"=][=
ENDFOR =]
@item developer dependencies[=
FOR competitor =]
@tab [=?% dependency "%s" "none"=][=
ENDFOR =]
@item user dependencies[=
FOR competitor =]
@tab [=?% user-dep "%s" "none"=][=
ENDFOR =]
@end multitable
"multiple occurrence" options may appear multiple times on the command line.
Some of the parsers constrain options to appearing once only.
"optional argument" refers to the argument to an option.
POSIX and most command line parsers require an option to either not have
an argument or else the argument must be supplied on the command line.
GNU's getopt_long and some of these parsers support the notion of
letting the option argument be "optional".
"consistency checks" verify that conflicting options do not appear
together, and options that require other options are allowed only
if those other options are present.
"standard options" are pre-defined options that can be trivially
incorporated into a user's set of options. They can also thereby
be used for standardizing on the flag character and option name.
"interactive" means that the option processing package is able to
interactively query the user for option state.
[=
ENDDEF do-multitable
=]
|