# New Ticket Created by Andreas Rottmann
# Please include the string: [perl #52592]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=52592 >
The attached patch changes all brackets to parens. This prepares the
code for running on strict R5RS Scheme implementations, which don't
support brackets.
compiler.scm | 84 +++++-----
t/binary_primitives.t | 396 +++++++++++++++++++++++++-------------------------
t/booleans.t | 4
t/characters.t | 18 +-
t/conditionals.t | 80 +++++-----
t/empty_list.t | 2
t/integers.t | 22 +-
t/learning_scheme.t | 12 -
t/local_variables.t | 36 ++--
t/pair.t | 14 -
t/procedures.t | 12 -
t/strings.t | 8 -
t/unary_primitives.t | 138 ++++++++---------
t/vectors.t | 2
tests-driver.scm | 44 ++---
15 files changed, 436 insertions(+), 436 deletions(-)
Change brackets to parenthesis
From: Andreas Rottmann <[EMAIL PROTECTED]>
---
languages/eclectus/compiler.scm | 84 +++---
languages/eclectus/t/binary_primitives.t | 396 +++++++++++++++---------------
languages/eclectus/t/booleans.t | 4
languages/eclectus/t/characters.t | 18 +
languages/eclectus/t/conditionals.t | 80 +++---
languages/eclectus/t/empty_list.t | 2
languages/eclectus/t/integers.t | 22 +-
languages/eclectus/t/learning_scheme.t | 12 -
languages/eclectus/t/local_variables.t | 36 +--
languages/eclectus/t/pair.t | 14 +
languages/eclectus/t/procedures.t | 12 -
languages/eclectus/t/strings.t | 8 -
languages/eclectus/t/unary_primitives.t | 138 +++++-----
languages/eclectus/t/vectors.t | 2
languages/eclectus/tests-driver.scm | 44 ++-
15 files changed, 436 insertions(+), 436 deletions(-)
diff --git a/languages/eclectus/compiler.scm b/languages/eclectus/compiler.scm
index 2b25f14..c48e662 100644
--- a/languages/eclectus/compiler.scm
+++ b/languages/eclectus/compiler.scm
@@ -177,14 +177,14 @@
; with 'define-primitive'
(define-syntax define-primitive
(syntax-rules ()
- [(_ (prim-name arg* ...) b b* ...)
+ ((_ (prim-name arg* ...) b b* ...)
(begin
(putprop 'prim-name '*is-prim*
#t)
(putprop 'prim-name '*arg-count*
(length '(arg* ...)))
(putprop 'prim-name '*emitter*
- (lambda (arg* ...) b b* ...)))]))
+ (lambda (arg* ...) b b* ...))))))
; implementation of fxadd1
(define-primitive (fxadd1 arg)
@@ -359,7 +359,7 @@
(define emit-primcall
(lambda (x)
- (let ([prim (car x)] [args (cdr x)])
+ (let ((prim (car x)) (args (cdr x)))
(apply (primitive-emitter prim) args))))
(define emit-functional-application
@@ -378,28 +378,28 @@
(lambda (x)
((if (symbol? x) past::var past::val)
(cond
- [(fixnum? x)
+ ((fixnum? x)
(quasiquote (@ (value (unquote x))
- (returns "EclectusFixnum")))]
- [(char? x)
+ (returns "EclectusFixnum"))))
+ ((char? x)
(quasiquote (@ (value (unquote (char->integer x)))
- (returns "EclectusCharacter")))]
- [(null? x)
+ (returns "EclectusCharacter"))))
+ ((null? x)
'(@ (value 0)
- (returns "EclectusEmptyList"))]
- [(boolean? x)
+ (returns "EclectusEmptyList")))
+ ((boolean? x)
(quasiquote (@ (value (unquote (if x 1 0)))
- (returns "EclectusBoolean")))]
- [(symbol? x)
+ (returns "EclectusBoolean"))))
+ ((symbol? x)
(quasiquote (@ (name (unquote x))
(scope "lexical")
- (viviself "Undef")))]
- [(string? x)
+ (viviself "Undef"))))
+ ((string? x)
(quasiquote (@ (value (unquote (format "'~a'" x)))
- (returns "EclectusString")))]
- [(vector? x)
+ (returns "EclectusString"))))
+ ((vector? x)
(quasiquote (@ (value "'#0()'")
- (returns "EclectusString")))]))))
+ (returns "EclectusString"))))))))
(define bindings
(lambda (x)
@@ -467,12 +467,12 @@
(lambda (x)
;(diag (format "emit-expr: ~s" x))
(cond
- [(atom? x) (emit-atom x)]
- [(let? x) (emit-let (bindings x) (body x))]
- [(if? x) (emit-if x)]
- [(lambda? x) (emit-lambda x)]
- [(primcall? x) (emit-primcall x)]
- [else (emit-functional-application x)])))
+ ((atom? x) (emit-atom x))
+ ((let? x) (emit-let (bindings x) (body x)))
+ ((if? x) (emit-if x))
+ ((lambda? x) (emit-lambda x))
+ ((primcall? x) (emit-primcall x))
+ (else (emit-functional-application x)))))
; transverse the program and rewrite
; "and" can be supported by transformation before compiling
@@ -482,30 +482,30 @@
; as I don't know how to manipulate S-expressions while traversing it
(define preprocess
(lambda (tree)
- (cond [(atom? tree)
- tree]
- [(eqv? (car tree) 'and)
+ (cond ((atom? tree)
+ tree)
+ ((eqv? (car tree) 'and)
(preprocess
- (cond [(null? (cdr tree)) #t]
- [(= (length (cdr tree)) 1) (cadr tree)]
- [else (list
+ (cond ((null? (cdr tree)) #t)
+ ((= (length (cdr tree)) 1) (cadr tree))
+ (else (list
'if
(cadr tree)
(cons 'and (cddr tree))
- #f)]))]
- [(eqv? (car tree) 'or)
+ #f)))))
+ ((eqv? (car tree) 'or)
(preprocess
- (cond [(null? (cdr tree)) #f]
- [(= (length (cdr tree)) 1) (cadr tree)]
- [else (list
+ (cond ((null? (cdr tree)) #f)
+ ((= (length (cdr tree)) 1) (cadr tree))
+ (else (list
'if
(cadr tree)
(cadr tree)
- (cons 'or (cddr tree)))]))]
- [(eqv? (car tree) 'not)
+ (cons 'or (cddr tree)))))))
+ ((eqv? (car tree) 'not)
(preprocess
- (list 'if (cadr tree) #f #t))]
- [(eqv? (car tree) 'let*)
+ (list 'if (cadr tree) #f #t)))
+ ((eqv? (car tree) 'let*)
(preprocess
(if (null? (cadr tree))
(cons 'let (cdr tree))
@@ -514,16 +514,16 @@
(list (caadr tree))
(append
(list 'let* (cdadr tree))
- (cddr tree)))))]
- [else
- (map preprocess tree)])))
+ (cddr tree))))))
+ (else
+ (map preprocess tree)))))
; eventually this will become a PIR generator
; for PAST as SXML
; currently it only handles the pushes
(define past-sxml->past-pir
(lambda (past)
- (let ([uid (gen-unique-id)])
+ (let ((uid (gen-unique-id)))
;(diag (format "to_pir: ~a" past))
(emit "
.local pmc reg_~a
diff --git a/languages/eclectus/t/binary_primitives.t b/languages/eclectus/t/binary_primitives.t
index 139de4d..1d569bf 100644
--- a/languages/eclectus/t/binary_primitives.t
+++ b/languages/eclectus/t/binary_primitives.t
@@ -4,204 +4,204 @@
(load "compiler.scm")
(add-tests-with-string-output "binary primitives"
- [(fx+ 1 13) => "14\n" ]
- [(fx+ 1 (fx+ 7 6)) => "14\n" ]
- [(fx+ 1 (fx+ 7 (fxadd1 5))) => "14\n" ]
- [(fx+ 1 (fx+ (fxsub1 8) (fxadd1 5))) => "14\n" ]
- [(fx+ 1 (fx+ (fx+ 4 3) 6)) => "14\n" ]
- [(fx+ 1 (fx+ (fx+ 4 3) (fx+ 3 3))) => "14\n" ]
- [(fx+ (fx+ -10 11) (fx+ (fx+ 4 3) (fx+ 3 3))) => "14\n" ]
-
- [(fx- 1 13) => "-12\n" ]
- [(fx- 1 (fx- 7 6)) => "0\n" ]
- [(fx- 1 (fx- 7 (fxadd1 5))) => "0\n" ]
- [(fx- 1 (fx- (fxsub1 8) (fxadd1 5))) => "0\n" ]
- [(fx- 1 (fx- (fx- 4 3) 6)) => "6\n" ]
- [(fx- 1 (fx- (fx- 4 3) (fx- 3 3))) => "0\n" ]
- [(fx- (fx- -10 11) (fx- (fx- 4 3) (fx- 3 3))) => "-22\n" ]
-
- [(fx- 1 (fx+ 7 6)) => "-12\n" ]
- [(fx- 1 (fx+ 7 (fxadd1 5))) => "-12\n" ]
- [(fx+ 1 (fx- (fxsub1 8) (fxadd1 5))) => "2\n" ]
- [(fx- 1 (fx+ (fx- 4 3) 6)) => "-6\n" ]
- [(fx+ 1 (fx- (fx- 4 3) (fx+ 3 3))) => "-4\n" ]
- [(fx- (fx+ -10 11) (fx+ (fx+ 4 3) (fx- 3 3))) => "-6\n" ]
-
- [(fxlogand 0 0) => "0\n" ]
- [(fxlogand 0 1) => "0\n" ]
- [(fxlogand 1 0) => "0\n" ]
- [(fxlogand 1 1) => "1\n" ]
- [(fxlogand (fx+ 2 1) 0) => "0\n" ]
- [(fxlogand (fx+ 2 1) 1) => "1\n" ]
- [(fxlogand (fx+ 2 1) 2) => "2\n" ]
- [(fxlogand (fx+ 2 1) 4) => "0\n" ]
- [(fxlogand (fx+ 4 1) 0) => "0\n" ]
- [(fxlogand (fx+ 4 1) 1) => "1\n" ]
- [(fxlogand (fx+ 4 1) 2) => "0\n" ]
- [(fxlogand (fx+ 4 1) 4) => "4\n" ]
-
- [(fxlogor 0 0) => "0\n" ]
- [(fxlogor 0 1) => "1\n" ]
- [(fxlogor 1 0) => "1\n" ]
- [(fxlogor 1 1) => "1\n" ]
- [(fxlogor (fx+ 2 1) 0) => "3\n" ]
- [(fxlogor (fx+ 2 1) 1) => "3\n" ]
- [(fxlogor (fx+ 2 1) 2) => "3\n" ]
- [(fxlogor (fx+ 2 1) 4) => "7\n" ]
- [(fxlogor (fx+ 4 1) 0) => "5\n" ]
- [(fxlogor (fx+ 4 1) 1) => "5\n" ]
- [(fxlogor (fx+ 4 1) 2) => "7\n" ]
- [(fxlogor (fx+ 4 1) 4) => "5\n" ]
-
- [(fx< 0 0 ) => "#f\n" ]
- [(fx< -0 0 ) => "#f\n" ]
- [(fx< 0 -0 ) => "#f\n" ]
- [(fx< 1 1 ) => "#f\n" ]
- [(fx< -1 1 ) => "#t\n" ]
- [(fx< 1 -1 ) => "#f\n" ]
- [(fx< 123456789 123456789 ) => "#f\n" ]
- [(fx< -123456789 123456789 ) => "#t\n" ]
- [(fx< 123456789 -123456789 ) => "#f\n" ]
- [(fx< 123456789 (fxadd1 123456789)) => "#t\n" ]
- [(fx< -123456789 (fxadd1 -123456790)) => "#f\n" ]
- [(fx< -123456789 (fx+ -123456791 2)) => "#f\n" ]
-
- [(fx<= 0 0 ) => "#t\n" ]
- [(fx<= -0 0 ) => "#t\n" ]
- [(fx<= 0 -0 ) => "#t\n" ]
- [(fx<= 1 1 ) => "#t\n" ]
- [(fx<= -1 1 ) => "#t\n" ]
- [(fx<= 1 -1 ) => "#f\n" ]
- [(fx<= 123456789 123456789 ) => "#t\n" ]
- [(fx<= -123456789 123456789 ) => "#t\n" ]
- [(fx<= 123456789 -123456789 ) => "#f\n" ]
- [(fx<= 123456789 (fxadd1 123456789)) => "#t\n" ]
- [(fx<= -123456789 (fxadd1 -123456790)) => "#t\n" ]
- [(fx<= -123456789 (fx+ -123456791 2)) => "#t\n" ]
-
- [(fx= 0 0 ) => "#t\n" ]
- [(fx= -0 0 ) => "#t\n" ]
- [(fx= 0 -0 ) => "#t\n" ]
- [(fx= 1 1 ) => "#t\n" ]
- [(fx= -1 1 ) => "#f\n" ]
- [(fx= 1 -1 ) => "#f\n" ]
- [(fx= 123456789 123456789 ) => "#t\n" ]
- [(fx= -123456789 123456789 ) => "#f\n" ]
- [(fx= 123456789 -123456789 ) => "#f\n" ]
- [(fx= 123456789 (fxadd1 123456789)) => "#f\n" ]
- [(fx= -123456789 (fxadd1 -123456790)) => "#t\n" ]
- [(fx= -123456789 (fx+ -123456791 2)) => "#t\n" ]
-
- [(fx>= 0 0 ) => "#t\n" ]
- [(fx>= -0 0 ) => "#t\n" ]
- [(fx>= 0 -0 ) => "#t\n" ]
- [(fx>= 1 1 ) => "#t\n" ]
- [(fx>= -1 1 ) => "#f\n" ]
- [(fx>= 1 -1 ) => "#t\n" ]
- [(fx>= 123456789 123456789 ) => "#t\n" ]
- [(fx>= -123456789 123456789 ) => "#f\n" ]
- [(fx>= 123456789 -123456789 ) => "#t\n" ]
- [(fx>= 123456789 (fxadd1 123456789)) => "#f\n" ]
- [(fx>= -123456789 (fxadd1 -123456790)) => "#t\n" ]
- [(fx>= -123456789 (fx+ -123456791 2)) => "#t\n" ]
-
- [(fx> 0 0 ) => "#f\n" ]
- [(fx> -0 0 ) => "#f\n" ]
- [(fx> 0 -0 ) => "#f\n" ]
- [(fx> 1 1 ) => "#f\n" ]
- [(fx> -1 1 ) => "#f\n" ]
- [(fx> 1 -1 ) => "#t\n" ]
- [(fx> 123456789 123456789 ) => "#f\n" ]
- [(fx> -123456789 123456789 ) => "#f\n" ]
- [(fx> 123456789 -123456789 ) => "#t\n" ]
- [(fx> 123456789 (fxadd1 123456789)) => "#f\n" ]
- [(fx> -123456789 (fxadd1 -123456790)) => "#f\n" ]
- [(fx> -123456789 (fx+ -123456791 2)) => "#f\n" ]
-
- [(char< #\A #\A) => "#f\n" ]
- [(char< #\A #\B) => "#t\n" ]
- [(char< #\A #\a) => "#t\n" ]
- [(char< #\A #\b) => "#t\n" ]
- [(char< #\B #\A) => "#f\n" ]
- [(char< #\B #\B) => "#f\n" ]
- [(char< #\B #\a) => "#t\n" ]
- [(char< #\B #\b) => "#t\n" ]
- [(char< #\a #\A) => "#f\n" ]
- [(char< #\a #\B) => "#f\n" ]
- [(char< #\a #\a) => "#f\n" ]
- [(char< #\a #\b) => "#t\n" ]
- [(char< #\b #\A) => "#f\n" ]
- [(char< #\b #\B) => "#f\n" ]
- [(char< #\b #\a) => "#f\n" ]
- [(char< #\b #\b) => "#f\n" ]
-
- [(char<= #\A #\A) => "#t\n" ]
- [(char<= #\A #\B) => "#t\n" ]
- [(char<= #\A #\a) => "#t\n" ]
- [(char<= #\A #\b) => "#t\n" ]
- [(char<= #\B #\A) => "#f\n" ]
- [(char<= #\B #\B) => "#t\n" ]
- [(char<= #\B #\a) => "#t\n" ]
- [(char<= #\B #\b) => "#t\n" ]
- [(char<= #\a #\A) => "#f\n" ]
- [(char<= #\a #\B) => "#f\n" ]
- [(char<= #\a #\a) => "#t\n" ]
- [(char<= #\a #\b) => "#t\n" ]
- [(char<= #\b #\A) => "#f\n" ]
- [(char<= #\b #\B) => "#f\n" ]
- [(char<= #\b #\a) => "#f\n" ]
- [(char<= #\b #\b) => "#t\n" ]
-
- [(char= #\A #\A) => "#t\n" ]
- [(char= #\A #\B) => "#f\n" ]
- [(char= #\A #\a) => "#f\n" ]
- [(char= #\A #\b) => "#f\n" ]
- [(char= #\B #\A) => "#f\n" ]
- [(char= #\B #\B) => "#t\n" ]
- [(char= #\B #\a) => "#f\n" ]
- [(char= #\B #\b) => "#f\n" ]
- [(char= #\a #\A) => "#f\n" ]
- [(char= #\a #\B) => "#f\n" ]
- [(char= #\a #\a) => "#t\n" ]
- [(char= #\a #\b) => "#f\n" ]
- [(char= #\b #\A) => "#f\n" ]
- [(char= #\b #\B) => "#f\n" ]
- [(char= #\b #\a) => "#f\n" ]
- [(char= #\b #\b) => "#t\n" ]
-
- [(char>= #\A #\A) => "#t\n" ]
- [(char>= #\A #\B) => "#f\n" ]
- [(char>= #\A #\a) => "#f\n" ]
- [(char>= #\A #\b) => "#f\n" ]
- [(char>= #\B #\A) => "#t\n" ]
- [(char>= #\B #\B) => "#t\n" ]
- [(char>= #\B #\a) => "#f\n" ]
- [(char>= #\B #\b) => "#f\n" ]
- [(char>= #\a #\A) => "#t\n" ]
- [(char>= #\a #\B) => "#t\n" ]
- [(char>= #\a #\a) => "#t\n" ]
- [(char>= #\a #\b) => "#f\n" ]
- [(char>= #\b #\A) => "#t\n" ]
- [(char>= #\b #\B) => "#t\n" ]
- [(char>= #\b #\a) => "#t\n" ]
- [(char>= #\b #\b) => "#t\n" ]
-
- [(char> #\A #\A) => "#f\n" ]
- [(char> #\A #\B) => "#f\n" ]
- [(char> #\A #\a) => "#f\n" ]
- [(char> #\A #\b) => "#f\n" ]
- [(char> #\B #\A) => "#t\n" ]
- [(char> #\B #\B) => "#f\n" ]
- [(char> #\B #\a) => "#f\n" ]
- [(char> #\B #\b) => "#f\n" ]
- [(char> #\a #\A) => "#t\n" ]
- [(char> #\a #\B) => "#t\n" ]
- [(char> #\a #\a) => "#f\n" ]
- [(char> #\a #\b) => "#f\n" ]
- [(char> #\b #\A) => "#t\n" ]
- [(char> #\b #\B) => "#t\n" ]
- [(char> #\b #\a) => "#t\n" ]
- [(char> #\b #\b) => "#f\n" ]
+ ((fx+ 1 13) => "14\n" )
+ ((fx+ 1 (fx+ 7 6)) => "14\n" )
+ ((fx+ 1 (fx+ 7 (fxadd1 5))) => "14\n" )
+ ((fx+ 1 (fx+ (fxsub1 8) (fxadd1 5))) => "14\n" )
+ ((fx+ 1 (fx+ (fx+ 4 3) 6)) => "14\n" )
+ ((fx+ 1 (fx+ (fx+ 4 3) (fx+ 3 3))) => "14\n" )
+ ((fx+ (fx+ -10 11) (fx+ (fx+ 4 3) (fx+ 3 3))) => "14\n" )
+
+ ((fx- 1 13) => "-12\n" )
+ ((fx- 1 (fx- 7 6)) => "0\n" )
+ ((fx- 1 (fx- 7 (fxadd1 5))) => "0\n" )
+ ((fx- 1 (fx- (fxsub1 8) (fxadd1 5))) => "0\n" )
+ ((fx- 1 (fx- (fx- 4 3) 6)) => "6\n" )
+ ((fx- 1 (fx- (fx- 4 3) (fx- 3 3))) => "0\n" )
+ ((fx- (fx- -10 11) (fx- (fx- 4 3) (fx- 3 3))) => "-22\n" )
+
+ ((fx- 1 (fx+ 7 6)) => "-12\n" )
+ ((fx- 1 (fx+ 7 (fxadd1 5))) => "-12\n" )
+ ((fx+ 1 (fx- (fxsub1 8) (fxadd1 5))) => "2\n" )
+ ((fx- 1 (fx+ (fx- 4 3) 6)) => "-6\n" )
+ ((fx+ 1 (fx- (fx- 4 3) (fx+ 3 3))) => "-4\n" )
+ ((fx- (fx+ -10 11) (fx+ (fx+ 4 3) (fx- 3 3))) => "-6\n" )
+
+ ((fxlogand 0 0) => "0\n" )
+ ((fxlogand 0 1) => "0\n" )
+ ((fxlogand 1 0) => "0\n" )
+ ((fxlogand 1 1) => "1\n" )
+ ((fxlogand (fx+ 2 1) 0) => "0\n" )
+ ((fxlogand (fx+ 2 1) 1) => "1\n" )
+ ((fxlogand (fx+ 2 1) 2) => "2\n" )
+ ((fxlogand (fx+ 2 1) 4) => "0\n" )
+ ((fxlogand (fx+ 4 1) 0) => "0\n" )
+ ((fxlogand (fx+ 4 1) 1) => "1\n" )
+ ((fxlogand (fx+ 4 1) 2) => "0\n" )
+ ((fxlogand (fx+ 4 1) 4) => "4\n" )
+
+ ((fxlogor 0 0) => "0\n" )
+ ((fxlogor 0 1) => "1\n" )
+ ((fxlogor 1 0) => "1\n" )
+ ((fxlogor 1 1) => "1\n" )
+ ((fxlogor (fx+ 2 1) 0) => "3\n" )
+ ((fxlogor (fx+ 2 1) 1) => "3\n" )
+ ((fxlogor (fx+ 2 1) 2) => "3\n" )
+ ((fxlogor (fx+ 2 1) 4) => "7\n" )
+ ((fxlogor (fx+ 4 1) 0) => "5\n" )
+ ((fxlogor (fx+ 4 1) 1) => "5\n" )
+ ((fxlogor (fx+ 4 1) 2) => "7\n" )
+ ((fxlogor (fx+ 4 1) 4) => "5\n" )
+
+ ((fx< 0 0 ) => "#f\n" )
+ ((fx< -0 0 ) => "#f\n" )
+ ((fx< 0 -0 ) => "#f\n" )
+ ((fx< 1 1 ) => "#f\n" )
+ ((fx< -1 1 ) => "#t\n" )
+ ((fx< 1 -1 ) => "#f\n" )
+ ((fx< 123456789 123456789 ) => "#f\n" )
+ ((fx< -123456789 123456789 ) => "#t\n" )
+ ((fx< 123456789 -123456789 ) => "#f\n" )
+ ((fx< 123456789 (fxadd1 123456789)) => "#t\n" )
+ ((fx< -123456789 (fxadd1 -123456790)) => "#f\n" )
+ ((fx< -123456789 (fx+ -123456791 2)) => "#f\n" )
+
+ ((fx<= 0 0 ) => "#t\n" )
+ ((fx<= -0 0 ) => "#t\n" )
+ ((fx<= 0 -0 ) => "#t\n" )
+ ((fx<= 1 1 ) => "#t\n" )
+ ((fx<= -1 1 ) => "#t\n" )
+ ((fx<= 1 -1 ) => "#f\n" )
+ ((fx<= 123456789 123456789 ) => "#t\n" )
+ ((fx<= -123456789 123456789 ) => "#t\n" )
+ ((fx<= 123456789 -123456789 ) => "#f\n" )
+ ((fx<= 123456789 (fxadd1 123456789)) => "#t\n" )
+ ((fx<= -123456789 (fxadd1 -123456790)) => "#t\n" )
+ ((fx<= -123456789 (fx+ -123456791 2)) => "#t\n" )
+
+ ((fx= 0 0 ) => "#t\n" )
+ ((fx= -0 0 ) => "#t\n" )
+ ((fx= 0 -0 ) => "#t\n" )
+ ((fx= 1 1 ) => "#t\n" )
+ ((fx= -1 1 ) => "#f\n" )
+ ((fx= 1 -1 ) => "#f\n" )
+ ((fx= 123456789 123456789 ) => "#t\n" )
+ ((fx= -123456789 123456789 ) => "#f\n" )
+ ((fx= 123456789 -123456789 ) => "#f\n" )
+ ((fx= 123456789 (fxadd1 123456789)) => "#f\n" )
+ ((fx= -123456789 (fxadd1 -123456790)) => "#t\n" )
+ ((fx= -123456789 (fx+ -123456791 2)) => "#t\n" )
+
+ ((fx>= 0 0 ) => "#t\n" )
+ ((fx>= -0 0 ) => "#t\n" )
+ ((fx>= 0 -0 ) => "#t\n" )
+ ((fx>= 1 1 ) => "#t\n" )
+ ((fx>= -1 1 ) => "#f\n" )
+ ((fx>= 1 -1 ) => "#t\n" )
+ ((fx>= 123456789 123456789 ) => "#t\n" )
+ ((fx>= -123456789 123456789 ) => "#f\n" )
+ ((fx>= 123456789 -123456789 ) => "#t\n" )
+ ((fx>= 123456789 (fxadd1 123456789)) => "#f\n" )
+ ((fx>= -123456789 (fxadd1 -123456790)) => "#t\n" )
+ ((fx>= -123456789 (fx+ -123456791 2)) => "#t\n" )
+
+ ((fx> 0 0 ) => "#f\n" )
+ ((fx> -0 0 ) => "#f\n" )
+ ((fx> 0 -0 ) => "#f\n" )
+ ((fx> 1 1 ) => "#f\n" )
+ ((fx> -1 1 ) => "#f\n" )
+ ((fx> 1 -1 ) => "#t\n" )
+ ((fx> 123456789 123456789 ) => "#f\n" )
+ ((fx> -123456789 123456789 ) => "#f\n" )
+ ((fx> 123456789 -123456789 ) => "#t\n" )
+ ((fx> 123456789 (fxadd1 123456789)) => "#f\n" )
+ ((fx> -123456789 (fxadd1 -123456790)) => "#f\n" )
+ ((fx> -123456789 (fx+ -123456791 2)) => "#f\n" )
+
+ ((char< #\A #\A) => "#f\n" )
+ ((char< #\A #\B) => "#t\n" )
+ ((char< #\A #\a) => "#t\n" )
+ ((char< #\A #\b) => "#t\n" )
+ ((char< #\B #\A) => "#f\n" )
+ ((char< #\B #\B) => "#f\n" )
+ ((char< #\B #\a) => "#t\n" )
+ ((char< #\B #\b) => "#t\n" )
+ ((char< #\a #\A) => "#f\n" )
+ ((char< #\a #\B) => "#f\n" )
+ ((char< #\a #\a) => "#f\n" )
+ ((char< #\a #\b) => "#t\n" )
+ ((char< #\b #\A) => "#f\n" )
+ ((char< #\b #\B) => "#f\n" )
+ ((char< #\b #\a) => "#f\n" )
+ ((char< #\b #\b) => "#f\n" )
+
+ ((char<= #\A #\A) => "#t\n" )
+ ((char<= #\A #\B) => "#t\n" )
+ ((char<= #\A #\a) => "#t\n" )
+ ((char<= #\A #\b) => "#t\n" )
+ ((char<= #\B #\A) => "#f\n" )
+ ((char<= #\B #\B) => "#t\n" )
+ ((char<= #\B #\a) => "#t\n" )
+ ((char<= #\B #\b) => "#t\n" )
+ ((char<= #\a #\A) => "#f\n" )
+ ((char<= #\a #\B) => "#f\n" )
+ ((char<= #\a #\a) => "#t\n" )
+ ((char<= #\a #\b) => "#t\n" )
+ ((char<= #\b #\A) => "#f\n" )
+ ((char<= #\b #\B) => "#f\n" )
+ ((char<= #\b #\a) => "#f\n" )
+ ((char<= #\b #\b) => "#t\n" )
+
+ ((char= #\A #\A) => "#t\n" )
+ ((char= #\A #\B) => "#f\n" )
+ ((char= #\A #\a) => "#f\n" )
+ ((char= #\A #\b) => "#f\n" )
+ ((char= #\B #\A) => "#f\n" )
+ ((char= #\B #\B) => "#t\n" )
+ ((char= #\B #\a) => "#f\n" )
+ ((char= #\B #\b) => "#f\n" )
+ ((char= #\a #\A) => "#f\n" )
+ ((char= #\a #\B) => "#f\n" )
+ ((char= #\a #\a) => "#t\n" )
+ ((char= #\a #\b) => "#f\n" )
+ ((char= #\b #\A) => "#f\n" )
+ ((char= #\b #\B) => "#f\n" )
+ ((char= #\b #\a) => "#f\n" )
+ ((char= #\b #\b) => "#t\n" )
+
+ ((char>= #\A #\A) => "#t\n" )
+ ((char>= #\A #\B) => "#f\n" )
+ ((char>= #\A #\a) => "#f\n" )
+ ((char>= #\A #\b) => "#f\n" )
+ ((char>= #\B #\A) => "#t\n" )
+ ((char>= #\B #\B) => "#t\n" )
+ ((char>= #\B #\a) => "#f\n" )
+ ((char>= #\B #\b) => "#f\n" )
+ ((char>= #\a #\A) => "#t\n" )
+ ((char>= #\a #\B) => "#t\n" )
+ ((char>= #\a #\a) => "#t\n" )
+ ((char>= #\a #\b) => "#f\n" )
+ ((char>= #\b #\A) => "#t\n" )
+ ((char>= #\b #\B) => "#t\n" )
+ ((char>= #\b #\a) => "#t\n" )
+ ((char>= #\b #\b) => "#t\n" )
+
+ ((char> #\A #\A) => "#f\n" )
+ ((char> #\A #\B) => "#f\n" )
+ ((char> #\A #\a) => "#f\n" )
+ ((char> #\A #\b) => "#f\n" )
+ ((char> #\B #\A) => "#t\n" )
+ ((char> #\B #\B) => "#f\n" )
+ ((char> #\B #\a) => "#f\n" )
+ ((char> #\B #\b) => "#f\n" )
+ ((char> #\a #\A) => "#t\n" )
+ ((char> #\a #\B) => "#t\n" )
+ ((char> #\a #\a) => "#f\n" )
+ ((char> #\a #\b) => "#f\n" )
+ ((char> #\b #\A) => "#t\n" )
+ ((char> #\b #\B) => "#t\n" )
+ ((char> #\b #\a) => "#t\n" )
+ ((char> #\b #\b) => "#f\n" )
)
(test-all)
diff --git a/languages/eclectus/t/booleans.t b/languages/eclectus/t/booleans.t
index d279f2c..8a84d1f 100644
--- a/languages/eclectus/t/booleans.t
+++ b/languages/eclectus/t/booleans.t
@@ -4,8 +4,8 @@
; there have to be nine tests, as the number of tests is hardcoded in test-driver.scm
(add-tests-with-string-output "booleans"
- [#t => "#t\n"]
- [#f => "#f\n"])
+ (#t => "#t\n")
+ (#f => "#f\n"))
(load "compiler.scm")
(test-all)
diff --git a/languages/eclectus/t/characters.t b/languages/eclectus/t/characters.t
index 802e799..e11ddc8 100644
--- a/languages/eclectus/t/characters.t
+++ b/languages/eclectus/t/characters.t
@@ -4,15 +4,15 @@
; there have to be nine tests, as the number of tests is hardcoded in test-driver.scm
(add-tests-with-string-output "booleans"
- [#\a => "#\\a\n"]
- [#\A => "#\\A\n"]
- [#\z => "#\\z\n"]
- [#\Z => "#\\Z\n"]
- [#\0 => "#\\0\n"]
- [#\1 => "#\\1\n"]
- [#\9 => "#\\9\n"]
- [#\$ => "#\\$\n"]
- [#\ => "#\\ \n"]
+ (#\a => "#\\a\n")
+ (#\A => "#\\A\n")
+ (#\z => "#\\z\n")
+ (#\Z => "#\\Z\n")
+ (#\0 => "#\\0\n")
+ (#\1 => "#\\1\n")
+ (#\9 => "#\\9\n")
+ (#\$ => "#\\$\n")
+ (#\ => "#\\ \n")
)
(load "compiler.scm")
diff --git a/languages/eclectus/t/conditionals.t b/languages/eclectus/t/conditionals.t
index 2d2e7ff..0e54d0a 100644
--- a/languages/eclectus/t/conditionals.t
+++ b/languages/eclectus/t/conditionals.t
@@ -4,46 +4,46 @@
(load "compiler.scm")
(add-tests-with-string-output "conditional expressions"
- [(if #t 1 0) => "1\n" ]
- [(if #f 1 0) => "0\n" ]
- [(if 0 1 0) => "1\n" ]
- [(if 1 1 0) => "1\n" ]
- [(if #\A 1 0) => "1\n" ]
- [(if (fixnum? #\A) 1 0) => "0\n" ]
- [(if (char? #\A) 1 0) => "1\n" ]
- [(if (fixnum? #\A) 1 0) => "0\n" ]
- [(if (fixnum? 100) 1 0) => "1\n" ]
- [(if (and) 1 0) => "1\n" ]
- [(if (and #t) 1 0) => "1\n" ]
- [(if (and #f) 1 0) => "0\n" ]
- [(if (and #t #f) 1 0) => "0\n" ]
- [(if (and #t #t) 1 0) => "1\n" ]
- [(if (or) 1 0) => "0\n" ]
- [(if (or #t) 1 0) => "1\n" ]
- [(if (or #f) 1 0) => "0\n" ]
- [(if (or #t #f) 1 0) => "1\n" ]
- [(if (or #t #t) 1 0) => "1\n" ]
- [(if (or (and #t #f) #t) 1 0) => "1\n" ]
- [(if (or (and #t #t) #t) 1 0) => "1\n" ]
- [(if (or (and #f #f) #t) 1 0) => "1\n" ]
- [(if (or (and #t #f) #f) 1 0) => "0\n" ]
- [(if (or (and #t #t) #f) 1 0) => "1\n" ]
- [(if (or (and #f #f) #f) 1 0) => "0\n" ]
- [(if (and (or #t #f) #t) 1 0) => "1\n" ]
- [(if (and (or #t #t) #t) 1 0) => "1\n" ]
- [(if (and (or #f #f) #t) 1 0) => "0\n" ]
- [(if (and (or #t #f) #f) 1 0) => "0\n" ]
- [(if (and (or #t #t) #f) 1 0) => "0\n" ]
- [(if (and (or #f #f) #f) 1 0) => "0\n" ]
- [(if (if (if #t #f #f) (if #t #f #f) #f) 1 0) => "0\n" ]
- [(if (if #f (if #t #f #f) #f) 1 0) => "0\n" ]
- [(if (if (if #t #f #f) (if #t #f #f) #t) 1 0) => "1\n" ]
- [(if (if #f (if #t #f #f) #t) 1 0) => "1\n" ]
- [(if #f #f #t) => "#t\n" ]
- [(if (if #f #f #t) 1 0) => "1\n" ]
- [(if (if #t #f #f) 1 0) => "0\n" ]
- [(if #f (if #t #f #f) #t) => "#t\n" ]
- [(if () #f #t) => "#f\n" ]
+ ((if #t 1 0) => "1\n" )
+ ((if #f 1 0) => "0\n" )
+ ((if 0 1 0) => "1\n" )
+ ((if 1 1 0) => "1\n" )
+ ((if #\A 1 0) => "1\n" )
+ ((if (fixnum? #\A) 1 0) => "0\n" )
+ ((if (char? #\A) 1 0) => "1\n" )
+ ((if (fixnum? #\A) 1 0) => "0\n" )
+ ((if (fixnum? 100) 1 0) => "1\n" )
+ ((if (and) 1 0) => "1\n" )
+ ((if (and #t) 1 0) => "1\n" )
+ ((if (and #f) 1 0) => "0\n" )
+ ((if (and #t #f) 1 0) => "0\n" )
+ ((if (and #t #t) 1 0) => "1\n" )
+ ((if (or) 1 0) => "0\n" )
+ ((if (or #t) 1 0) => "1\n" )
+ ((if (or #f) 1 0) => "0\n" )
+ ((if (or #t #f) 1 0) => "1\n" )
+ ((if (or #t #t) 1 0) => "1\n" )
+ ((if (or (and #t #f) #t) 1 0) => "1\n" )
+ ((if (or (and #t #t) #t) 1 0) => "1\n" )
+ ((if (or (and #f #f) #t) 1 0) => "1\n" )
+ ((if (or (and #t #f) #f) 1 0) => "0\n" )
+ ((if (or (and #t #t) #f) 1 0) => "1\n" )
+ ((if (or (and #f #f) #f) 1 0) => "0\n" )
+ ((if (and (or #t #f) #t) 1 0) => "1\n" )
+ ((if (and (or #t #t) #t) 1 0) => "1\n" )
+ ((if (and (or #f #f) #t) 1 0) => "0\n" )
+ ((if (and (or #t #f) #f) 1 0) => "0\n" )
+ ((if (and (or #t #t) #f) 1 0) => "0\n" )
+ ((if (and (or #f #f) #f) 1 0) => "0\n" )
+ ((if (if (if #t #f #f) (if #t #f #f) #f) 1 0) => "0\n" )
+ ((if (if #f (if #t #f #f) #f) 1 0) => "0\n" )
+ ((if (if (if #t #f #f) (if #t #f #f) #t) 1 0) => "1\n" )
+ ((if (if #f (if #t #f #f) #t) 1 0) => "1\n" )
+ ((if #f #f #t) => "#t\n" )
+ ((if (if #f #f #t) 1 0) => "1\n" )
+ ((if (if #t #f #f) 1 0) => "0\n" )
+ ((if #f (if #t #f #f) #t) => "#t\n" )
+ ((if () #f #t) => "#f\n" )
)
(test-all)
diff --git a/languages/eclectus/t/empty_list.t b/languages/eclectus/t/empty_list.t
index 5a95345..265f966 100644
--- a/languages/eclectus/t/empty_list.t
+++ b/languages/eclectus/t/empty_list.t
@@ -4,7 +4,7 @@
; there have to be nine tests, as the number of tests is hardcoded in test-driver.scm
(add-tests-with-string-output "booleans"
- [() => "()\n"])
+ (() => "()\n"))
(load "compiler.scm")
(test-all)
diff --git a/languages/eclectus/t/integers.t b/languages/eclectus/t/integers.t
index e5d4e7f..9872dcb 100644
--- a/languages/eclectus/t/integers.t
+++ b/languages/eclectus/t/integers.t
@@ -3,17 +3,17 @@
(load "tests-driver.scm") ; this should come first
(add-tests-with-string-output "integers"
- [0 => "0\n"]
- [1 => "1\n"]
- [-1 => "-1\n"]
- [2 => "2\n"]
- [-2 => "-2\n"]
- [10 => "10\n"]
- [-10 => "-10\n"]
- [2736 => "2736\n"]
- [-2736 => "-2736\n"]
- [536870911 => "536870911\n"]
- [-536870912 => "-536870912\n"]
+ (0 => "0\n")
+ (1 => "1\n")
+ (-1 => "-1\n")
+ (2 => "2\n")
+ (-2 => "-2\n")
+ (10 => "10\n")
+ (-10 => "-10\n")
+ (2736 => "2736\n")
+ (-2736 => "-2736\n")
+ (536870911 => "536870911\n")
+ (-536870912 => "-536870912\n")
)
(load "compiler.scm")
diff --git a/languages/eclectus/t/learning_scheme.t b/languages/eclectus/t/learning_scheme.t
index 6332398..9a7b2b7 100644
--- a/languages/eclectus/t/learning_scheme.t
+++ b/languages/eclectus/t/learning_scheme.t
@@ -46,15 +46,15 @@
; play with tree transformation
(define-syntax my-and
(syntax-rules ()
- [(_) #t]
- [(_ e) e]
- [(_ e1 e2 e3 ...) ( if e1 (my-and e2 e3 ...) #f )]))
+ ((_) #t)
+ ((_ e) e)
+ ((_ e1 e2 e3 ...) ( if e1 (my-and e2 e3 ...) #f ))))
(define-syntax my-or
(syntax-rules ()
- [(_) #f]
- [(_ e) e]
- [(_ e1 e2 e3 ...) ( if e1 e1 (my-or e2 e3 ...) )]))
+ ((_) #f)
+ ((_ e) e)
+ ((_ e1 e2 e3 ...) ( if e1 e1 (my-or e2 e3 ...) ))))
; and
(define desc "my-and")
diff --git a/languages/eclectus/t/local_variables.t b/languages/eclectus/t/local_variables.t
index 3adb5b2..83c20cf 100644
--- a/languages/eclectus/t/local_variables.t
+++ b/languages/eclectus/t/local_variables.t
@@ -3,24 +3,24 @@
(load "tests-driver.scm") ; this should come first
(add-tests-with-string-output "local variables"
- [(let () 13) => "13\n"]
- [(let (($var_a 17)) 13) => "13\n"]
- [(let ((var-a 17)) 13) => "13\n"]
- [(let (($var_a 14)) $var_a) => "14\n"]
- [(let (($var_a 17) ($var_b 21)) 13) => "13\n"]
- [(let (($var_a 13) ($var_b 21)) (fxadd1 $var_a)) => "14\n"]
- [(let (($var_a 13) ($var_b 21)) (fx+ $var_a $var_b)) => "34\n"]
- [(let (($var_a 13) ($var_b 21)) (fx> $var_a $var_b)) => "#f\n"]
- [(let (($var_a 13) ($var_b 21)) (fx> $var_b $var_a)) => "#t\n"]
- [(let ((var-a 13) (var-b 22)) (fx+ var-a var-b)) => "35\n"]
- [(let ((var-a2 13) (var-b3 23)) (fx+ var-a2 var-b3)) => "36\n"]
- [(let* () 22) => "22\n"]
- [(let* () (fx+ 22 1)) => "23\n"]
- [(let* ((arg1 24)) arg1) => "24\n"]
- [(let* ((arg1 24)(arg2 25)) arg2) => "25\n"]
- [(let* ((arg1 12)(arg2 14)) (fx+ arg1 arg2)) => "26\n"]
- [(let* ((arg1 12)(arg2 (fx+ 14 1))) (fx+ arg1 arg2)) => "27\n"]
- [(let* ((arg1 12)(arg2 (fx+ arg1 4))) (fx+ arg1 arg2)) => "28\n"]
+ ((let () 13) => "13\n")
+ ((let (($var_a 17)) 13) => "13\n")
+ ((let ((var-a 17)) 13) => "13\n")
+ ((let (($var_a 14)) $var_a) => "14\n")
+ ((let (($var_a 17) ($var_b 21)) 13) => "13\n")
+ ((let (($var_a 13) ($var_b 21)) (fxadd1 $var_a)) => "14\n")
+ ((let (($var_a 13) ($var_b 21)) (fx+ $var_a $var_b)) => "34\n")
+ ((let (($var_a 13) ($var_b 21)) (fx> $var_a $var_b)) => "#f\n")
+ ((let (($var_a 13) ($var_b 21)) (fx> $var_b $var_a)) => "#t\n")
+ ((let ((var-a 13) (var-b 22)) (fx+ var-a var-b)) => "35\n")
+ ((let ((var-a2 13) (var-b3 23)) (fx+ var-a2 var-b3)) => "36\n")
+ ((let* () 22) => "22\n")
+ ((let* () (fx+ 22 1)) => "23\n")
+ ((let* ((arg1 24)) arg1) => "24\n")
+ ((let* ((arg1 24)(arg2 25)) arg2) => "25\n")
+ ((let* ((arg1 12)(arg2 14)) (fx+ arg1 arg2)) => "26\n")
+ ((let* ((arg1 12)(arg2 (fx+ 14 1))) (fx+ arg1 arg2)) => "27\n")
+ ((let* ((arg1 12)(arg2 (fx+ arg1 4))) (fx+ arg1 arg2)) => "28\n")
)
(load "compiler.scm")
diff --git a/languages/eclectus/t/pair.t b/languages/eclectus/t/pair.t
index 729c5e8..825149d 100644
--- a/languages/eclectus/t/pair.t
+++ b/languages/eclectus/t/pair.t
@@ -3,13 +3,13 @@
(load "tests-driver.scm") ; this should come first
(add-tests-with-string-output "booleans"
- [(pair? ()) => "#f\n"]
- [(pair? #\A) => "#f\n"]
- [(pair? (fx+ 1 2)) => "#f\n"]
- [(pair? (pair? (fx+ 1 2))) => "#f\n"]
- [(pair? (cons 30 31)) => "#t\n"]
- ; [(car (cons 30 31)) => "30\n"]
- ; [(cdr (cons 30 31)) => "31\n"]
+ ((pair? ()) => "#f\n")
+ ((pair? #\A) => "#f\n")
+ ((pair? (fx+ 1 2)) => "#f\n")
+ ((pair? (pair? (fx+ 1 2))) => "#f\n")
+ ((pair? (cons 30 31)) => "#t\n")
+ ; ((car (cons 30 31)) => "30\n")
+ ; ((cdr (cons 30 31)) => "31\n")
)
(load "compiler.scm")
diff --git a/languages/eclectus/t/procedures.t b/languages/eclectus/t/procedures.t
index 8df0e9a..0529547 100644
--- a/languages/eclectus/t/procedures.t
+++ b/languages/eclectus/t/procedures.t
@@ -3,12 +3,12 @@
(load "tests-driver.scm") ; this should come first
(add-tests-with-string-output "local variables"
- [((lambda () 18)) => "18\n"]
- [((lambda () (fx- 20 2))) => "18\n"]
- [((lambda () (fx- 36 (fx- 20 2)))) => "18\n"]
- [((lambda (arg) arg) 18) => "18\n"]
- [((lambda (arg) (fx+ arg 8)) 10) => "18\n"]
- [((lambda (arg1 arg2) (fx+ arg1 arg2)) 8 10) => "18\n"]
+ (((lambda () 18)) => "18\n")
+ (((lambda () (fx- 20 2))) => "18\n")
+ (((lambda () (fx- 36 (fx- 20 2)))) => "18\n")
+ (((lambda (arg) arg) 18) => "18\n")
+ (((lambda (arg) (fx+ arg 8)) 10) => "18\n")
+ (((lambda (arg1 arg2) (fx+ arg1 arg2)) 8 10) => "18\n")
)
(load "compiler.scm")
diff --git a/languages/eclectus/t/strings.t b/languages/eclectus/t/strings.t
index a07ae9b..62185b6 100644
--- a/languages/eclectus/t/strings.t
+++ b/languages/eclectus/t/strings.t
@@ -3,10 +3,10 @@
(load "tests-driver.scm") ; this should come first
(add-tests-with-string-output "strings"
- ["asdf" => "asdf\n"]
- ["1" => "1\n"]
- ; ["\n" => "\n\n"]
- ["" => "\n"]
+ ("asdf" => "asdf\n")
+ ("1" => "1\n")
+ ; ("\n" => "\n\n")
+ ("" => "\n")
)
(load "compiler.scm")
diff --git a/languages/eclectus/t/unary_primitives.t b/languages/eclectus/t/unary_primitives.t
index 27726d6..0d42407 100644
--- a/languages/eclectus/t/unary_primitives.t
+++ b/languages/eclectus/t/unary_primitives.t
@@ -4,85 +4,85 @@
(load "compiler.scm")
(add-tests-with-string-output "unary primitives"
- [(fxadd1 -2) => "-1\n" ]
- [(fxadd1 -1) => "0\n" ]
- [(fxadd1 0) => "1\n" ]
- [(fxadd1 1) => "2\n" ]
- [(fxadd1 2) => "3\n" ]
- [(fxadd1 (fxadd1 2)) => "4\n" ]
- [(fxadd1 (fxadd1 (fxadd1 2))) => "5\n" ]
+ ((fxadd1 -2) => "-1\n" )
+ ((fxadd1 -1) => "0\n" )
+ ((fxadd1 0) => "1\n" )
+ ((fxadd1 1) => "2\n" )
+ ((fxadd1 2) => "3\n" )
+ ((fxadd1 (fxadd1 2)) => "4\n" )
+ ((fxadd1 (fxadd1 (fxadd1 2))) => "5\n" )
- [(fxsub1 -2) => "-3\n" ]
- [(fxsub1 -1) => "-2\n" ]
- [(fxsub1 1) => "0\n" ]
- [(fxsub1 2) => "1\n" ]
+ ((fxsub1 -2) => "-3\n" )
+ ((fxsub1 -1) => "-2\n" )
+ ((fxsub1 1) => "0\n" )
+ ((fxsub1 2) => "1\n" )
- [(char->fixnum #\A) => "65\n" ]
+ ((char->fixnum #\A) => "65\n" )
- [(fxsub1 (char->fixnum #\B)) => "65\n" ]
- [(fxsub1 (fxsub1 (char->fixnum #\C))) => "65\n" ]
+ ((fxsub1 (char->fixnum #\B)) => "65\n" )
+ ((fxsub1 (fxsub1 (char->fixnum #\C))) => "65\n" )
- [(fixnum->char 65) => "#\\A\n" ]
- [(fixnum->char (fxsub1 66)) => "#\\A\n" ]
- [(fixnum->char (fxsub1 (fxsub1 67))) => "#\\A\n" ]
+ ((fixnum->char 65) => "#\\A\n" )
+ ((fixnum->char (fxsub1 66)) => "#\\A\n" )
+ ((fixnum->char (fxsub1 (fxsub1 67))) => "#\\A\n" )
- [(fxzero? 0) => "#t\n" ]
- [(fxzero? -1) => "#f\n" ]
- [(fxzero? 1) => "#f\n" ]
- [(fxzero? (char->fixnum #\A)) => "#f\n" ]
+ ((fxzero? 0) => "#t\n" )
+ ((fxzero? -1) => "#f\n" )
+ ((fxzero? 1) => "#f\n" )
+ ((fxzero? (char->fixnum #\A)) => "#f\n" )
- [(null? ()) => "#t\n" ]
- [(null? (fxsub1 1)) => "#f\n" ]
- [(null? (fxsub1 10)) => "#f\n" ]
- [(null? #\A) => "#f\n" ]
- [(null? 65) => "#f\n" ]
- [(null? (char->fixnum #\A)) => "#f\n" ]
+ ((null? ()) => "#t\n" )
+ ((null? (fxsub1 1)) => "#f\n" )
+ ((null? (fxsub1 10)) => "#f\n" )
+ ((null? #\A) => "#f\n" )
+ ((null? 65) => "#f\n" )
+ ((null? (char->fixnum #\A)) => "#f\n" )
- [(fixnum? ()) => "#f\n" ]
- [(fixnum? (fxsub1 1)) => "#t\n" ]
- [(fixnum? (fxsub1 10)) => "#t\n" ]
- [(fixnum? #\A) => "#f\n" ]
- [(fixnum? 65) => "#t\n" ]
- [(fixnum? (char->fixnum #\A)) => "#t\n" ]
+ ((fixnum? ()) => "#f\n" )
+ ((fixnum? (fxsub1 1)) => "#t\n" )
+ ((fixnum? (fxsub1 10)) => "#t\n" )
+ ((fixnum? #\A) => "#f\n" )
+ ((fixnum? 65) => "#t\n" )
+ ((fixnum? (char->fixnum #\A)) => "#t\n" )
- [(boolean? ()) => "#f\n" ]
- [(boolean? (fxsub1 1)) => "#f\n" ]
- [(boolean? (fxsub1 10)) => "#f\n" ]
- [(boolean? #\A) => "#f\n" ]
- [(boolean? 65) => "#f\n" ]
- [(boolean? (char->fixnum #\A)) => "#f\n" ]
- [(boolean? #t) => "#t\n" ]
- [(boolean? #f) => "#t\n" ]
- [(boolean? (fixnum? #\A)) => "#t\n" ]
- [(boolean? (fixnum? 65)) => "#t\n" ]
+ ((boolean? ()) => "#f\n" )
+ ((boolean? (fxsub1 1)) => "#f\n" )
+ ((boolean? (fxsub1 10)) => "#f\n" )
+ ((boolean? #\A) => "#f\n" )
+ ((boolean? 65) => "#f\n" )
+ ((boolean? (char->fixnum #\A)) => "#f\n" )
+ ((boolean? #t) => "#t\n" )
+ ((boolean? #f) => "#t\n" )
+ ((boolean? (fixnum? #\A)) => "#t\n" )
+ ((boolean? (fixnum? 65)) => "#t\n" )
- [(char? ()) => "#f\n" ]
- [(char? (fxsub1 1)) => "#f\n" ]
- [(char? (fxsub1 10)) => "#f\n" ]
- [(char? #\A) => "#t\n" ]
- [(char? 65) => "#f\n" ]
- [(char? (char->fixnum #\A)) => "#f\n" ]
- [(char? (fixnum->char 65)) => "#t\n" ]
- [(char? #t) => "#f\n" ]
- [(char? #f) => "#f\n" ]
- [(char? (fixnum? #\A)) => "#f\n" ]
- [(char? (fixnum? 65)) => "#f\n" ]
+ ((char? ()) => "#f\n" )
+ ((char? (fxsub1 1)) => "#f\n" )
+ ((char? (fxsub1 10)) => "#f\n" )
+ ((char? #\A) => "#t\n" )
+ ((char? 65) => "#f\n" )
+ ((char? (char->fixnum #\A)) => "#f\n" )
+ ((char? (fixnum->char 65)) => "#t\n" )
+ ((char? #t) => "#f\n" )
+ ((char? #f) => "#f\n" )
+ ((char? (fixnum? #\A)) => "#f\n" )
+ ((char? (fixnum? 65)) => "#f\n" )
- [(not 1) => "#f\n" ]
- [(not 0) => "#f\n" ]
- [(not ()) => "#f\n" ]
- [(not (fxsub1 1)) => "#f\n" ]
- [(not (fxsub1 10)) => "#f\n" ]
- [(not #\A) => "#f\n" ]
- [(not 65) => "#f\n" ]
- [(not (char->fixnum #\A)) => "#f\n" ]
- [(not (fixnum->char 65)) => "#f\n" ]
- [(not #t) => "#f\n" ]
- [(not #f) => "#t\n" ]
- [(not (fixnum? #\A)) => "#t\n" ]
- [(not (fixnum? 65)) => "#f\n" ]
- [(not (not (fixnum? 65))) => "#t\n" ]
- [(not (not (not (fixnum? 65)))) => "#f\n" ]
+ ((not 1) => "#f\n" )
+ ((not 0) => "#f\n" )
+ ((not ()) => "#f\n" )
+ ((not (fxsub1 1)) => "#f\n" )
+ ((not (fxsub1 10)) => "#f\n" )
+ ((not #\A) => "#f\n" )
+ ((not 65) => "#f\n" )
+ ((not (char->fixnum #\A)) => "#f\n" )
+ ((not (fixnum->char 65)) => "#f\n" )
+ ((not #t) => "#f\n" )
+ ((not #f) => "#t\n" )
+ ((not (fixnum? #\A)) => "#t\n" )
+ ((not (fixnum? 65)) => "#f\n" )
+ ((not (not (fixnum? 65))) => "#t\n" )
+ ((not (not (not (fixnum? 65)))) => "#f\n" )
)
(test-all)
diff --git a/languages/eclectus/t/vectors.t b/languages/eclectus/t/vectors.t
index c0c1b80..5f3ce77 100644
--- a/languages/eclectus/t/vectors.t
+++ b/languages/eclectus/t/vectors.t
@@ -3,7 +3,7 @@
(load "tests-driver.scm") ; this should come first
(add-tests-with-string-output "vectors"
- [#() => "#0()\n"]
+ (#() => "#0()\n")
)
(load "compiler.scm")
diff --git a/languages/eclectus/tests-driver.scm b/languages/eclectus/tests-driver.scm
index 959c8b6..43673a5 100644
--- a/languages/eclectus/tests-driver.scm
+++ b/languages/eclectus/tests-driver.scm
@@ -9,38 +9,38 @@
(define-syntax add-tests-with-string-output
(syntax-rules (=>)
- [(_ test-name [expr => output-string] ...)
+ ((_ test-name (expr => output-string) ...)
(set! all-tests
(cons
- '(test-name [expr string output-string] ...)
- all-tests))]))
+ '(test-name (expr string output-string) ...)
+ all-tests)))))
(define (test-one test-id test test-name)
- (let ([expr (car test)]
- [type (cadr test)]
- [out (caddr test)])
+ (let ((expr (car test))
+ (type (cadr test))
+ (out (caddr test)))
(flush-output-port)
(case type
- [(string) (test-with-string-output test-id expr out test-name)]
- [else (error 'test "invalid test type ~s" type)])))
+ ((string) (test-with-string-output test-id expr out test-name))
+ (else (error 'test "invalid test type ~s" type)))))
(define (test-all)
(plan (length (cdar all-tests)))
;; run the tests
- (let f ([i 0] [ls (reverse all-tests)])
+ (let f ((i 0) (ls (reverse all-tests)))
(if (null? ls)
(printf "") ; XXX remove this
- (let ([x (car ls)] [ls (cdr ls)])
- (let* ([test-name (car x)]
- [tests (cdr x)]
- [n (length tests)])
- (let g ([i i] [tests tests])
+ (let ((x (car ls)) (ls (cdr ls)))
+ (let* ((test-name (car x))
+ (tests (cdr x))
+ (n (length tests)))
+ (let g ((i i) (tests tests))
(cond
- [(null? tests) (f i ls)]
- [else
+ ((null? tests) (f i ls))
+ (else
(test-one i (car tests) test-name)
- (g (add1 i) (cdr tests))])))))))
+ (g (add1 i) (cdr tests))))))))))
(define compile-port
(make-parameter
@@ -53,8 +53,8 @@
(define (run-compile expr)
(if run-with-petite
(with-output-to-file "stst.scm" (lambda () (write expr)))
- (let ([p (open-output-file "stst.pir" 'replace)])
- (parameterize ([compile-port p])
+ (let ((p (open-output-file "stst.pir" 'replace)))
+ (parameterize ((compile-port p))
(compile-program expr))
(close-output-port p))))
@@ -77,10 +77,10 @@
(with-input-from-file "stst.out"
(lambda ()
(let f ()
- (let ([c (read-char)])
+ (let ((c (read-char)))
(cond
- [(eof-object? c) (void)]
- [else (display c) (f)]))))))))
+ ((eof-object? c) (void))
+ (else (display c) (f))))))))))
(define (test-with-string-output test-id expr expected-output test-name)
(run-compile expr)
Regards, Rotty
--
Andreas Rottmann | [EMAIL PROTECTED] | [EMAIL PROTECTED] | [EMAIL
PROTECTED]
http://rotty.uttx.net | GnuPG Key: http://rotty.uttx.net/gpg.asc
Fingerprint | C38A 39C5 16D7 B69F 33A3 6993 22C8 27F7 35A9 92E7
v2sw7MYChw5pr5OFma7u7Lw2m5g/l7Di6e6t5BSb7en6g3/5HZa2Xs6MSr1/2p7 hackerkey.com
Make free software, not war!