[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.7.4.1 Syntax

silly 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.

 
program ::= declaration*

declaration ::= identifier = expression

expression ::= () | identifier
                    | (expression)
                    | (expression,expression)
                    | expression expression
                    | expression(expression)
                    | expression(expression,expression)

The real grammar is consistent with this one but enforces right associativity for binary operations and higher precedence for juxtaposition without intervening white space.

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.


This document was generated on December 10, 2012 using texi2html 1.82.