SPITBOL x32 is an efficient implementation of the SNOBOL4 programming language for the 32-bit i386 architecture, using the Unix system and its derivatives, including Linux.
It is written in a portable assembly language called MINIMAL, with runtime support provided by code written in C.
A ready-to-run binary executable is provided as
Here is a simple SPITBOL calculator that reads each line
from standard input, tries to evalute it, and writes the result
to standard output. The code can be found in
Note, for example, that
23+4 is a string, while
23 + 4 is an integer (27).
You can run it as follows:
* A simple calculator in SPITBOL * Copyright 2015 David Shields * Read lines from standard input, evalute each as * an expression, and write the result and its datatype * to standard output. :(loop) error * Here if error, so print error message and continue output = 'failure evaluating' output = '** ' line loop output = 'enter expression to evaluate:' line = input :f(end) result = eval(line) :f(error) output = result output = datatype(result) :(loop) end
Directory ./docs contains documentation:
- The SNOBOL4 Programming Language, Griswold, et. al.
This is the classic introduction to SNOBOL4, known affectionately to SNOBOL enthusiasts as "The Green Book," due to its bright green cover.
- SPITBOL User Manual, Emmer and Quillen
This is a comprehensive manual for SPITBOL, including many examples and tutorials.
- Minimal Specification ./docs/spitbol-reference-manual.md
This document describes the portable assembly language used to implement SPITBOL.
Demonstration programs from the SPITBOL User Manual can be found in
To build spitbol (
make osx make test_osx
make unix make test_unix
readme.txt for instructions on interpreting the test output.
SPITBOL is licensed under the GPL (v2 or later) license. All code needed to build the system is included in this repository.