Cedar.abbreviations
Copyright © 1982, 1983, 1984, 1985 by Xerox Corporation. All rights reserved.
Bill Paxton, July 13, 1982 11:54 am
Warren Teitelman, April 11, 1983 11:17 am
Doug Wyatt & Michael Plass, December 16, 1983 3:54 pm
Michael Plass, July 30, 1984 1:27:07 pm PDT
Rick Beach, May 30, 1985 5:25:56 pm PDT (Cedar6.0)
Some general remarks about abbreviations:
The syntax of an abbreviation is <keyName> [(optional Tioga command list)] = <replacement>
The abbreviation must be at the first level of the <style>.abbreviations document.
The <replacement> may have substructure that is considered part of the replacement.
The optional Tioga command list, surrounded in parentheses, applies to the expanded text with the caret at the beginning of the replacement. These commands are the same as DoTiogaOps commands or EditTool operations.
The <replacement> may have substructure, like prog below, which is copied after the node containing the abbreviation to be expanded.
If the <replacement> is empty but there is substructure, then the substructure is added at the same level in the document as the node containing the abbreviation.
Module Declarations
The following abbreviations produce templates for Cedar programs, monitors, and definitions.
The style conforms to the conventions used in the Cedar 6.0 public interfaces.
prog (NextPlaceholder) =
Name: CEDAR PROGRAM
IMPORTS ImportsList
EXPORTS ExportsList
~ BEGIN
Body
END.
monitor (NextPlaceholder) =
Name: CEDAR MONITOR
LOCKS LocksClause
IMPORTS ImportsList
EXPORTS ExportsList
~ BEGIN
Body
END.
defs (NextPlaceholder) =
Name: CEDAR DEFINITIONS
~ BEGIN
Body
END.
directory = DIRECTORY
Interface USING [Item],
Interface USING [Item];
dir = DIRECTORY
Interface USING [Item],
Interface USING [Item];
using = USING [Name],
Procedure Declarations
proc = Name: PROC [Args] RETURNS [Results] ~ {
Body
};
pproc = Name: PUBLIC PROC [Args] RETURNS [Results] ~ {
Body
};
eproc = Name: ENTRY PROC [Args] RETURNS [Results] ~ {
ENABLE UNWIND => RestoreInvariant;
Body
};
peproc = Name: PUBLIC ENTRY PROC [Args] RETURNS [Results] ~ {
ENABLE UNWIND => RestoreInvariant;
Body
};
iproc = Name: INTERNAL PROC [Args] RETURNS [Results] ~ {
Body
};
Conditional Statements and Select Statements
if = IF Test THEN TruePart
else = ELSE FalsePart
select = SELECT Item FROM
TestList => Statement;
ENDCASE => Statement;
sel = SELECT Item
from = FROM
TestList => Statement;
ENDCASE => Statement;
with = WITH Item SELECT FROM
ChoiceList => Statement;
ENDCASE => Statement;
Block Related Statments
begin = BEGIN
Body
END;
{ = {
Body
};
[ = [
Body
];
exits = EXITS
LabelList => Statement;
goto = GO TO Label
Loop Control Statements
do = DO
Body
ENDLOOP;
for = FOR ControlVariable: Type ← InitialExpr, NextExpr DO
Body
ENDLOOP;
in = FOR ControlVariable: Type IN LoopRange DO
Body
ENDLOOP;
through = THROUGH LoopRange DO
Body
ENDLOOP;
until = UNTIL Test DO
Body
ENDLOOP;
while = WHILE Test DO
Body
ENDLOOP;
repeat = REPEAT
LabelList => Statement;
FINISHED => Statement;
exit = EXIT
Miscellaneous
return = RETURN [results]
ret = RETURN [results]
returns = RETURNS [results]
rets = RETURNS [results]
type = name: TYPE ~ type declaration;
rec = RECORD [
field: type ← initial value,
field: type ← initial value
];
The following abbreviations are meant to be somewhat general purpose.
Therefore they should have no format, so that they do not impose a format on the node containing the expansion.
file = [server]<dir>subdir>name
cop = Copyright (C) 1984, 1985 by Xerox Corporation. All rights reserved.