| command | C | ::= | V
=
E
E
| ||||
| expression | E | ::= | N
V
Q
L
F
F
:
E
(
E
)
| ||||
if:[
E
E
E
]
| |||||||
let:[
I
E
E
]
| |||||||
rec:[
I
E
E
]
| |||||||
fix:[
E
!
E
]
| |||||||
| function | F | ::= | primop
(\
I
.
E
)
E
:
F
| ||||
| list | L | ::= | []
[
E
E
]
[
E
E
*]
[
E
E
!
E
]
| ||||
| identifier | I | ::= | V
[
I
I
]
[
I
I
!
I
]
| ||||
| quotation | Q | ::= | ^
E
"
string.of.characters
"
| ||||
| name | V | ::= | simple.identifier
| number
| N
| ::=
| integer.numeral
|
floating.point.numeral
|
| command | ::= | assignment expression |
| assignment | ::= | V = expression |
| Top level, global assignment of a value to a name. The name
must be a simple identifier. Any subsequent occurance of
this name evaluates to the assigned value. In other words, assigned values override bound values, resulting in name-space interference. | ||
| expression | ::= | number name quotation list function application parenthesized expression conditional let-expression rec-expression fix-expression |
| Daisy is an expression oriented language. Except at top level, all forms are regarded as expressions and are reduced to values, a process called evaluation. | ||
| quotation | ::= | ^
expression " string.of.characters " |
| A quotation is a literal form of expression, whose value is the quoted object. A the value of a data quotation, ^e, is the quoted object, which may be any Daisy form. A string quotation specifies a literal string consisting of the characters between the `"' marks. Within a quoted string, the escape character "` (back-quote) is used to insert special characters (e.g. `", ``, and nonprinting codes) |