have the corresponding right part evaluated.
ARITHMETIC EXPRESSION
SYNTAX
statement = conditional / unconditional;
unconditional = loopst / cases / cibtrikst / uist / treest /
block / null / exp;
conditional = "IF" conjunct "THEN" unconditional (
"ELSE" conditional /
.empty);
block = "begin" exp $('; exp) "end";
An expressions may be a statement. In conditional statements the
else part is optional while in expressions it is mandatory. This
is a side effect of the way the left part of the syntax rules are
ordered.
SEMI-TREE MANIPULATION AND TESTING
SYNTAX
treest = setpntr / insertpntr / deletepntr;
setpntr = "set" "pointer" pntrname "to" pntrexp;
pntrexp = direction pntrexp / pntrname;
insertpntr = "insert" pntrexp "as"
(("left" / "right") "brother") /
(("first" / "last: ) "daughter") "of" pntrexp;
direction =
"up" /
"down" /
"forward" /
"backward: /
"head" /
"tail";
plantree = "replace" pntrname "with" pntrexp;
deletepntr = "delete: pntrname;
tree = '( tree1 ') ;
tree1 = nodename $nodename ;
nodename = terminal / '( tree1 ');
terminal = treename / buffername / point ername;
treename = id;
treedecl = "pointer" .id / "tree" .id;
Extra parentheses in tree building results in linear subcategorization,
just as in LISP.
FLOW AND CONTROL
controlst = gost / subst / loopstr / casest;
GO TO STATEMENTS
gost = "GO" "TO" (labelv / .id);
assignlabel = "ASSIGN" .id "TO" labelv;
SUBROUTINES
subst = callst / returnst / cortnout;
callst = "CALL" procname (exp / .emptyu);
returnst = "RETURN" (exp / .empty);
cortnout = "STUFF" exp "IN" pipename;
cortnin = "FETCH" pipename;
FETCH is a builtin function whose value is computed by envoking
the named co-routine.
LOOP STATEMENTS
=7= |