-- RTSymbolDefs.mesa
-- concrete variant TYPE definitions for symbol tables and related elements.
-- Last Modified By Paul Rovner On January 4, 1983 1:11 pm

DIRECTORY
BrandXSymbolDefs USING
[SymbolTableHandle, SymbolTableBase, SymbolIndex, SymbolIdIndex,
SymbolConstructorIndex, SymbolRecordIndex, SymbolContextIndex,
StandardSymbolContextIndex, SymbolNameIndex, SymbolModuleIndex, BodyIndex,
CallableBodyIndex, InnerCallableBodyIndex, BodyTableEntry, FineGrainTableEntry,
FineGrainTableHeader, ExtensionClass, TreeIndex, TreeLink, BlockContextLevel,
nullHandle, nullSymbolIndex, nullSymbolContextIndex, nullSymbolNameIndex,
nullModuleIndex, nullBodyIndex, rootBodyIndex, symbolIndexForTYPE,
symbolIndexForANY, thisModuleIndex, contextLevelZero, outerContextLevel,
typeCodeForINT, typeCodeForCHAR],
BrandYSymbolDefs USING
[SymbolTableHandle, SymbolTableBase, SymbolIndex, SymbolIdIndex,
SymbolConstructorIndex, SymbolRecordIndex, SymbolContextIndex,
StandardSymbolContextIndex, SymbolNameIndex, SymbolModuleIndex, BodyIndex,
CallableBodyIndex, InnerCallableBodyIndex, BodyTableEntry, FineGrainTableEntry,
FineGrainTableHeader, ExtensionClass, TreeIndex, TreeLink, BlockContextLevel,
nullHandle, nullSymbolIndex, nullSymbolContextIndex, nullSymbolNameIndex,
nullModuleIndex, nullBodyIndex, rootBodyIndex, symbolIndexForTYPE,
symbolIndexForANY, thisModuleIndex, contextLevelZero, outerContextLevel];

RTSymbolDefs: DEFINITIONS
= BEGIN OPEN bx: BrandXSymbolDefs, by: BrandYSymbolDefs;

Brand: TYPE = {x, y};

SymbolTableHandle: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.SymbolTableHandle],
y => [e: by.SymbolTableHandle]
ENDCASE];

SymbolTableBase: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.SymbolTableBase],
y => [e: by.SymbolTableBase]
ENDCASE];

SymbolIndex: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.SymbolIndex],
y => [e: by.SymbolIndex]
ENDCASE];
SymbolIdIndex: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.SymbolIdIndex],
y => [e: by.SymbolIdIndex]
ENDCASE];
SymbolConstructorIndex: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.SymbolConstructorIndex],
y => [e: by.SymbolConstructorIndex]
ENDCASE];
SymbolRecordIndex: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.SymbolRecordIndex],
y => [e: by.SymbolRecordIndex]
ENDCASE];

SymbolContextIndex: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.SymbolContextIndex],
y => [e: by.SymbolContextIndex]
ENDCASE];
StandardSymbolContextIndex: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.StandardSymbolContextIndex],
y => [e: by.StandardSymbolContextIndex]
ENDCASE];

SymbolNameIndex: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.SymbolNameIndex],
y => [e: by.SymbolNameIndex]
ENDCASE];

SymbolModuleIndex: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.SymbolModuleIndex],
y => [e: by.SymbolModuleIndex]
ENDCASE];

BodyIndex: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.BodyIndex],
y => [e: by.BodyIndex]
ENDCASE];
CallableBodyIndex: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.CallableBodyIndex],
y => [e: by.CallableBodyIndex]
ENDCASE];
InnerCallableBodyIndex: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.InnerCallableBodyIndex],
y => [e: by.InnerCallableBodyIndex]
ENDCASE];
BodyTableEntry: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.BodyTableEntry],
y => [e: by.BodyTableEntry]
ENDCASE];

FineGrainTableEntry: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.FineGrainTableEntry],
y => [e: by.FineGrainTableEntry]
ENDCASE];
FineGrainTableHeader: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.FineGrainTableHeader],
y => [e: by.FineGrainTableHeader]
ENDCASE];

