Syntax.html 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <html lang="en">
  2. <head>
  3. <title>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="A-Simple-Lisp-Like-Language.html#A-Simple-Lisp-Like-Language" title="A Simple Lisp Like Language">
  9. <link rel="prev" href="A-Simple-Lisp-Like-Language.html#A-Simple-Lisp-Like-Language" title="A Simple Lisp Like Language">
  10. <link rel="next" href="Semantics.html#Semantics" title="Semantics">
  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="Syntax"></a>
  28. <p>
  29. Next:&nbsp;<a rel="next" accesskey="n" href="Semantics.html#Semantics">Semantics</a>,
  30. Previous:&nbsp;<a rel="previous" accesskey="p" href="A-Simple-Lisp-Like-Language.html#A-Simple-Lisp-Like-Language">A Simple Lisp Like Language</a>,
  31. Up:&nbsp;<a rel="up" accesskey="u" href="A-Simple-Lisp-Like-Language.html#A-Simple-Lisp-Like-Language">A Simple Lisp Like Language</a>
  32. <hr>
  33. </div>
  34. <h5 class="subsubsection">2.7.4.1 Syntax</h5>
  35. <p><code>silly</code> has no reserved words, but it has equals signs, commas and
  36. parentheses built in. A concise but ambiguous grammar for it can be given
  37. as follows.
  38. <a name="index-syntax-253"></a><a name="index-grammar-254"></a>
  39. <pre class="display">
  40. <var>program</var> ::= <var>declaration</var>*
  41. <var>declaration</var> ::= <var>identifier</var> <code>=</code> <var>expression</var>
  42. </pre>
  43. <p class="noindent"><a name="index-precedence-255"></a><a name="index-operator-precedence-256"></a>The real grammar is consistent with this one but enforces right
  44. associativity for binary operations and higher precedence for juxtaposition
  45. without intervening white space.
  46. <p>The declaration of any identifier must be unique and must precede its
  47. occurrence in any expression. Hence, cyclic dependences between
  48. declarations and &ldquo;recursive&rdquo; declarations are not allowed.
  49. </body></html>