123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
- <html>
- <!-- Created on November 8, 2012 by texi2html 1.82
- texi2html was written by:
- Lionel Cons <[email protected]> (original author)
- Karl Berry <[email protected]>
- Olaf Bachmann <[email protected]>
- and many others.
- Maintained by: Many creative people.
- Send bugs and suggestions to <[email protected]>
- -->
- <head>
- <title>avram - a virtual machine code interpreter: 1.5 Command Line Syntax</title>
- <meta name="description" content="avram - a virtual machine code interpreter: 1.5 Command Line Syntax">
- <meta name="keywords" content="avram - a virtual machine code interpreter: 1.5 Command Line Syntax">
- <meta name="resource-type" content="document">
- <meta name="distribution" content="global">
- <meta name="Generator" content="texi2html 1.82">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <style type="text/css">
- <!--
- a.summary-letter {text-decoration: none}
- blockquote.smallquotation {font-size: smaller}
- pre.display {font-family: serif}
- pre.format {font-family: serif}
- pre.menu-comment {font-family: serif}
- pre.menu-preformatted {font-family: serif}
- pre.smalldisplay {font-family: serif; font-size: smaller}
- pre.smallexample {font-size: smaller}
- pre.smallformat {font-family: serif; font-size: smaller}
- pre.smalllisp {font-size: smaller}
- span.roman {font-family:serif; font-weight:normal;}
- span.sansserif {font-family:sans-serif; font-weight:normal;}
- ul.toc {list-style: none}
- -->
- </style>
- </head>
- <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
- <a name="Command-Line-Syntax"></a>
- <table cellpadding="1" cellspacing="1" border="0">
- <tr><td valign="middle" align="left">[<a href="Parameter-Mode-Options.html#Parameter-Mode-Options" title="Previous section in reading order"> < </a>]</td>
- <td valign="middle" align="left">[<a href="Diagnostics.html#Diagnostics" title="Next section in reading order"> > </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="User-Manual.html#User-Manual" title="Beginning of this chapter or previous chapter"> << </a>]</td>
- <td valign="middle" align="left">[<a href="User-Manual.html#User-Manual" title="Up section"> Up </a>]</td>
- <td valign="middle" align="left">[<a href="Virtual-Machine-Specification.html#Virtual-Machine-Specification" title="Next chapter"> >> </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="avram.html#Top" title="Cover (top) of document">Top</a>]</td>
- <td valign="middle" align="left">[<a href="avram_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
- <td valign="middle" align="left">[<a href="Function-Index.html#Function-Index" title="Index">Index</a>]</td>
- <td valign="middle" align="left">[<a href="avram_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
- </tr></table>
- <hr size="1">
- <a name="Command-Line-Syntax-1"></a>
- <h2 class="section">1.5 Command Line Syntax</h2>
- <a name="index-command-line"></a>
- <p>The command line parameters that follow the virtual code file name
- when <code>avram</code> is used in parameter mode (<a href="Parameter-Mode.html#Parameter-Mode">Parameter Mode</a>) are dependent on the
- specific application. However, all supported applications are
- constrained for implementation reasons to observe certain uniform
- conventions regarding their command line parameters, which are
- documented here to avoid needless duplication.
- </p>
- <a name="index-shell"></a>
- <a name="index-file-parameters"></a>
- <a name="index-input-files"></a>
- <p>The shell divides the command line into "arguments" separated by white
- space. Arguments containing white space or special characters used by
- the shell must be quoted or protected as usual. File names with wild
- cards in them are expanded by the shell before <code>avram</code> sees them.
- </p>
- <p><code>avram</code> then extracts from the sequence of arguments a sequence of
- filenames and a sequence of options. Each option consists of a keyword and an
- optional parameter list. Filenames, keywords, and parameter lists are
- distinguished according to the following criteria.
- </p>
- <ol>
- <li>
- An argument is treated as a keyword iff it meets these three
- conditions.
- <ol>
- <li>
- It starts with a dash.
- </li><li>
- It doesn’t contain an equals sign.
- </li><li>
- It doesn’t consist solely of a dash.
- </li></ol>
- </li><li>
- An argument is treated as a parameter list iff it meets these four
- conditions.
- <ol>
- <li>
- It doesn’t begin with a dash.
- </li><li>
- It either begins with an equals sign or doesn’t contain one.
- </li><li>
- It immediately follows an argument beginning with a dash, not
- containing an equals sign and not consisting solely of a dash.
- </li><li>
- At least one of the following is true.
- <ol>
- <li>
- It doesn’t contain a period, tilde, or path separator.
- <a name="index-path-separators"></a>
- </li><li>
- It contains a comma.
- </li><li>
- It can be interpreted as a C formatted floating point number.
- </li></ol>
- </li></ol>
- </li><li>
- An argument is treated as an input file name iff it meets these four
- conditions.
- <ol>
- <li>
- It doesn’t begin with a dash.
- </li><li>
- It doesn’t contain an equals sign.
- </li><li>
- It doesn’t contain a comma.
- </li><li>
- At least one of the following is true.
- <ol>
- <li>
- It contains a period, tilde, or path separator.
- </li><li>
- It doesn’t immediately follow an argument beginning with a dash, not
- consisting solely of a dash, and not containing an equals sign.
- </li></ol>
- </li></ol>
- </li><li>
- If an argument contains an equals sign but doesn’t begin with one,
- the part on the left of the first equals sign is treated as a
- keyword and the part on the right is treated as a parameter list.
- </li><li>
- An argument consisting solely of a dash is taken to represent the
- standard input file.
- </li><li>
- An argument not fitting any of the above classifications is an error.
- </li></ol>
- <p>These conventions are needed for <code>avram</code> to detect input file names
- in a general, position independent way, so that it can preload the files
- on behalf of the application. Many standard Unix utilities follow these
- <a name="index-Unix-2"></a>
- conventions to a large extent, the exceptions being those that employ
- non-filename arguments without distinguishing syntax, and use positional
- or other ad hoc methods of command line interpretation. A drop-in
- replacement for such an application could nevertheless be implemented
- using <code>avram</code> with an appropriate wrapper script, similar to the
- approach recommended in <a href="Example-Script.html#Example-Script">Example Script</a>, but with suitable keywords
- inserted prior to the ambiguous arguments.
- </p>
- <hr size="1">
- <table cellpadding="1" cellspacing="1" border="0">
- <tr><td valign="middle" align="left">[<a href="Parameter-Mode-Options.html#Parameter-Mode-Options" title="Previous section in reading order"> < </a>]</td>
- <td valign="middle" align="left">[<a href="Diagnostics.html#Diagnostics" title="Next section in reading order"> > </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="User-Manual.html#User-Manual" title="Beginning of this chapter or previous chapter"> << </a>]</td>
- <td valign="middle" align="left">[<a href="User-Manual.html#User-Manual" title="Up section"> Up </a>]</td>
- <td valign="middle" align="left">[<a href="Virtual-Machine-Specification.html#Virtual-Machine-Specification" title="Next chapter"> >> </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="avram.html#Top" title="Cover (top) of document">Top</a>]</td>
- <td valign="middle" align="left">[<a href="avram_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
- <td valign="middle" align="left">[<a href="Function-Index.html#Function-Index" title="Index">Index</a>]</td>
- <td valign="middle" align="left">[<a href="avram_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
- </tr></table>
- <p>
- <font size="-1">
- This document was generated on <i>November 8, 2012</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 1.82</i></a>.
- </font>
- <br>
- </p>
- </body>
- </html>
|