RoseTranslateTypes.Mesa
Last Edited by: Spreitzer, July 15, 1985 8:30:06 pm PDT
Last Edited by: Barth, March 8, 1983 10:43 am
Last Edited by: Gasbarro, August 16, 1984 2:11:17 pm PDT
DIRECTORY OperatorPrecedenceParse, RedBlackTree, Rope, RoseTypes, TextNode;
RoseTranslateTypes: CEDAR DEFINITIONS =
BEGIN
Familiar Types:
LORA: TYPE = LIST OF REF ANY;
LOLORA: TYPE = LIST OF LORA;
ROPE: TYPE = Rope.ROPE;
RopeList: TYPE = LIST OF ROPE;
SymbolTable: TYPE = RedBlackTree.Table;
NodeType: TYPE = RoseTypes.NodeType;
Mesa: TYPE = RoseTypes.Mesa;
SourceRange: TYPE = OperatorPrecedenceParse.SourceRange;
nullSR: SourceRange = OperatorPrecedenceParse.nullSR;
Assertions: TYPE = RoseTypes.Assertions;
Parse Tree Types:
SymbolTableEntry: TYPE = REF SymbolTableEntryRep;
SymbolTableEntryRep: TYPE = RECORD [
name: ROPE,
value: SELECT type: SymbolTableEntryType FROM
nodeTypeConstructor => [stc: NodeTypeConstructor],
cellClass => [
isVar: BOOL,
definedIn: ROPE,
NIL means this is being supplied as error recovery;
"" means this has no defining module.
cd: CellDef],
node => [nodeType: NodeType],
cellFn => [
definedIn: ROPE,
cf: CellFn],
ENDCASE];
SymbolTableEntryType: TYPE = {nodeTypeConstructor, cellClass, node, cellFn};
stcEntry: TYPE = REF SymbolTableEntryRep[nodeTypeConstructor];
ccEntry: TYPE = REF SymbolTableEntryRep[cellClass];
cfEntry: TYPE = REF SymbolTableEntryRep[cellFn];
nodeEntry: TYPE = REF SymbolTableEntryRep[node];
DigestedInterface: TYPE = REF DigestedInterfaceRep;
DigestedInterfaceRep: TYPE = RECORD [
sr: SourceRange,
asTable: SymbolTable,
asList: InterfaceEltList,
hasSwitchElt, hasSwitchInstruction: BOOLFALSE];
InterfaceEltList: TYPE = LIST OF InterfaceElt;
InterfaceElt: TYPE = REF InterfaceEltRep;
InterfaceEltRep: TYPE = RECORD [
sr: SourceRange,
name: ROPE,
sti: SignalTypeInvocation,
input, output, spare: BOOLEANFALSE,
assertions: Assertions ← NIL];
Invocation: TYPE = RECORD [
sr: SourceRange,
name: ROPE,
parms: REF ANY--UNION [BindingList, Args]
];
SignalTypeInvocation: TYPE = REF SignalTypeInvocationRep;
SignalTypeInvocationRep: TYPE = RECORD [
sr: SourceRange,
st: NodeType,
invocation: Invocation];
Application: TYPE = REF ApplicationRep;
ApplicationRep: TYPE = RECORD [
sr: SourceRange,
subject: REF ANY, --UNION [ID, Application]
args: REF ANY --UNION [BindingList, Args]
];
Args: TYPE = REF ArgsRep;
ArgsRep: TYPE = RECORD [
sr: SourceRange,
args: ArgList];
ArgList: TYPE = LIST OF Arg;
Arg: TYPE = REF ANY; --UNION [ID, Quoted, Int, Reel, Dotdot, Application, Cat, Args]
ID: TYPE = REF IDRep;
IDRep: TYPE = RECORD [sr: SourceRange, rope: ROPE];
Quoted: TYPE = REF QuotedRep;
QuotedRep: TYPE = RECORD [sr: SourceRange, rope: ROPE];
Int: TYPE = REF IntRep;
IntRep: TYPE = RECORD [
sr: SourceRange,
i: INT];
Reel: TYPE = REF ReelRep;
ReelRep: TYPE = RECORD [
sr: SourceRange,
r: REAL];
Dotdot: TYPE = REF DotdotRep;
DotdotRep: TYPE = RECORD [
sr: SourceRange,
first, last: INT];
Cat: TYPE = REF CatRep;
CatRep: TYPE = RECORD [
sr: SourceRange,
kittens: ArgList];
CellFn: TYPE = REF CellFnRep;
CellFnRep: TYPE = RECORD [
sr: SourceRange,
args: BindingList ← NIL,
cd: CellDef ← NIL,
howToApply: CedarChildren ← NIL];
CellDef: TYPE = REF CellDefRep;
CellDefRep: TYPE = RECORD [
sr: SourceRange,
interfaceLiteral: DigestedInterface ← NIL,
interfaceSource: CedarChildren ← NIL,
stateInittable, nameIsLiteral: BOOLEANFALSE,
literalName: ROPENIL,
nameSource: CedarChildren ← NIL,
sfSource, initializerSource, initCTPropsSource: CedarChildren ← NIL,
evals: ARRAY EvalType OF CedarChildren ← ALL[NIL],
auxes: ARRAY AuxClass OF ARRAY AuxVal OF CedarExpression ← ALL[ALL[NIL]],
expandCode: Statements ← NIL,
tests: TestList ← NIL,
portCount: CARDINAL ← 0,
assertions: Assertions ← NIL,
forFn: CellFn ← NIL];
EvalType: TYPE = {ValsChanged, InitQ, PropQ, InitUD, PropUD, FinalUD, EvalSimple, EnumerateVicinity};
TestList: TYPE = LIST OF TestNote;
TestNote: TYPE = REF TestNoteRep;
TestNoteRep: TYPE = RECORD [
sr: SourceRange,
name: ROPE,
code: CedarChildren,
stateToo: BOOL];
AuxClass: TYPE = {SwitchIO, SimpleIO, State, Drive};
AuxVal: TYPE = {Ref, Rec, Val};
Auxed: TYPE = REF AuxedRep;
AuxedRep: TYPE = RECORD [
sr: SourceRange,
val: AuxVal,
subject: CedarExpression];
CedarExpression: TYPE = REF CedarExpressionRep;
CedarExpressionRep: TYPE = RECORD [
sr: SourceRange,
kind: CedarExpressionKind,
rope: ROPE];
CedarExpressionKind: TYPE = {cedarLiteral, ropeLiteral, id, internal};
InterfaceCedar: TYPE = REF InterfaceCedarRep;
InterfaceCedarRep: TYPE = RECORD [cc: CedarChildren];
CedarChildren: TYPE = REF CedarChildrenRep;
CedarChildrenRep: TYPE = RECORD [sr: SourceRange, parent: TextNode.Ref];
RefAnyList: TYPE = REF RefAnyListRep;
RefAnyListRep: TYPE = RECORD [
sr: SourceRange,
l: LORA];
BindingList: TYPE = LIST OF Binding;
Binding: TYPE = REF BindingRep;
BindingRep: TYPE = RECORD [
sr: SourceRange,
name: ROPE,
value: REF ANY,
assertions: Assertions ← NIL,
initialValue: REF ANY --UNION [CedarExpression, Formatted]--NIL,
initialData: CedarExpression ← NIL];
Formatted: TYPE = REF FormattedRep;
FormattedRep: TYPE = RECORD [
sr: SourceRange,
value: CedarExpression,
format: Quoted];
Statements: TYPE = REF StatementsRep;
StatementsRep: TYPE = RECORD [
sr: SourceRange,
statements: LORA,
hasRefs: BOOLFALSE];
SquareBracketed: TYPE = REF SquareBracketedRep;
SquareBracketedRep: TYPE = RECORD [
sr: SourceRange,
subject: REF ANY --UNION [InterfaceElementList, BindingList, Args]--];
Equivalence: TYPE = REF EquivalenceRep;
EquivalenceRep: TYPE = RECORD [
sr: SourceRange,
a, b: Arg --NodeExpression--];
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.