DIRECTORY FS USING [OpenFile], Rope USING [ROPE], Symbols USING [SEIndex, SENull, ISEIndex, ISENull], SymbolTable USING [Base], BasicTime USING [GMT], TimeStamp USING [Stamp]; LupineSymbolTable: DEFINITIONS = BEGIN STBase: PRIVATE TYPE = SymbolTable.Base _ NIL | NULL; String: TYPE = Rope.ROPE _ StringNIL; StringNIL: String = NIL; -- Need nonNIL symbol so INLINEs compile OK. GMT: TYPE = BasicTime.GMT; VersionStamp: TYPE = TimeStamp.Stamp; TypeID: TYPE = RECORD [stamp: TimeStamp.Stamp, sei: Symbols.SEIndex]; OpenInterface: PROCEDURE [ interfaceFilename: String, interfaceCapability: FS.OpenFile ]; OpenError: ERROR [fileOrModuleName: String, why: OpenErrorCode]; OpenErrorCode: TYPE = {badFileFormat, badFileName, badFileVersion, notInterfaceModule}; CloseInterface: PROCEDURE; InterfaceInfo: TYPE = RECORD [ types, variables: BOOLEAN_FALSE, transfers: PACKED ARRAY TransferTypes OF BOOLEAN _ ALL[FALSE] ]; GetInterfaceInfo: PROCEDURE RETURNS [ contents: InterfaceInfo, moduleName, fileName: String, moduleVersion: VersionStamp, moduleCreateTime, sourceCreateTime: GMT ]; MaxVersionStampStringLength: INTEGER = 19; VersionStampString: PROCEDURE [stamp: VersionStamp] RETURNS [stampString: String]; SymbolHandle: TYPE = PRIVATE RECORD [ base: STBase, symbol: Symbols.ISEIndex] _ SymbolHandleNIL | NULL; SymbolHandleNIL: SymbolHandle = [NIL, Symbols.ISENull]; TypeHandle: TYPE = PRIVATE RECORD [ base: STBase, type: Symbols.SEIndex] _ TypeHandleNIL | NULL; TypeHandleNIL: TypeHandle = [NIL, Symbols.SENull]; Index: TYPE = INTEGER[0..LAST[INTEGER]]; -- Meaningful user origin is 1. DirectoryProcedure: TYPE = PROCEDURE [ moduleName, fileName: String, imported: BOOLEAN, directoryIndex: Index ] RETURNS [stop: BOOLEAN_FALSE]; EnumerateDirectory: PROCEDURE [proc: DirectoryProcedure] RETURNS [stopped: BOOLEAN_FALSE]; TransferProcedure: TYPE = PROCEDURE [ transfer: SymbolHandle, transferType: TypeHandle, kind: TransferTypes, argumentRecordType, resultRecordType: TypeHandle, transferIndex: Index] RETURNS [stop: BOOLEAN_FALSE]; EnumerateTransfers: PROCEDURE [ proc: TransferProcedure, all, procs, signals, errors: BOOLEAN _ FALSE] RETURNS [stopped: BOOLEAN_FALSE]; ComponentProcedure: TYPE = PROCEDURE [ component: SymbolHandle, componentType: TypeHandle, componentIndex: Index] RETURNS [stop: BOOLEAN_FALSE]; EnumerateRecord: PROCEDURE [ recordType: TypeHandle, proc: ComponentProcedure] RETURNS [stopped: BOOLEAN_FALSE]; VariantProcedure: TYPE = PROCEDURE [ variantTag: SymbolHandle, variantNumber: INTEGER[0..LAST[INTEGER]], -- Assigned by compiler. variantRecordType: TypeHandle, variantIndex: Index ] RETURNS [stop: BOOLEAN_FALSE]; EnumerateVariants: PROCEDURE [ variantPartType: TypeHandle, proc: VariantProcedure] RETURNS [stopped: BOOLEAN_FALSE]; Types: TYPE = { Definition, Basic, Transfer, Record, VariantPart, Pointer, Ref, Any, List, RelativePtr, Text, String, StringBody, Rope, Atom, Array, Descriptor, Sequence, Zone, Opaque, Null, Other}; TransferTypes: TYPE = { Procedure, Error, Signal, Port, Program, Process, Other}; BasicTypes: TYPE = { Unspecified, Integer, Cardinal, Nat, Word, Character, Boolean, Real, Subrange, Enumeration, Other}; ParamPassingMethod: TYPE = {standard, var, value, result, handle}; TypeInfo: TYPE = RECORD [ self: TypeHandle, long: BOOLEAN _ FALSE, readonly: BOOLEAN _ FALSE, passingMethod: ParamPassingMethod _ standard, info: SELECT type: Types FROM Null => [], -- Empty parameter records are Null. Definition => [], -- Not needed or implemented. Basic => [ kind: BasicTypes, origin: LONG INTEGER, -- Incorrect for Real. cardinality: LONG INTEGER], -- Incorrect for LONG INT & CARD, Real. Transfer => [ kind: TransferTypes, safe: BOOLEAN, argumentType, resultType: TypeHandle], Record => [ paramRecord, painted, monitored: BOOLEAN, uniField, hasVariants, hasSequences: BOOLEAN], VariantPart => [ tag: SELECT kind: * FROM Computed => [], Star => [name: SymbolHandle], Named => [name: SymbolHandle, type: TypeHandle], ENDCASE], Text => [], String => [], StringBody => [], Rope => [--Rope.ROPE--], Atom => [], Pointer => [referentType: TypeHandle], Ref => [referentType: TypeHandle], Any => [], List => [firstType, restType: TypeHandle], RelativePtr => [baseType, offsetType, resultType: TypeHandle], Array => [ packed: BOOLEAN, indexType, elementType: TypeHandle], Descriptor => [ packed: BOOLEAN, indexType, elementType: TypeHandle], Sequence => [ packed: BOOLEAN, indexType, elementType: TypeHandle, tagName: SELECT kind: * FROM Computed => [], Named => [name: SymbolHandle], ENDCASE], Zone => [ allocation: {Counted, Uncounted}, mdsZone: BOOLEAN ], Opaque => [lengthKnown: BOOLEAN], Other => [] ENDCASE _ Other[] ]; SymbolName: PROCEDURE [symbol: SymbolHandle] RETURNS [name: String]; IsAnonymous: PROCEDURE [symbol: SymbolHandle] RETURNS [yes: BOOLEAN]; SymbolType: PROCEDURE [symbol: SymbolHandle] RETURNS [type: TypeHandle]; SymbolUniqueID: PROCEDURE [symbol: SymbolHandle] RETURNS [uniqueID: SymbolID]; SymbolID: TYPE = LONG CARDINAL; MakeTypeID: PROC [t: TypeHandle] RETURNS [id: TypeID]; GetTypeInfo: PROCEDURE [type: TypeHandle] RETURNS [info: TypeInfo]; PutTypeName: PROCEDURE [ putProc: PROC[CHARACTER], type: TypeHandle, includeReadonly: BOOLEAN_TRUE, rootInterfaceOpenName: String_StringNIL, extraFirstArg: String _ NIL ]; QualifyOpenNames: PROCEDURE[qualify: BOOL] RETURNS [oldQualify: BOOL]; FullTypeName: TYPE = RECORD [module, name: String]; -- module.name. SearchTypeDefinition: PROCEDURE [ rootDef: TypeHandle, candidateDefs: LONG DESCRIPTOR FOR READONLY ARRAY OF FullTypeName ] RETURNS [indexOfMatch: INTEGER _ -1 --No match--]; Words: TYPE = LONG INTEGER; Size: PROCEDURE [type: TypeHandle] RETURNS [size: Words]; ComputeArraySize: PROCEDURE [index, elements: TypeHandle, packed: BOOLEAN] RETURNS [size: Words]; END. -- LupineSymbolTable. ΤLupineSymbolTable.mesa. Copyright c 1985 by Xerox Corporation. All rights reserved. Last edited by BZM on 2-May-82 22:47:03. Last Edited by: Birrell, September 8, 1983 3:39 pm Last Edited by: Swinehart, July 11, 1984 2:59:33 pm PDT Bob Hagmann February 8, 1985 4:58:47 pm PST This is a FRAME handle for all symbol table variables and procedures. This is a nonRope string alternative suitable for SDD. System-wide Unique ID for a version of a named type (independent of redefinitions) Interface file operations. ! OpenError[...]. This ERROR can come back from OpenError or EnumerateXXX. Symbols, types, and their enumerators. All enumerators can raise OpenError[...] when an implicitly referenced module is not found. Be sure to ENABLE! Declarations of detailed type information. Type and symbol operations. If TRUE, SymbolName will return a null string. Produces System-wide Unique ID for named type t. Size returns the compiler's size for a type. For variant records, it is size of the largest variant. For sequences, the size is zero. For sequence-containing records, the record's size assumes a sequence of zero size. For these sequences cases, and for descriptor bodies with bounded index types, use ComputeArraySize. Κ=˜headšœ™Icodešœ Οmœ1™<—Jšœ)™)Jšœ2™2™7L™+—J˜J˜šΟk ˜ Jšžœžœ ˜Jšœžœžœ˜Jšœžœ&˜3Jšœ žœ˜Jšœ žœžœ˜Jšœ žœ ˜J˜J˜—Jšœž œž˜'J˜J˜JšœE™E˜Jš œžœžœžœžœ˜5J˜J˜—Jšœ6™6˜Jšœžœžœ ˜%JšœžœΟc,˜FJ˜Jšžœžœ žœ˜Jšœžœ˜%J˜šœžœžœ0˜EJ™R—J˜J˜—Jšœ™˜šΟn œž œ˜J˜šœžœ ˜#Jšœ™J˜——šœ žœ0˜@Jšœ9™9J˜—šœžœ˜J˜AJ˜—Jš œž œ˜J˜šœžœžœ˜Jšœžœžœ˜ Jš œ žœžœžœžœžœžœ˜@J˜—š œž œžœ˜%˜J˜J˜Jšœ$žœ˜+J˜——Jšœžœ˜*J˜š œž œ˜3Jšžœ˜——J˜Jšœ&™&˜šœžœžœžœ˜%Jšœ<žœ˜AJ˜—Jšœ!žœ˜7J˜šœ žœžœžœ˜#Jšœ7žœ˜˜ Jšœžœ˜J˜$—˜Jšœžœ˜J˜$—˜ Jšœžœ˜J˜#šœ žœ ž˜J˜J˜Jšžœ˜ ——˜ J˜!Jšœ žœ˜—Jšœžœ˜!J˜ Jšžœ˜———J˜Jšœ™˜š  œž œ˜,Jšžœ˜J˜—Jš  œž œžœžœ˜EJšœ.™.J˜Jš  œž œžœ˜HJ˜Jš œž œžœ˜NJšœ žœžœžœ˜J˜•StartOfExpansion[]š  œžœžœ˜6J™0—J˜Jš  œž œžœ˜CJ˜š  œž œ˜Jšœ žœž œ˜J˜Jšœžœžœ˜J˜(Jšœ žœ˜—J˜š  œž œ žœžœžœ˜FJ˜—JšœžœžœŸ˜EJ˜š œž œ˜!J˜Jš œžœž œžœžœžœžœ˜CJšžœžœŸ œ˜2J˜J˜J˜—JšœB™BJšœD™DJšœE™EJšœC™CJšœ/™/J˜Jšœžœžœžœ˜J˜Jš œž œžœ˜9J˜š œž œ'žœ˜JJšžœ˜J˜J˜—JšžœŸ˜J˜——…—ώ$