Command-Line-Syntax.html 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
  2. <html>
  3. <!-- Created on November 8, 2012 by texi2html 1.82
  4. texi2html was written by:
  5. Lionel Cons <[email protected]> (original author)
  6. Karl Berry <[email protected]>
  7. Olaf Bachmann <[email protected]>
  8. and many others.
  9. Maintained by: Many creative people.
  10. Send bugs and suggestions to <[email protected]>
  11. -->
  12. <head>
  13. <title>avram - a virtual machine code interpreter: 1.5 Command Line Syntax</title>
  14. <meta name="description" content="avram - a virtual machine code interpreter: 1.5 Command Line Syntax">
  15. <meta name="keywords" content="avram - a virtual machine code interpreter: 1.5 Command Line Syntax">
  16. <meta name="resource-type" content="document">
  17. <meta name="distribution" content="global">
  18. <meta name="Generator" content="texi2html 1.82">
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <style type="text/css">
  21. <!--
  22. a.summary-letter {text-decoration: none}
  23. blockquote.smallquotation {font-size: smaller}
  24. pre.display {font-family: serif}
  25. pre.format {font-family: serif}
  26. pre.menu-comment {font-family: serif}
  27. pre.menu-preformatted {font-family: serif}
  28. pre.smalldisplay {font-family: serif; font-size: smaller}
  29. pre.smallexample {font-size: smaller}
  30. pre.smallformat {font-family: serif; font-size: smaller}
  31. pre.smalllisp {font-size: smaller}
  32. span.roman {font-family:serif; font-weight:normal;}
  33. span.sansserif {font-family:sans-serif; font-weight:normal;}
  34. ul.toc {list-style: none}
  35. -->
  36. </style>
  37. </head>
  38. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  39. <a name="Command-Line-Syntax"></a>
  40. <table cellpadding="1" cellspacing="1" border="0">
  41. <tr><td valign="middle" align="left">[<a href="Parameter-Mode-Options.html#Parameter-Mode-Options" title="Previous section in reading order"> &lt; </a>]</td>
  42. <td valign="middle" align="left">[<a href="Diagnostics.html#Diagnostics" title="Next section in reading order"> &gt; </a>]</td>
  43. <td valign="middle" align="left"> &nbsp; </td>
  44. <td valign="middle" align="left">[<a href="User-Manual.html#User-Manual" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
  45. <td valign="middle" align="left">[<a href="User-Manual.html#User-Manual" title="Up section"> Up </a>]</td>
  46. <td valign="middle" align="left">[<a href="Virtual-Machine-Specification.html#Virtual-Machine-Specification" title="Next chapter"> &gt;&gt; </a>]</td>
  47. <td valign="middle" align="left"> &nbsp; </td>
  48. <td valign="middle" align="left"> &nbsp; </td>
  49. <td valign="middle" align="left"> &nbsp; </td>
  50. <td valign="middle" align="left"> &nbsp; </td>
  51. <td valign="middle" align="left">[<a href="avram.html#Top" title="Cover (top) of document">Top</a>]</td>
  52. <td valign="middle" align="left">[<a href="avram_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
  53. <td valign="middle" align="left">[<a href="Function-Index.html#Function-Index" title="Index">Index</a>]</td>
  54. <td valign="middle" align="left">[<a href="avram_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
  55. </tr></table>
  56. <hr size="1">
  57. <a name="Command-Line-Syntax-1"></a>
  58. <h2 class="section">1.5 Command Line Syntax</h2>
  59. <a name="index-command-line"></a>
  60. <p>The command line parameters that follow the virtual code file name
  61. when <code>avram</code> is used in parameter mode (<a href="Parameter-Mode.html#Parameter-Mode">Parameter Mode</a>) are dependent on the
  62. specific application. However, all supported applications are
  63. constrained for implementation reasons to observe certain uniform
  64. conventions regarding their command line parameters, which are
  65. documented here to avoid needless duplication.
  66. </p>
  67. <a name="index-shell"></a>
  68. <a name="index-file-parameters"></a>
  69. <a name="index-input-files"></a>
  70. <p>The shell divides the command line into &quot;arguments&quot; separated by white
  71. space. Arguments containing white space or special characters used by
  72. the shell must be quoted or protected as usual. File names with wild
  73. cards in them are expanded by the shell before <code>avram</code> sees them.
  74. </p>
  75. <p><code>avram</code> then extracts from the sequence of arguments a sequence of
  76. filenames and a sequence of options. Each option consists of a keyword and an
  77. optional parameter list. Filenames, keywords, and parameter lists are
  78. distinguished according to the following criteria.
  79. </p>
  80. <ol>
  81. <li>
  82. An argument is treated as a keyword iff it meets these three
  83. conditions.
  84. <ol>
  85. <li>
  86. It starts with a dash.
  87. </li><li>
  88. It doesn&rsquo;t contain an equals sign.
  89. </li><li>
  90. It doesn&rsquo;t consist solely of a dash.
  91. </li></ol>
  92. </li><li>
  93. An argument is treated as a parameter list iff it meets these four
  94. conditions.
  95. <ol>
  96. <li>
  97. It doesn&rsquo;t begin with a dash.
  98. </li><li>
  99. It either begins with an equals sign or doesn&rsquo;t contain one.
  100. </li><li>
  101. It immediately follows an argument beginning with a dash, not
  102. containing an equals sign and not consisting solely of a dash.
  103. </li><li>
  104. At least one of the following is true.
  105. <ol>
  106. <li>
  107. It doesn&rsquo;t contain a period, tilde, or path separator.
  108. <a name="index-path-separators"></a>
  109. </li><li>
  110. It contains a comma.
  111. </li><li>
  112. It can be interpreted as a C formatted floating point number.
  113. </li></ol>
  114. </li></ol>
  115. </li><li>
  116. An argument is treated as an input file name iff it meets these four
  117. conditions.
  118. <ol>
  119. <li>
  120. It doesn&rsquo;t begin with a dash.
  121. </li><li>
  122. It doesn&rsquo;t contain an equals sign.
  123. </li><li>
  124. It doesn&rsquo;t contain a comma.
  125. </li><li>
  126. At least one of the following is true.
  127. <ol>
  128. <li>
  129. It contains a period, tilde, or path separator.
  130. </li><li>
  131. It doesn&rsquo;t immediately follow an argument beginning with a dash, not
  132. consisting solely of a dash, and not containing an equals sign.
  133. </li></ol>
  134. </li></ol>
  135. </li><li>
  136. If an argument contains an equals sign but doesn&rsquo;t begin with one,
  137. the part on the left of the first equals sign is treated as a
  138. keyword and the part on the right is treated as a parameter list.
  139. </li><li>
  140. An argument consisting solely of a dash is taken to represent the
  141. standard input file.
  142. </li><li>
  143. An argument not fitting any of the above classifications is an error.
  144. </li></ol>
  145. <p>These conventions are needed for <code>avram</code> to detect input file names
  146. in a general, position independent way, so that it can preload the files
  147. on behalf of the application. Many standard Unix utilities follow these
  148. <a name="index-Unix-2"></a>
  149. conventions to a large extent, the exceptions being those that employ
  150. non-filename arguments without distinguishing syntax, and use positional
  151. or other ad hoc methods of command line interpretation. A drop-in
  152. replacement for such an application could nevertheless be implemented
  153. using <code>avram</code> with an appropriate wrapper script, similar to the
  154. approach recommended in <a href="Example-Script.html#Example-Script">Example Script</a>, but with suitable keywords
  155. inserted prior to the ambiguous arguments.
  156. </p>
  157. <hr size="1">
  158. <table cellpadding="1" cellspacing="1" border="0">
  159. <tr><td valign="middle" align="left">[<a href="Parameter-Mode-Options.html#Parameter-Mode-Options" title="Previous section in reading order"> &lt; </a>]</td>
  160. <td valign="middle" align="left">[<a href="Diagnostics.html#Diagnostics" title="Next section in reading order"> &gt; </a>]</td>
  161. <td valign="middle" align="left"> &nbsp; </td>
  162. <td valign="middle" align="left">[<a href="User-Manual.html#User-Manual" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
  163. <td valign="middle" align="left">[<a href="User-Manual.html#User-Manual" title="Up section"> Up </a>]</td>
  164. <td valign="middle" align="left">[<a href="Virtual-Machine-Specification.html#Virtual-Machine-Specification" title="Next chapter"> &gt;&gt; </a>]</td>
  165. <td valign="middle" align="left"> &nbsp; </td>
  166. <td valign="middle" align="left"> &nbsp; </td>
  167. <td valign="middle" align="left"> &nbsp; </td>
  168. <td valign="middle" align="left"> &nbsp; </td>
  169. <td valign="middle" align="left">[<a href="avram.html#Top" title="Cover (top) of document">Top</a>]</td>
  170. <td valign="middle" align="left">[<a href="avram_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
  171. <td valign="middle" align="left">[<a href="Function-Index.html#Function-Index" title="Index">Index</a>]</td>
  172. <td valign="middle" align="left">[<a href="avram_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
  173. </tr></table>
  174. <p>
  175. <font size="-1">
  176. This document was generated on <i>November 8, 2012</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 1.82</i></a>.
  177. </font>
  178. <br>
  179. </p>
  180. </body>
  181. </html>