1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <html lang="en">
- <head>
- <title>Syntax - avram - a virtual machine code interpreter</title>
- <meta http-equiv="Content-Type" content="text/html">
- <meta name="description" content="avram - a virtual machine code interpreter">
- <meta name="generator" content="makeinfo 4.13">
- <link title="Top" rel="start" href="index.html#Top">
- <link rel="up" href="A-Simple-Lisp-Like-Language.html#A-Simple-Lisp-Like-Language" title="A Simple Lisp Like Language">
- <link rel="prev" href="A-Simple-Lisp-Like-Language.html#A-Simple-Lisp-Like-Language" title="A Simple Lisp Like Language">
- <link rel="next" href="Semantics.html#Semantics" title="Semantics">
- <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
- <meta http-equiv="Content-Style-Type" content="text/css">
- <style type="text/css"><!--
- pre.display { font-family:inherit }
- pre.format { font-family:inherit }
- pre.smalldisplay { font-family:inherit; font-size:smaller }
- pre.smallformat { font-family:inherit; font-size:smaller }
- pre.smallexample { font-size:smaller }
- pre.smalllisp { font-size:smaller }
- span.sc { font-variant:small-caps }
- span.roman { font-family:serif; font-weight:normal; }
- span.sansserif { font-family:sans-serif; font-weight:normal; }
- --></style>
- </head>
- <body>
- <div class="node">
- <a name="Syntax"></a>
- <p>
- Next: <a rel="next" accesskey="n" href="Semantics.html#Semantics">Semantics</a>,
- Previous: <a rel="previous" accesskey="p" href="A-Simple-Lisp-Like-Language.html#A-Simple-Lisp-Like-Language">A Simple Lisp Like Language</a>,
- Up: <a rel="up" accesskey="u" href="A-Simple-Lisp-Like-Language.html#A-Simple-Lisp-Like-Language">A Simple Lisp Like Language</a>
- <hr>
- </div>
- <h5 class="subsubsection">2.7.4.1 Syntax</h5>
- <p><code>silly</code> has no reserved words, but it has equals signs, commas and
- parentheses built in. A concise but ambiguous grammar for it can be given
- as follows.
- <a name="index-syntax-253"></a><a name="index-grammar-254"></a>
- <pre class="display">
- <var>program</var> ::= <var>declaration</var>*
-
- <var>declaration</var> ::= <var>identifier</var> <code>=</code> <var>expression</var>
-
- </pre>
- <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
- associativity for binary operations and higher precedence for juxtaposition
- without intervening white space.
- <p>The declaration of any identifier must be unique and must precede its
- occurrence in any expression. Hence, cyclic dependences between
- declarations and “recursive” declarations are not allowed.
- </body></html>
|