File information: | |
File name: | SymbolTable.mesa_Oct77.pdf [preview SymbolTable.mesa_Oct77] |
Size: | 229 kB |
Extension: | |
Mfg: | xerox |
Model: | SymbolTable.mesa_Oct77 🔎 |
Original: | SymbolTable.mesa_Oct77 🔎 |
Descr: | xerox mesa 3.0_1977 listing SymbolTable.mesa_Oct77.pdf |
Group: | Electronics > Other |
Uploaded: | 11-09-2019 |
User: | Anonymous |
Multipart: | No multipart |
Information about the files in archive: | ||
Decompress result: | OK | |
Extracted files: | 1 | |
File name SymbolTable.mesa_Oct77.pdf symboltable.mesa 24-0CT-77 18:44:36 Page 1 -- file SymbolTable.Mesa -- last modified by Barbara, October 3, 1977 11:24 AM DIRECTORY AltoDers: FROM "altodefs", ControlDefs: FROM "controldefs", InlineDefs: FROM "inlinedefs", StringDefs: FROM "stringdefs", TableDefs: FROM "tabledefs", SymTabDefs: FROM "symtabders", SymDefs: FROM "symdefs"; SymbolTable: PROGRAM IMPORTS StringDefs EXPORTS SymTabDefs SHARES SymDefs PUBLIC BEGIN OPEN SymDefs; -- tables defining the current symbol table hashvec: DESCRIPTOR FOR ARRAY OF HTIndex; -- hash index ht: DESCRIPTOR FOR ARRAY --HTIndex-- OF HTRecord; -- hash table ssb: STRING; id string seb: TableDefs.TableBase; se table ctxb: TableDefs.TableBase; context table mdb: TableDefs.TableBase; module directory base bb: TableDefs.TableBase; body table stHandle: POINTER TO STHeader; -- info defining the source file links sourcefile: STRING; fgt: DESCRIPTOR FOR ARRAY OF FGTEntry; ignorecases: BOOLEAN; -- the following orocedure is called if the base values change notifier: PROCEDURE [POINTER TO FRAME[SymbolTable]]; NullNotifier: PROCEDURE [POINTER TO FRAME[SymbolTable]] = BEGIN RETURN END; SubString: TYPE = StringDefs.SubString; hashvalue: PROCeDURE (s: SubString] RETURNS [HVIndex] = BEGIN -- computes the hash index for string s CharBits: MACHINe CODE (CHARACTER, WORD] RETURNS (WORD] LOOPHOLE(InlineDefs.BITAND]; mask: WORD = 337B; -- masks out ASCII case shifts n: CARDINAL = s. length; b: STRING = s.base; v: WORD; v p CharBits(b(s.offset]. mask]*177B + CharBits(b(s.offset+(n-1)]. maSk]; RETURN (InlineDefs.BITXOR(v, n*17B] MOD LENGTH(hashvec]] END; FindString: PROCEDURE (s: SubString] RETURNS [found: BOOLEAN, hti: HTIndex] BEGIN OPEN StringDefs; desc: SubSlringOescriptor; ss: SubString = @desc; hli p has~vec[hashvalue[s]]; WIITl [ ht i # IITNull DO SubSlringforllash[ss, hli]; round p (Tr ignorecases TlirN EquivalentSubStrings rLS[ rqualSubStrings)[s,ss]: Ir round TllfN RfTURN; hti .. hl[hti].l ink; fNOIOOP; RfTURN [fAt Sf. IITNu 11] rNO; symboltable.mesa 24-0CT-77 18:44:36 Page 2 SubStringForHash: PROCEDURE [s: SubString, hti: HTlndex] = BEGIN -- gets string for hash table entry s.base .. ssb: IF hti = HTNull THEN s.offset .. s.length .. 0 ELSE BEGIN s.offset .. ht[hti].ssIndex: s.length .. ht[hti+1].ssIndex - s.offset: END: RETURN END: hashforse: PROCEDURE [sei: ISEIndex] RETURNS [HTIndex] BEGIN RETURN [(seb+sei).htptr] END: searchcontext: PROCEDURE [hti: HTIndex, ctx: CTXIndex] RETURNS [BOOLEAN, ISEIndex] = BEGIN sei, root: ISEIndex: |
Date | User | Rating | Comment |