home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
snobol
/
aisnobol
/
buildlib.sno
< prev
next >
Wrap
Text File
|
1987-10-08
|
530b
|
27 lines
* BUILDLIB.SNO
*
* Build index to functions in INPUT to file OUTPUT.
*
-PLUSOPS 1
&TRIM = 1
&ANCHOR = 1
PAT = (ANY(&UCASE) (BREAK(' ' CHAR(9)) | REM)) . LABEL
* Scan for starting label, noting file position preceeding label.
*
LOOP FILE_POS = TELL(5)
LINE = INPUT :F(END)
LINE ? PAT :F(LOOP)
* Found the start of a function. Record it.
OUTPUT = LABEL ',' FILE_POS
* Scan for end of function
END_PAT = LABEL '.END'
LOOP2 LINE = INPUT :F(END)
LINE ? END_PAT :F(LOOP2)S(LOOP)
END