program xref(input, output);
{ sccsid = '@(#)pxref.p 1.1 (Berkeley) %G%'; }
linebuf = array[1..linelength] of char;
filename = array [1..namesize] of char;
charclasses = (digit, letter, separator, illegal);
charclasstype = array[0..charclassize] of charclasses;
charclass :charclasstype;
a: array [1..alfasize] of char;
t: array [index] of word;
key: array [1..nk] of alfa;
function nokey(x: alfa): Boolean;
h := id.ord div 4096 mod p;
if t[h].key = id.a then begin
end else if t[h].key = empty then begin
writeln(' **** table full');
procedure printword(w: word);
if l = linesize then begin
if t[j].key < t[m].key then
t[m].first := t[i].first;
procedure readinput(var inpfile :filename);
{ actually should use ...
if n = maxlineno then begin
writeln(' text too long');
if inp^ = formfeed then begin
while not eof(inp) do begin
while inp^ <> '"' do begin
while not eoln(inp) do begin
while not eoln(inp) do begin
if (inp^ = ' ') or (inp^ = tab) then begin
end else if charclass[ord(inp^)] = letter then begin
until (charclass[ord(inp^)] <> letter) and
(charclass[ord(inp^)] <> digit);
end else if charclass[ord(inp^)] = digit then
until charclass[ord(inp^)] <> digit
else if inp^='''' then begin
end else if inp^ = '{' then begin
end else if inp^ = '(' then begin
if (scr[1] <> '-') or (scr[2] <> ' ') then begin
writeln('usage: pxref [ - ] file');
if (argc < 2) or (argc > 3) then begin
writeln('usage: pxref [ - ] file');
for k:= 0 to charclassize do
for k:=ord('a') to ord('z') do
for k:=ord('A') to ord('Z') do
for k:=ord('0') to ord('9') do
charclass[ord('_')]:=letter;
charclass[ord(' ')]:=separator;
charclass[ord(tab)]:=separator;
writeln(c1, ' identifiers', c2, ' occurrences');