ExtensionClass: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.ExtensionClass],
y => [e: by.ExtensionClass]
ENDCASE];

TreeIndex: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.TreeIndex],
y => [e: by.TreeIndex]
ENDCASE];
TreeLink: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.TreeLink],
y => [e: by.TreeLink]
ENDCASE];

BlockContextLevel: TYPE
= RECORD[SELECT brand: Brand FROM
x => [e: bx.BlockContextLevel],
y => [e: by.BlockContextLevel]
ENDCASE];

--Constants--
nullBase: SymbolTableBase = [x[e: NIL]];

nullHandle: SymbolTableHandle = [x[e: nullXHandle]];
nullXHandle: bx.SymbolTableHandle = bx.nullHandle;
nullYHandle: by.SymbolTableHandle = by.nullHandle;

nullSymbolIndex: SymbolIndex = [x[e: nullXSymbolIndex]];
nullXSymbolIndex: bx.SymbolIndex = bx.nullSymbolIndex;
nullYSymbolIndex: by.SymbolIndex = by.nullSymbolIndex;

nullSymbolContextIndex: SymbolContextIndex = [x[e: nullXSymbolContextIndex]];
nullXSymbolContextIndex: bx.SymbolContextIndex = bx.nullSymbolContextIndex;
nullYSymbolContextIndex: by.SymbolContextIndex = by.nullSymbolContextIndex;

nullSymbolNameIndex: SymbolNameIndex = [x[e: nullXSymbolNameIndex]];
nullXSymbolNameIndex: bx.SymbolNameIndex = bx.nullSymbolNameIndex;
nullYSymbolNameIndex: by.SymbolNameIndex = by.nullSymbolNameIndex;

nullModuleIndex: SymbolModuleIndex = [x[e: nullXModuleIndex]];
nullXModuleIndex: bx.SymbolModuleIndex = bx.nullModuleIndex;
nullYModuleIndex: by.SymbolModuleIndex = by.nullModuleIndex;

nullBodyIndex: BodyIndex = [x[e: nullXBodyIndex]];
nullXBodyIndex: bx.BodyIndex = bx.nullBodyIndex;
nullYBodyIndex: by.BodyIndex = by.nullBodyIndex;

rootBodyIndex: BodyIndex = [x[e: rootXBodyIndex]];
rootXBodyIndex: bx.BodyIndex = bx.rootBodyIndex;
rootYBodyIndex: by.BodyIndex = by.rootBodyIndex;

symbolIndexForTYPE: SymbolConstructorIndex = [x[e: symbolXIndexForTYPE]];
symbolXIndexForTYPE: bx.SymbolConstructorIndex = bx.symbolIndexForTYPE;
symbolYIndexForTYPE: by.SymbolConstructorIndex = by.symbolIndexForTYPE;

symbolIndexForANY: SymbolConstructorIndex = [x[e: symbolXIndexForANY]];
symbolXIndexForANY: bx.SymbolConstructorIndex = bx.symbolIndexForANY;
symbolYIndexForANY: by.SymbolConstructorIndex = by.symbolIndexForANY;

thisModuleIndex: SymbolModuleIndex = [x[e: thisXModuleIndex]];
thisXModuleIndex: bx.SymbolModuleIndex = bx.thisModuleIndex;
thisYModuleIndex: by.SymbolModuleIndex = by.thisModuleIndex;

contextLevelZero: BlockContextLevel = [x[e: contextXLevelZero]];
contextXLevelZero: bx.BlockContextLevel = bx.contextLevelZero;
contextYLevelZero: by.BlockContextLevel = by.contextLevelZero;

outerContextLevel: BlockContextLevel = [x[e: outerXContextLevel]];
outerXContextLevel: bx.BlockContextLevel = bx.outerContextLevel;
outerYContextLevel: by.BlockContextLevel = by.outerContextLevel;

typeCodeForINT: CARDINAL = bx.typeCodeForINT; -- BEWARE

typeCodeForCHAR: CARDINAL = bx.typeCodeForCHAR; -- BEWARE

END.