.TITLE PASREF .C ;PASREF: .C ;A Pascal Cross Reference Program .C ;Bill Heidebrecht .C ;TRW DSSG .C ;One Space Park .C ;Redondo Beach, CA 90278 .S 1 .C ;Version 1C - 10 Nov 1977 .S 2 .P 5,1,3 PASREF is a Pascal cross reference program based on a similar program by Niklaus Wirth in "Algorithms + Data Structures = Programs" (pp. 206 - 210). The current version is implemented with the BSM Pascal compiler running under RSX-11M and -11D, but could be moved to another system with a little effort. A modified version (not on the present distribution tape) is available for use with Per Brinch Hansen's SOLO operating system. .P 5,1,3 There are two versions of this program: PASREF and PASRF2. PASREF is intended for use with source programs whose Pascal reserved words are typed in lower case. References are printed for all identifiers typed in upper case. PASRF2 is intended for use with programs whose Pascal reserved words are typed in upper case. References are printed for identifiers typed in upper case which are not Pascal reserved words. PASRF2 can be used with either kind of source program. .P 5,1,3 Since PASREF stores all references on the Pascal heap until the last line of the source file has been read, it is possible to exhaust the storage available with very large programs. If this happens, try increasing the heap size and rebuilding the task. A nominal heap size of 70000 (octal) bytes sould suffice for programs of about 2000 - 2500 lines. .P 5,1,3 To use PASREF under 11M or 11D, type the following: .NF MCR>RUN PASREF .F PASREF will respond with: .NF SOURCE FILE NAME: .F and allow the user to type the name of the file containing the program to be cross referenced. The file name and type should be entered, followed by a line feed character. For example: MYPROG.PAS. PASREF will then ask the user if he wants a line numbered listing of the source program: .NF PRINT INPUT FILE [Y/N]: .F to which the user responds by typing a 'Y' or 'N'. Upon completion, the cross reference will be stored in the file PASREF.OUT. .P 5,1,3 The following files are provided for building PASREF: .NF PASREF.PAS - Source program for PASREF; PASREF.CMD - Task build command file for PASREF; PASRF2.PAS - Source program for PASRF2; PASRF2.CMD - Task build command file for PASRF2; PASREF.RNO - Runnoff documentation file.