BatOptParse.OptParserSourceThis module contains the option parser itself.
It provides functions to create, populate and use option parsers to parse command line arguments.
Option_conflict name is raised by OptParse.OptParser.add when two different options are added with identical names. Usually this doesn't need to be caught since this error is usually easily fixed permanently by removing/renaming the conflicting option names.
The type of an option parser.
The type of an option group.
val make :
?usage:string ->
?description:string ->
?version:string ->
?suppress_usage:bool ->
?suppress_help:bool ->
?only_leading_opts:bool ->
?prog:string ->
?formatter:Formatter.t ->
unit ->
tCreates a new option parser with the given options.
val add :
t ->
?group:group ->
?help:string ->
?hide:bool ->
?short_name:char ->
?short_names:char list ->
?long_name:string ->
?long_names:string list ->
'a Opt.t ->
unitAdd an option to the option parser.
Add a group to the option parser.
Display an error message and exit the program. The error message is printed to the channel chn (default is Pervasives.stderr) and the program exits with exit status status (default is 1).
Display the usage message to the channel chn (default is Pervasives.stdout) and return.
Parse arguments as if the arguments args.(first), args.(first+1), ..., args.(last) had been given on the command line. By default first is 0 and last is the index of the last element of the array.