File tree Expand file tree Collapse file tree 5 files changed +20
-12
lines changed Expand file tree Collapse file tree 5 files changed +20
-12
lines changed Original file line number Diff line number Diff line change 1
- #define SICP_VERSION "4.2.4 .0"
1
+ #define SICP_VERSION "5.5.7 .0"
Original file line number Diff line number Diff line change
1
+ ; (%ambeval)
2
+
1
3
(load "machine-50")
2
4
(load "compiler-50")
3
5
(load "ec-evaluator-50")
Original file line number Diff line number Diff line change 1
1
; #lang sicp
2
2
3
- ;; Everything from mc-evaluator-50, except provide, in one big begin
3
+ ;; Everything from mc-evaluator-50, except provide, in one big begin
4
4
;; expression which can be passed the compiler.
5
5
6
6
; (#%provide mc-evaluator-exp)
7
7
8
8
(define mc-evaluator-exp
9
9
'(begin
10
10
11
-
11
+
12
12
;; 4.1.1 The Core of the Evaluator
13
13
;; ================================
14
14
23
23
(make-procedure (lambda-parameters exp)
24
24
(lambda-body exp)
25
25
env))
26
- ((begin? exp)
26
+ ((begin? exp)
27
27
(eval-sequence (begin-actions exp) env))
28
28
((cond? exp) (eval (cond->if exp) env))
29
29
((application? exp)
289
289
(list 'list list)
290
290
(list 'equal? equal?)
291
291
))
292
-
292
+
293
293
(define (primitive-procedure-names)
294
294
(map car
295
295
primitive-procedures))
322
322
(define (driver-loop)
323
323
(prompt-for-input input-prompt)
324
324
(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))))))
329
334
(define (prompt-for-input string)
330
335
(newline) (newline) (display string) (newline))
331
336
341
346
(display object)))
342
347
343
348
(driver-loop)
344
-
349
+
345
350
))
Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ run() {
13
13
14
14
export -f run
15
15
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' {} \;
Original file line number Diff line number Diff line change 1
1
../emsdk/upstream/emscripten/emcc \
2
+ ../sicp-scheme/src/ambeval.c \
2
3
../sicp-scheme/src/aneval.c \
3
4
../sicp-scheme/src/bitmap.c \
4
5
../sicp-scheme/src/character.c \
You can’t perform that action at this time.
0 commit comments