File-Format.html 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <html lang="en">
  2. <head>
  3. <title>File Format - avram - a virtual machine code interpreter</title>
  4. <meta http-equiv="Content-Type" content="text/html">
  5. <meta name="description" content="avram - a virtual machine code interpreter">
  6. <meta name="generator" content="makeinfo 4.13">
  7. <link title="Top" rel="start" href="index.html#Top">
  8. <link rel="up" href="Virtual-Machine-Specification.html#Virtual-Machine-Specification" title="Virtual Machine Specification">
  9. <link rel="prev" href="Concrete-Syntax.html#Concrete-Syntax" title="Concrete Syntax">
  10. <link rel="next" href="Representation-of-Numeric-and-Textual-Data.html#Representation-of-Numeric-and-Textual-Data" title="Representation of Numeric and Textual Data">
  11. <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
  12. <meta http-equiv="Content-Style-Type" content="text/css">
  13. <style type="text/css"><!--
  14. pre.display { font-family:inherit }
  15. pre.format { font-family:inherit }
  16. pre.smalldisplay { font-family:inherit; font-size:smaller }
  17. pre.smallformat { font-family:inherit; font-size:smaller }
  18. pre.smallexample { font-size:smaller }
  19. pre.smalllisp { font-size:smaller }
  20. span.sc { font-variant:small-caps }
  21. span.roman { font-family:serif; font-weight:normal; }
  22. span.sansserif { font-family:sans-serif; font-weight:normal; }
  23. --></style>
  24. </head>
  25. <body>
  26. <div class="node">
  27. <a name="File-Format"></a>
  28. <p>
  29. Next:&nbsp;<a rel="next" accesskey="n" href="Representation-of-Numeric-and-Textual-Data.html#Representation-of-Numeric-and-Textual-Data">Representation of Numeric and Textual Data</a>,
  30. Previous:&nbsp;<a rel="previous" accesskey="p" href="Concrete-Syntax.html#Concrete-Syntax">Concrete Syntax</a>,
  31. Up:&nbsp;<a rel="up" accesskey="u" href="Virtual-Machine-Specification.html#Virtual-Machine-Specification">Virtual Machine Specification</a>
  32. <hr>
  33. </div>
  34. <h3 class="section">2.3 File Format</h3>
  35. <p><a name="index-file-format-154"></a>A virtual code file consists of an optional text preamble, followed by
  36. the concrete representation for a tree. The latter uses the
  37. syntax described in the previous section. The purpose of this section is
  38. to specify the remaining details of the file format.
  39. <p>The format for virtual code files may also be used for other purposes
  40. by virtual code applications, as it is automatically detected and parsed
  41. by <code>avram</code> when used in an input file, and can be automatically
  42. written to output files at the discretion of the application.
  43. <p>Other than virtual code files, input files not conforming to this format
  44. are not an error as far as <code>avram</code> is concerned, because they are
  45. <a name="index-text-files-155"></a>assumed to be text files. Applications can detect in virtual code
  46. the assumption that is made and report an error if appropriate.
  47. <p>Although the data file format includes no checksums or other explicit
  48. <a name="index-checksums-156"></a>methods of error detection, the concrete syntax itself provides a
  49. good measure of protection against undetected errors. The probability is
  50. vanishingly small that a random alteration to any valid encoding leaves
  51. it intact, because every bit in the sequence either mandates or
  52. prohibits the occurrence of two more bits somewhere after it. Errors in
  53. different parts of the file would have to be consistent with one another
  54. to go unnoticed.
  55. <ul class="menu">
  56. <li><a accesskey="1" href="Preamble-Section.html#Preamble-Section">Preamble Section</a>
  57. <li><a accesskey="2" href="Data-Section.html#Data-Section">Data Section</a>
  58. </ul>
  59. </body></html>