#!/bin/bash # # Usage: # ./run.sh set -o nounset comp() { # interesting to compare the patches for tail evaluation cdiff lisp.c lisp-nontail.c |less -r } showc() { local file=${1:-lisp.c} grep '^[^ ]' $file |less -r } # NOTE: There are a fair number of build warnings! build-all() { make # builds lisp.c, 1034 lines # lispf is a fork that provides an #ifdef FLOAT option to use single-precision # floating point numbers instead of integers, albeit with even less precision # than usual---only 21 significant mantissa bits! # # it is now also being used to test a tail-recursive evaluator. # # typedef int64_t number_t; # typedef float number_t; make 'NAME=lispf' # 1043 lines make 'NAME=lisp-nontail' # 975 lines make 'NAME=lisp2' # 1434 lines } "$@"