RoseTranslateTypes.Mesa
Last Edited by: Spreitzer, March 15, 1984 10:11:21 am PST
Last Edited by: Barth, March 8, 1983 10:43 am
DIRECTORY
OrderedSymbolTableRef, Rope, RoseTypes, TextNode;
RoseTranslateTypes: CEDAR DEFINITIONS =
BEGIN
Familiar Types:
LORA: TYPE = LIST OF REF ANY;
ROPE: TYPE = Rope.ROPE;
RopeList: TYPE = LIST OF ROPE;
SymbolTable: TYPE = OrderedSymbolTableRef.Table;
NodeType: TYPE = RoseTypes.NodeType;
Mesa: TYPE = RoseTypes.Mesa;
Parse Tree Types:
SymbolTableEntry: TYPE = REF SymbolTableEntryRep;
SymbolTableEntryRep: TYPE = RECORD [
name: ROPE,
value: SELECT type: SymbolTableEntryType FROM
nodeTypeConstructor => [stc: NodeTypeConstructor],
cellClass => [
definedIn: ROPE,
cd: CellDef],
node => [nodeType: NodeType],
ENDCASE];
SymbolTableEntryType: TYPE = {nodeTypeConstructor, cellClass, node};
stcEntry: TYPE = REF SymbolTableEntryRep[nodeTypeConstructor];
ccEntry: TYPE = REF SymbolTableEntryRep[cellClass];
nodeEntry: TYPE = REF SymbolTableEntryRep[node];
DigestedInterface: TYPE = REF DigestedInterfaceRep;
DigestedInterfaceRep: TYPE = RECORD [
asTable: SymbolTable,
asList: InterfaceEltList,
hasSwitchElt: BOOLFALSE];
InterfaceEltList: TYPE = LIST OF InterfaceElt;
InterfaceElt: TYPE = REF InterfaceEltRep;
InterfaceEltRep: TYPE = RECORD [
name: ROPE,
sti: SignalTypeInvocation,
input, output, spare: BOOLEANFALSE,
switches: RopeList ← NIL];
Invocation: TYPE = RECORD [
name: ROPE,
parms: REF ANY--UNION [BindingList, Args]
];
SignalTypeInvocation: TYPE = REF SignalTypeInvocationRep;
SignalTypeInvocationRep: TYPE = RECORD [
st: NodeType,
invocation: Invocation];
Application: TYPE = REF ApplicationRep;
ApplicationRep: TYPE = RECORD [
fn: ROPE,
args: REF ANY, --UNION [BindingList, Args]
initData: ROPENIL];
Args: TYPE = REF ArgsRep;
ArgsRep: TYPE = RECORD [
args: LIST OF Arg];
Arg: TYPE = REF ANY; --UNION [ROPE, Quoted, REF INT]
CellDef: TYPE = REF CellDefRep;
CellDefRep: TYPE = RECORD [
interface: DigestedInterface ← NIL,
stateInittable: BOOLEANFALSE,
defaultInitDataGiven, initDataGiven, stateGiven, initializerGiven, bbTestGiven, stTestGiven, expandGiven, defaultInitExprGiven: BOOLFALSE,
evalsGiven: ARRAY EvalType OF BOOLEANALL[FALSE],
defaultInitDataSource, initDataSource, stateSource, initializerSource, bbTestSource, stTestSource: CedarSource ← NIL,
evalSources: ARRAY EvalType OF CedarSource ← ALL[NIL],
expandCode: Statements ← NIL,
defaultInitExpr: ROPENIL,
portCount: CARDINAL ← 0];
EvalType: TYPE = {ValsChanged, InitQ, PropQ, InitUD, PropUD, FinalUD, EvalSimple, FindVicinity};
CedarSource: TYPE = REF CedarSourceRep;
CedarSourceRep: TYPE = RECORD [parent: TextNode.Ref];
CedarLiteral: TYPE = REF CedarLiteralRep;
CedarLiteralRep: TYPE = RECORD [cedar: ROPE];
BindingList: TYPE = LIST OF Binding;
Binding: TYPE = REF BindingRep;
BindingRep: TYPE = RECORD [
name: ROPE,
value: REF ANY,
initial: ROPENIL];
Quoted: TYPE = REF QuotedRep;
QuotedRep: TYPE = RECORD [rope: ROPE];
Statements: TYPE = REF StatementsRep;
StatementsRep: TYPE = RECORD [
statements: LORA,
hasRefs: BOOLFALSE];
SquareBracketed: TYPE = REF SquareBracketedRep;
SquareBracketedRep: TYPE = RECORD [iel: InterfaceEltList];
Vars:
error: REF ANY;
Defining Node Types:
NodeTypeConstructor: TYPE = PROC [parms: REF ANY --UNION [BindingList, Args]--]
RETURNS [type: NodeType];
--ERRORS TypeConstructionError[msg: ROPE]
TypeConstructionError: ERROR [msg: ROPE];
GetParm: PROC [n: [1..LAST[INTEGER]], name: ROPE, parms: REF ANY, default: REF ANY ← noDefault] RETURNS [it: REF ANY];
noDefault: REF ANY;
See SignalTypeRegistration
END.