Trailing-Edge
-
PDP-10 Archives
-
decuslib10-12
-
43,50552/sym0r.def
There are no other files named sym0r.def in the archive.
{------------------------------------------------------------------------}
{--------------------------------------/ \----}
{---- ----! definitions for the !----}
{---- S Y M T A B . D E F ----! symbol-table version 3.2 !----}
{---- ----! (dummy symtab option) !----}
{--------------------------------------\ ("no-shit" version) /----}
{------------------------------------------------------------------------}
CONST
table_max = 10000 { max. hash table size (objects) };
cluster_size = 3 { size of property clusters };
err_max = 299 { highest SYMTAB error code };
no_error = 0 { indicates no errors };
schar_min = 00b { lowest SIXBIT character };
schar_max = 77b { highest SIXBIT character };
name_length = 6 { identifier (name) length };
TYPE
large = 1..50000 { some "large" subrange };
name_type = PACKED ARRAY [1..name_length] OF schar_min..schar_max;
char_name = PACKED ARRAY [1..name_length] OF char;
err_type = -1..err_max { possible error codes };
table_index = 0..table_max;
word = integer;
thing = ARRAY [1..cluster_size] OF word { property element cluster };
prop_kind = (p_scalar, p_boolean,
p_sequence, p_stack, p_queue,
p_set,
p_array);
table_list = ^r_table_list;
hash_table = ^h_table;
object = ^r_object;
property = ^r_property;
cluster = ^r_cluster;
list = ^r_list;
arrayptr = ^r_array;
order = (s_lt, s_eq, s_gt);
r_list = RECORD { "scalar" list }
data : word;
link : PACKED RECORD
last,
next : list;
END;
END;
r_array = ARRAY [large] OF word { some large array };
r_cluster = RECORD { property cluster }
data : thing;
link : PACKED RECORD
last,
next : cluster;
END;
END;
r_table_list= PACKED RECORD { list of hash tables }
table : hash_table;
next : table_list;
END;
table_entry = object { entries in the hash table };
vector = ARRAY [0..table_max] OF table_entry;
h_table = RECORD
name : name_type { the table's name };
level { scope level },
maxdepth { max. search depth },
nhash { # hashes },
nrehash : integer { # rehashes };
nused { symbols used },
size : 0..table_max { the table's size };
write_enabled,
sorted : boolean;
next : hash_table { the next table };
table : ^vector { the table itself };
END;
r_property = RECORD { property header }
name : name_type;
obj : object { "parent" object };
previous,
next : property { bi-linked list for properties };
CASE kind : prop_kind OF
p_boolean : ();
p_scalar : (wvalue : word);
p_array : (avalue : arrayptr;
asize : integer);
p_sequence : (current,
first,
last : PACKED RECORD
main : cluster;
index : 0..cluster_size;
END;
);
p_queue : (head,
tail : list;
);
p_stack : (top,
bottom : list;
);
p_set : (e_first,
e_last,
e_current : list;
cardinality : integer;
);
END;
r_object = RECORD { definition of objects }
name : name_type { the object's name };
table : hash_table { "parent" hash table };
index : -1..table_max; { points back to hash table }
kind,
value : integer { so-called "immediate properties" };
properties : property { header to list of properties };
next : object { linked list for "free" objects };
END;
{>>>> Initialization & error reporting procedures <<<<}
PROCEDURE SymIni; EXTERN;
{>>>> General purpose conversion procedures <<<<}
FUNCTION StProp ( thing : word) : property; EXTERN;
FUNCTION SfProp ( prop : property) : word; EXTERN;
FUNCTION StObj ( thing : word) : object; EXTERN;
FUNCTION SfObj ( obj : object) : word; EXTERN;
FUNCTION StTab ( thing : word) : hash_table; EXTERN;
FUNCTION SfTab ( tab : hash_table) : word; EXTERN;
FUNCTION StInt ( thing : word) : integer; EXTERN;
FUNCTION SfInt ( int : integer) : word; EXTERN;
FUNCTION StReal ( thing : word) : real; EXTERN;
FUNCTION SfReal ( r : real) : word; EXTERN;
FUNCTION StChar ( thing : word) : char; EXTERN;
FUNCTION SfChar ( c : char) : word; EXTERN;
FUNCTION StBool ( thing : word) : boolean; EXTERN;
FUNCTION SfBool ( b : boolean) : word; EXTERN;
PROCEDURE StPtr (VAR ptr : pointer;
int : word); EXTERN;
PROCEDURE SfPtr ( ptr : pointer;
VAR int : word); EXTERN;
{>>>> Name manipulation procedures <<<<}
PROCEDURE Sf6Name ( name : name_type;
VAR extnm : char_name); EXTERN;
PROCEDURE St6Name (VAR name : name_type;
extnm : char_name); EXTERN;
PROCEDURE Sf7Name ( name : name_type;
VAR extnm : char_name); EXTERN;
PROCEDURE St7name (VAR name : name_type;
extnm : char_name); EXTERN;
FUNCTION SeqNames ( name1,
name2 : name_type) : boolean; EXTERN;
FUNCTION ScmNames ( name1,
name2 : name_type) : order; EXTERN;
PROCEDURE S2Cases ( on : boolean); EXTERN.