123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
- <html>
- <!-- Created on December 10, 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: 2.6.1 Input Data Structure</title>
- <meta name="description" content="avram - a virtual machine code interpreter: 2.6.1 Input Data Structure">
- <meta name="keywords" content="avram - a virtual machine code interpreter: 2.6.1 Input Data Structure">
- <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="Input-Data-Structure"></a>
- <table cellpadding="1" cellspacing="1" border="0">
- <tr><td valign="middle" align="left">[<a href="Parameter-Mode-Interface.html#Parameter-Mode-Interface" title="Previous section in reading order"> < </a>]</td>
- <td valign="middle" align="left">[<a href="Input-for-Mapped-Applications.html#Input-for-Mapped-Applications" title="Next section in reading order"> > </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="Virtual-Machine-Specification.html#Virtual-Machine-Specification" title="Beginning of this chapter or previous chapter"> << </a>]</td>
- <td valign="middle" align="left">[<a href="Parameter-Mode-Interface.html#Parameter-Mode-Interface" title="Up section"> Up </a>]</td>
- <td valign="middle" align="left">[<a href="Library-Reference.html#Library-Reference" 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="Input-Data-Structure-1"></a>
- <h3 class="subsection">2.6.1 Input Data Structure</h3>
- <p>The data structure that is used as the argument to the parameter mode
- application incorporates all the information about the command line and
- <a name="index-environment-4"></a>
- <a name="index-command-line-1"></a>
- the environment variables. It is in the form of a triple
- <code>((<var>files</var>,<var>options</var>),<var>environs</var>)</code>. The fields have
- these interpretations.
- </p>
- <dl compact="compact">
- <dt> <var>files</var></dt>
- <dd><p>is a list of quadruples
- <code>((<var>date</var>,<var>path</var>),(<var>preamble</var>,<var>contents</var>))</code>, with
- one quadruple for each input file named on the command line (but not the
- virtual code file or the <code>avram</code> executable). The list will be in
- the same order as the filenames on the command line, and is not affected
- by options interspersed with them. The fields in each item have the
- following interpretations.
- </p>
- <dl compact="compact">
- <dt> <var>date</var></dt>
- <dd><p>is the time stamp of the file in as a character string in the usual
- <a name="index-time-stamp"></a>
- <a name="index-date"></a>
- <a name="index-system-time"></a>
- <a name="index-current-time"></a>
- <a name="index-Unix-5"></a>
- Unix format, for example, <code>Fri Jan 19 14:34:44 GMT 2001</code>. If the
- file corresponds to standard input, the current system time and date are
- used.
- </p></dd>
- <dt> <var>path</var></dt>
- <dd><p>is the full path of the file, expressed as a list of strings. If the
- <a name="index-file-names-1"></a>
- <a name="index-paths-3"></a>
- <a name="index-absolute-path"></a>
- <a name="index-relative-path"></a>
- file corresponds to standard input, the list is empty. Otherwise, the
- first string in the list is the file name. The next is the name of the
- file’s parent directory, if any. The next is the parent of the parent,
- and so on. The root directory is indicated by the empty string, so that
- any path ending with the empty string is an absolute path, while any path
- ending with a non-empty string is relative to the current working
- directory. Path separators (i.e., slashes) are omitted.
- </p></dd>
- <dt> <var>preamble</var></dt>
- <dd><p>In the case of a text file, or any file not conforming to the format in
- <a name="index-preamble-3"></a>
- <a href="File-Format.html#File-Format">File Format</a>, this field is <code>nil</code>. Otherwise, this field contains
- the preamble of the file expressed as a list of strings, or contains
- just the empty string if the file has no preamble. Any leading hashes in
- the preamble of the file are stripped.
- </p></dd>
- <dt> <var>contents</var></dt>
- <dd><p>In the case of a text file (as indicated by the <var>preamble</var> field), this
- <a name="index-text-files-2"></a>
- field will contain a list of character strings, with each line of the file
- contained in a character string. Otherwise, it can contain data in any
- format, which are obtained by converting the data section of the file
- to a tree.
- </p></dd>
- </dl>
- </dd>
- <dt> <var>options</var></dt>
- <dd><p>is a list of quadruples of the form
- <code>((<var>position</var>,<var>longform</var>),(<var>keyword</var>,<var>params</var>))</code>
- with one quadruple for each option appearing on the command line after
- the name of the virtual code file.
- </p>
- <dl compact="compact">
- <dt> <var>position</var></dt>
- <dd><p>is a natural number indicating the position of the option on the command
- <a name="index-naturals-1"></a>
- <a name="index-command-line-2"></a>
- line. The position numbers of all the options will form an ascending
- sequence, but not necessarily consecutive nor starting with zero. The
- missing numbers in the sequence will correspond to the positions of the
- file names on the command line, allowing their positions to be inferred by
- applications for which the position matters.
- </p></dd>
- <dt> <var>longform</var></dt>
- <dd><p>is a boolean value which is true if the option starts with two or more
- <a name="index-booleans-1"></a>
- dashes but false otherwise.
- </p></dd>
- <dt> <var>keyword</var></dt>
- <dd><p>is the key word of the option expressed as a character string. For example
- in the case of a command line option <kbd>--foo=bar,baz</kbd>, the keyword is
- <code>foo</code>. Leading dashes are stripped.
- </p></dd>
- <dt> <var>params</var></dt>
- <dd><p>is a list of character strings identifying the parameters for the
- command line option in question. In the case of an option of the form
- <kbd>--foo=bar,baz</kbd>, the first character string in the list will be
- <code>bar</code> and the next will be <code>baz</code>. The same applies if the
- option is written <kbd>--foo bar,baz</kbd> or <kbd>--foo =bar,baz</kbd>. If there
- are no parameters associated with the option, the list is empty.
- </p></dd>
- </dl>
- </dd>
- <dt> <var>environs</var></dt>
- <dd><p>is a list of pairs of character strings, with one pair in the list for
- <a name="index-environment-5"></a>
- each environment variable. The identifier is the left string in the
- pair, and the value is the right. For example, if the environment
- contains the definition <code>OSTYPE=linux-gnu</code>, there will be a pair in
- the list whose left side is the string <code>OSTYPE</code> and whose
- right side is the string <code>linux-gnu</code>.
- </p></dd>
- </dl>
- <hr size="1">
- <table cellpadding="1" cellspacing="1" border="0">
- <tr><td valign="middle" align="left">[<a href="Parameter-Mode-Interface.html#Parameter-Mode-Interface" title="Previous section in reading order"> < </a>]</td>
- <td valign="middle" align="left">[<a href="Input-for-Mapped-Applications.html#Input-for-Mapped-Applications" title="Next section in reading order"> > </a>]</td>
- <td valign="middle" align="left"> </td>
- <td valign="middle" align="left">[<a href="Virtual-Machine-Specification.html#Virtual-Machine-Specification" title="Beginning of this chapter or previous chapter"> << </a>]</td>
- <td valign="middle" align="left">[<a href="Parameter-Mode-Interface.html#Parameter-Mode-Interface" title="Up section"> Up </a>]</td>
- <td valign="middle" align="left">[<a href="Library-Reference.html#Library-Reference" 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>December 10, 2012</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 1.82</i></a>.
- </font>
- <br>
- </p>
- </body>
- </html>
|