Filed on: [Indigo]<CedarDocs>Language>CLRM.press
Last written: May 26, 1982
By: Butler Lampson
Cedar Language Reference Manual Version 3
Introduction
This Reference Manual is intended to grow to a complete description of the syntax and semantics of the Cedar Language. The only portion currently suitable for perusal by someone not intimately familiar with Cedar is the two-page Summary. It has been deliberately condensed in order to provide a compact reference about all essential features of the language; a one-page version is being considered.
The Summary is arranged in four columns:
Syntax: This is the reference grammar for the entire language, written in the variant of BNF described below.
Examples: This contains concrete examples of program fragments illustrating the grammatical rules in the preceding column.
Notes: This is information about typical usage, semantic restrictions not included in the syntax, etc.
Desugaring: For each Cedar construct that is not in the kernel language, this column shows how to rewrite it into a combination of kernel constructs. If you understand the kernel language and the notation for desugaring, it provides the formal semantics of Cedar.
The grammar is written in a variant of BNF:
Parentheses are for grouping.
item | item means choose one.
?item means zero or one occurrences of item.
item; ... means zero or more occurrences of item separated by ";". The separator could be something else (such as "," or ELSE), or absent.
item!.. means one or more occurrences of item.
·item indicates a nonrecommended usage.
Terminals are punctuation other than ()?| or one of these characters underlined, or anything in SMALL CAPS. Note that [] and {} are terminals, and do not denote optional occurrence and repetition as they do in many other variants of BNF.
In left-hand sides, small non-bold letters are comments, not part of the nonterminal name.