Skip to content

Commit 607ec25

Browse files
committed
Add: "Malum consilium quod mutari non potest"
1 parent 4931255 commit 607ec25

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

src/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#define SICP_VERSION "4.2.4.0"
1+
#define SICP_VERSION "5.5.7.0"

test/code/ch5/ex5.50/ex5.50-cbf.sicp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
; (%ambeval)
2+
13
(load "machine-50")
24
(load "compiler-50")
35
(load "ec-evaluator-50")

test/code/ch5/ex5.50/mc-evaluator-50-exp.sicp

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
; #lang sicp
22

3-
;; Everything from mc-evaluator-50, except provide, in one big begin
3+
;; Everything from mc-evaluator-50, except provide, in one big begin
44
;; expression which can be passed the compiler.
55

66
; (#%provide mc-evaluator-exp)
77

88
(define mc-evaluator-exp
99
'(begin
1010

11-
11+
1212
;; 4.1.1 The Core of the Evaluator
1313
;; ================================
1414

@@ -23,7 +23,7 @@
2323
(make-procedure (lambda-parameters exp)
2424
(lambda-body exp)
2525
env))
26-
((begin? exp)
26+
((begin? exp)
2727
(eval-sequence (begin-actions exp) env))
2828
((cond? exp) (eval (cond->if exp) env))
2929
((application? exp)
@@ -289,7 +289,7 @@
289289
(list 'list list)
290290
(list 'equal? equal?)
291291
))
292-
292+
293293
(define (primitive-procedure-names)
294294
(map car
295295
primitive-procedures))
@@ -322,10 +322,15 @@
322322
(define (driver-loop)
323323
(prompt-for-input input-prompt)
324324
(let ((input (read)))
325-
(let ((output (eval input the-global-environment)))
326-
(announce-output output-prompt)
327-
(user-print output)))
328-
(driver-loop))
325+
(cond
326+
((equal? input (list 'exit))
327+
(display "Malum consilium quod mutari non potest")
328+
(newline))
329+
(else
330+
(let ((output (eval input the-global-environment)))
331+
(announce-output output-prompt)
332+
(user-print output)
333+
(driver-loop))))))
329334
(define (prompt-for-input string)
330335
(newline) (newline) (display string) (newline))
331336

@@ -341,5 +346,5 @@
341346
(display object)))
342347

343348
(driver-loop)
344-
349+
345350
))

test/runall

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ run() {
1313

1414
export -f run
1515

16-
find $source_dir -type f -name 'ex*.sicp' | sort | while read line ; do run $line ; done
17-
# find $source_dir -type f -name 'ex*.sicp' -exec bash -c 'run $0' {} \;
16+
find $source_dir -type f -regex '.*[1234]/.*/ex.*sicp' | sort | while read line ; do run $line ; done
17+
# find $source_dir -type f -regex '.*[1234]/.*/ex.*sicp' -exec bash -c 'run $0' {} \;

www/build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
../emsdk/upstream/emscripten/emcc \
2+
../sicp-scheme/src/ambeval.c \
23
../sicp-scheme/src/aneval.c \
34
../sicp-scheme/src/bitmap.c \
45
../sicp-scheme/src/character.c \

0 commit comments

Comments
 (0)