E.4 Camille 2.χ: Non-recursive and Recursive Functions

Syntax

The following is a context-free grammar in EBNF for versions 2.χ of the Camille programming language through Chapter 11:

A list of context-free grammar in E B N F for versions 2 point x of Camille.
Description
Continuation of the list of context-free grammar in E B N F for versions 2 point x of Camille.
Description

Semantics

We desire user-defined functions to be first-class entities in Camille. This means that a function can be the return value of an expression (altering the expressed values) and can be bound to an identifier and stored in the environment of the interpreter (altering the denoted values). Adding user-defined, first-class functions to Camille alters its expressed and denoted values:

Two expressions. Expressed value equals integer union closure. Denoted value equals integer union closure.

Thus,

An expression. Expressed value equals denoted value equals integer union closure.

Recall, previously in Chapter 10 we had

An expression. Expressed value equals denoted value equals integer.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.248.0