Snostorm SNOBOL Preprocessor Overview

Problem: The SNOBOL programming language (see Wikipedia on SNOBOL) was a superb string processing language, combining top-down parsing with regular expression like factilities. However it had no meaningful control structures. Each statement could be appended with labels which indentified where to go either unconditionally or if the statement "succeeded" or "failed". This allowed the most superlative spaghetti flow imaginable, and with even the best discipline, could be quite hard to follow.

Solution: Write a preprocessor for the SNOBOL language plus control structures. This preprocessor was called Snostorm and was written in the early 1980's at the University of Michigan Computing Center by Fred Swartz. This followed the model of a similar Fortran preprocessor written in the late 1970s by the same author.

Features

Standard structured programming control stuctures were added:

Conditionals
IF, ELSE, ELSEIF, ENDIF as well as AND, OR, and NOT operators.
Loops
The LOOP..ENDLOOP statement allowed FOR, WHILE, and UNTIL clauses (including ENDLOOP REPEAT UNTIL or ENDLOOP REPEAT WHILE), as well as EXITLOOP and NEXTLOOP.
Switch
DO CASE, CASE, ELSECASE, ENDCASE structure where the values are strings that are hashed to the correct case label.
Procedures/functions
PROCEDURE..ENDPROCEDURE. Returns are made with EXITPROCEDURE. Briefer PROC, ENDPROC, and EXITPROC keywords were allowed.
Source listing
An indented listing was produced, with various options available.

Source code and sample programs

I've added a .txt suffix to the original file names so they can be handled more easily. I can't find the Snostorm documentation, but you can get the general idea by looking at the programs.

Snostorm is written in Snostorm of course. If anyone were still interested in getting it running, it would be best to use the SNOBOL output from running Snostorm through itself. It would be best, but this intermediate file has disappeared in the silicon sands of time.

p>

The source line counts below include comments and blank lines.