Concrete-Syntax.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <html lang="en">
  2. <head>
  3. <title>Concrete Syntax - 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="Raw-Material.html#Raw-Material" title="Raw Material">
  10. <link rel="next" href="File-Format.html#File-Format" title="File Format">
  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="Concrete-Syntax"></a>
  28. <p>
  29. Next:&nbsp;<a rel="next" accesskey="n" href="File-Format.html#File-Format">File Format</a>,
  30. Previous:&nbsp;<a rel="previous" accesskey="p" href="Raw-Material.html#Raw-Material">Raw Material</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.2 Concrete Syntax</h3>
  35. <p>The previous section has developed a basic vocabulary for statements
  36. such as &ldquo;the virtual machine code for the identity function is
  37. <a name="index-identity-function-146"></a><code>(nil,(nil,nil))</code>&rdquo;, which are elaborated extensively in the
  38. subsequent sections on code and data formats. However, a description in
  39. this style would be inadequate without an explanation of how such an
  40. entity as <code>(nil,(nil,nil))</code> is communicated to <code>avram</code> in a
  41. virtual machine code file. The purpose of this section is to fill the
  42. gap by explaining exactly how any given tree would be transformed to its
  43. concrete representation.
  44. <p>The syntax is based on a conversion of the trees to bit strings,
  45. <a name="index-bit-strings-147"></a>followed by grouping the bits into blocks of six, which are then encoded
  46. by printable characters. Although anyone is free to modify <code>avram</code>,
  47. it is recommended that the concrete syntax described here be maintained
  48. for the sake of portability of virtual machine code applications.
  49. <p>Building a tree by reading the data from a file requires a more
  50. difficult algorithm than the one presented in this section, and is not
  51. considered because it's not strictly necessary for a
  52. compiler. Procedures for both reading and writing are available to C and
  53. C++ users as part of the <code>avram</code> library, and are also easily
  54. invoked on the virtual code level.
  55. <ul class="menu">
  56. <li><a accesskey="1" href="Bit-String-Encoding.html#Bit-String-Encoding">Bit String Encoding</a>
  57. <li><a accesskey="2" href="Blocking.html#Blocking">Blocking</a>
  58. </ul>
  59. </body></html>