Write a Pascal program cross-referencer which will produce, for a given Pascal program, a list in alphabetical order, of all the identifiers used. Each identifier should be followed by a list, in numerical order, of the lines in which the identifier appeared. ( From Wirth (1976).)
Use a binary search tree to hold the identifiers and a linked linear list for the line numbers associated with each identifier.