You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IBase__CommandLineOption (infer.IBase__CommandLineOption)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> – <a href="../index.html">infer</a> » IBase__CommandLineOption</nav><h1>Module <code>IBase__CommandLineOption</code></h1><p>Definition and parsing of command line arguments</p></header><dl><dt class="spec value" id="val-warnf"><a href="#val-warnf" class="anchor"></a><code><span class="keyword">val</span> warnf : <span><span>(<span class="type-var">'a</span>, Stdlib.Format.formatter, unit)</span> <a href="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.format</span> <span>-></span> <span class="type-var">'a</span></code></dt><dd><p>Print to stderr in case of error, fails in strict mode</p></dd></dl><dl><dt class="spec type" id="type-parse_mode"><a href="#type-parse_mode" class="anchor"></a><code><span class="keyword">type</span> parse_mode</code><code> = </code><table class="variant"><tr id="type-parse_mode.InferCommand" class="anchored"><td class="def constructor"><a href="#type-parse_mode.InferCommand" class="anchor"></a><code>| </code><code><span class="constructor">InferCommand</span></code></td><td class="doc"><p>parse arguments as arguments for infer</p></td></tr><tr id="type-parse_mode.Javac" class="anchored"><td class="def constructor"><a href="#type-parse_mode.Javac" class="anchor"></a><code>| </code><code><span class="constructor">Javac</span></code></td><td class="doc"><p>parse arguments passed to the Java compiler</p></td></tr><tr id="type-parse_mode.NoParse" class="anchored"><td class="def constructor"><a href="#type-parse_mode.NoParse" class="anchor"></a><code>| </code><code><span class="constructor">NoParse</span></code></td><td class="doc"><p>all arguments are anonymous arguments, no parsing is attempted</p></td></tr></table></dt></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-compare_parse_mode"><a href="#val-compare_parse_mode" class="anchor"></a><code><span class="keyword">val</span> compare_parse_mode : <a href="index.html#type-parse_mode">parse_mode</a> <span>-></span> <a href="index.html#type-parse_mode">parse_mode</a> <span>-></span> int</code></dt></dl></div></div></div><dl><dt class="spec value" id="val-is_originator"><a href="#val-is_originator" class="anchor"></a><code><span class="keyword">val</span> is_originator : bool</code></dt><dt class="spec value" id="val-init_work_dir"><a href="#val-init_work_dir" class="anchor"></a><code><span class="keyword">val</span> init_work_dir : string</code></dt></dl><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> <span>'a t</span></code><code> = <span>?⁠deprecated:<span>string list</span></span> <span>-></span> <span>long:string</span> <span>-></span> <span>?⁠short:char</span> <span>-></span> <span>?⁠parse_mode:<a href="index.html#type-parse_mode">parse_mode</a></span> <span>-></span> <span>?⁠in_help:<span><span>(<a href="../ATDGenerated/InferCommand/index.html#type-t">ATDGenerated.InferCommand.t</a> * string)</span> list</span></span> <span>-></span> <span>?⁠meta:string</span> <span>-></span> string <span>-></span> <span class="type-var">'a</span></code></dt><dd><p>The <code>mk_*</code> functions declare command line options, while <code>parse</code> parses then according to the declared options.</p><p>The arguments of the declaration functions are largely treated uniformly:</p><ul><li><code>long</code> declares the option <code>--long</code></li><li><code>short</code> declares the option <code>-short</code> as an alias</li><li><code>deprecated</code> declares the option <
|
|
|
|
|
command_exe</code> records information about a command that is used to create its man page. A lot of the concepts are taken from man-pages(7).</p><ul><li><code>command_exe</code> is the name of the command, preferably an executable that selects the command</li><li><code>title</code> will be the title of the manual</li><li><code>section</code> will be the section of the manual (the number 7 in man-pages(7))</li><li><code>version</code> is the version string of the command</li><li><code>date</code> is the date of the last modification of the manual</li><li><code>short_description</code> is a one-line description of the command</li><li><code>options</code> can be either <code>`Replace blocks</code>, which populates the OPTIONS section with <code>blocks</code>, or <code>`Prepend blocks</code>, in which case the options from the command are used, prepended by <code>blocks</code>. If unspecified it defaults to <code>`Prepend []</code>.</li><li>All the other <code>section_name</code> options correspond to the contents of the section <code>section_name</code>. Some are mandatory and some are not.</li></ul></dd></dl><dl><dt class="spec value" id="val-mk_subcommand"><a href="#val-mk_subcommand" class="anchor"></a><code><span class="keyword">val</span> mk_subcommand : <a href="../ATDGenerated/InferCommand/index.html#type-t">ATDGenerated.InferCommand.t</a> <span>-></span> <span>?⁠on_unknown_arg:<span>[ `Add <span>| `Skip</span> <span>| `Reject</span> ]</span></span> <span>-></span> <span>name:string</span> <span>-></span> <span>?⁠deprecated_long:string</span> <span>-></span> <span>?⁠parse_mode:<a href="index.html#type-parse_mode">parse_mode</a></span> <span>-></span> <span>?⁠in_help:<span><span>(<a href="../ATDGenerated/InferCommand/index.html#type-t">ATDGenerated.InferCommand.t</a> * string)</span> list</span></span> <span>-></span> <span><a href="index.html#type-command_doc">command_doc</a> option</span> <span>-></span> unit</code></dt><dd><p><code>mk_subcommand command ~long command_doc</code> defines the subcommand <code>command</code>. A subcommand is activated by passing <code>name</code>, and by passing <code>--deprecated_long</code> if specified. A man page is automatically generated for <code>command</code> based on the information in <code>command_doc</code>, if available (otherwise the command is considered internal). <code>on_unknown_arg</code> is the action taken on unknown anonymous arguments; it is `Reject by default.</p></dd></dl><dl><dt class="spec value" id="val-args_env_var"><a href="#val-args_env_var" class="anchor"></a><code><span class="keyword">val</span> args_env_var : string</code></dt><dd><p>environment variable use to pass arguments from parent to child processes</p></dd></dl><dl><dt class="spec value" id="val-strict_mode_env_var"><a href="#val-strict_mode_env_var" class="anchor"></a><code><span class="keyword">val</span> strict_mode_env_var : string</code></dt><dt class="spec value" id="val-env_var_sep"><a href="#val-env_var_sep" class="anchor"></a><code><span class="keyword">val</span> env_var_sep : char</code></dt><dd><p>separator of argv elements when encoded into environment variables</p></dd></dl><dl><dt class="spec value" id="val-extend_env_args"><a href="#val-extend_env_args" class="anchor"></a><code><span class="keyword">val</span> extend_env_args : <span>string list</span> <span>-></span> unit</code></dt><dd><p><code>extend_env_args args</code> appends <code>args</code> to those passed via <code>args_env_var</code></p></dd></dl><dl><dt class="spec value" id="val-parse"><a href="#val-parse" class="anchor"></a><code><span class="keyword">val</span> parse : <span>?⁠config_file:string</span> <span>-></span> <span>usage:<a href="../IStdlib/index.html#module-IStd">IStdlib.IStd</a>.Arg.usage_msg</span> <span>-></span> <a href="index.html#type-parse_mode">parse_mode</a> <span>-></span> <span><a href="../ATDGenerated/InferCommand/index.html#type-t">ATDGenerated.InferCommand.t</a> option</span> <
|