From 576e4bca74b1402e61b0371a40fe781bf4e4d49a Mon Sep 17 00:00:00 2001 From: dvanhorn Date: Mon, 2 Dec 2024 05:50:06 +0000 Subject: [PATCH] crook --- blackmail/test/parse.rkt | 3 ++- con/parse.rkt | 1 - con/test/parse.rkt | 8 +++++--- dodger/parse.rkt | 1 - dodger/test/parse.rkt | 3 ++- dupe/parse.rkt | 1 - dupe/test/parse.rkt | 3 ++- evildoer/parse.rkt | 1 - evildoer/test/parse.rkt | 3 ++- extort/parse.rkt | 1 - extort/test/parse.rkt | 3 ++- fraud/compile-stdin.rkt | 3 +-- fraud/interp-stdin.rkt | 3 +-- fraud/test/parse.rkt | 3 ++- hoax/assert.rkt | 5 ----- hoax/compile-stdin.rkt | 3 +-- hoax/interp-stdin.rkt | 3 +-- hoax/test/parse.rkt | 3 ++- hustle/assert.rkt | 5 ----- hustle/compile-stdin.rkt | 3 +-- hustle/interp-stdin.rkt | 3 +-- hustle/test/parse.rkt | 3 ++- iniquity/assert.rkt | 5 ----- iniquity/compile-stdin.rkt | 3 +-- iniquity/interp-stdin.rkt | 3 +-- iniquity/test/parse.rkt | 3 ++- jig/assert.rkt | 5 ----- jig/compile-stdin.rkt | 3 +-- jig/interp-stdin.rkt | 3 +-- jig/test/parse.rkt | 3 ++- knock/assert.rkt | 5 ----- knock/compile-stdin.rkt | 3 +-- knock/interp-stdin.rkt | 3 +-- knock/parse.rkt | 3 +-- knock/test/parse.rkt | 3 ++- loot/assert.rkt | 5 ----- loot/compile-stdin.rkt | 3 +-- loot/interp-stdin.rkt | 3 +-- loot/parse.rkt | 3 +-- loot/test/parse.rkt | 3 ++- 40 files changed, 45 insertions(+), 82 deletions(-) diff --git a/blackmail/test/parse.rkt b/blackmail/test/parse.rkt index 261bac7..59ac5ec 100644 --- a/blackmail/test/parse.rkt +++ b/blackmail/test/parse.rkt @@ -9,5 +9,6 @@ (begin ; Abscond (check-equal? (parse 42) (p (Lit 42))) (check-equal? (parse -1) (p (Lit -1)))) -(check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42)))) +(begin ; Blackmail + (check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42))))) diff --git a/con/parse.rkt b/con/parse.rkt index a539d4a..fbbe903 100644 --- a/con/parse.rkt +++ b/con/parse.rkt @@ -13,7 +13,6 @@ [(list s1) (Prim1 o (parse s1))] [_ (error "op1: bad syntax" s)])] - ['if (match sr [(list (list 'zero? s1) s2 s3) diff --git a/con/test/parse.rkt b/con/test/parse.rkt index b82c7b0..b25786d 100644 --- a/con/test/parse.rkt +++ b/con/test/parse.rkt @@ -9,7 +9,9 @@ (begin ; Abscond (check-equal? (parse 42) (p (Lit 42))) (check-equal? (parse -1) (p (Lit -1)))) -(check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42)))) -(check-equal? (parse '(if (zero? 1) 2 3)) - (p (IfZero (Lit 1) (Lit 2) (Lit 3)))) +(begin ; Blackmail + (check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42))))) +(begin ; Con + (check-equal? (parse '(if (zero? 1) 2 3)) + (p (IfZero (Lit 1) (Lit 2) (Lit 3))))) diff --git a/dodger/parse.rkt b/dodger/parse.rkt index 355bff2..72ee294 100644 --- a/dodger/parse.rkt +++ b/dodger/parse.rkt @@ -13,7 +13,6 @@ [(list s1) (Prim1 o (parse s1))] [_ (error "op1: bad syntax" s)])] - ['if (match sr [(list s1 s2 s3) diff --git a/dodger/test/parse.rkt b/dodger/test/parse.rkt index 8b0a907..b3913b8 100644 --- a/dodger/test/parse.rkt +++ b/dodger/test/parse.rkt @@ -9,7 +9,8 @@ (begin ; Abscond (check-equal? (parse 42) (p (Lit 42))) (check-equal? (parse -1) (p (Lit -1)))) -(check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42)))) +(begin ; Blackmail + (check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42))))) (begin ; Dupe (check-equal? (parse '(if (zero? 1) 2 3)) (p (If (Prim1 'zero? (Lit 1)) (Lit 2) (Lit 3)))) diff --git a/dupe/parse.rkt b/dupe/parse.rkt index 0ae5afe..439aec7 100644 --- a/dupe/parse.rkt +++ b/dupe/parse.rkt @@ -13,7 +13,6 @@ [(list s1) (Prim1 o (parse s1))] [_ (error "op1: bad syntax" s)])] - ['if (match sr [(list s1 s2 s3) diff --git a/dupe/test/parse.rkt b/dupe/test/parse.rkt index 18d8eda..8fd1122 100644 --- a/dupe/test/parse.rkt +++ b/dupe/test/parse.rkt @@ -9,7 +9,8 @@ (begin ; Abscond (check-equal? (parse 42) (p (Lit 42))) (check-equal? (parse -1) (p (Lit -1)))) -(check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42)))) +(begin ; Blackmail + (check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42))))) (begin ; Dupe (check-equal? (parse '(if (zero? 1) 2 3)) (p (If (Prim1 'zero? (Lit 1)) (Lit 2) (Lit 3)))) diff --git a/evildoer/parse.rkt b/evildoer/parse.rkt index 8e5b2a8..5d14abb 100644 --- a/evildoer/parse.rkt +++ b/evildoer/parse.rkt @@ -23,7 +23,6 @@ [(list s1 s2) (Begin (parse s1) (parse s2))] [_ (error "begin: bad syntax" s)])] - ['if (match sr [(list s1 s2 s3) diff --git a/evildoer/test/parse.rkt b/evildoer/test/parse.rkt index c806253..cefbeba 100644 --- a/evildoer/test/parse.rkt +++ b/evildoer/test/parse.rkt @@ -9,7 +9,8 @@ (begin ; Abscond (check-equal? (parse 42) (p (Lit 42))) (check-equal? (parse -1) (p (Lit -1)))) -(check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42)))) +(begin ; Blackmail + (check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42))))) (begin ; Dupe (check-equal? (parse '(if (zero? 1) 2 3)) (p (If (Prim1 'zero? (Lit 1)) (Lit 2) (Lit 3)))) diff --git a/extort/parse.rkt b/extort/parse.rkt index 8e5b2a8..5d14abb 100644 --- a/extort/parse.rkt +++ b/extort/parse.rkt @@ -23,7 +23,6 @@ [(list s1 s2) (Begin (parse s1) (parse s2))] [_ (error "begin: bad syntax" s)])] - ['if (match sr [(list s1 s2 s3) diff --git a/extort/test/parse.rkt b/extort/test/parse.rkt index c806253..cefbeba 100644 --- a/extort/test/parse.rkt +++ b/extort/test/parse.rkt @@ -9,7 +9,8 @@ (begin ; Abscond (check-equal? (parse 42) (p (Lit 42))) (check-equal? (parse -1) (p (Lit -1)))) -(check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42)))) +(begin ; Blackmail + (check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42))))) (begin ; Dupe (check-equal? (parse '(if (zero? 1) 2 3)) (p (If (Prim1 'zero? (Lit 1)) (Lit 2) (Lit 3)))) diff --git a/fraud/compile-stdin.rkt b/fraud/compile-stdin.rkt index 57338d3..b8e500c 100644 --- a/fraud/compile-stdin.rkt +++ b/fraud/compile-stdin.rkt @@ -9,6 +9,5 @@ ;; emit asm code on stdout (define (main) (read-line) ; ignore #lang racket line - (asm-display (compile - (parse-closed (read))))) + (asm-display (compile (parse-closed (read))))) diff --git a/fraud/interp-stdin.rkt b/fraud/interp-stdin.rkt index 9bdd9e0..0a8c3e6 100644 --- a/fraud/interp-stdin.rkt +++ b/fraud/interp-stdin.rkt @@ -8,6 +8,5 @@ ;; print result on stdout (define (main) (read-line) ; ignore #lang racket line - (println (interp - (parse-closed (read))))) + (println (interp (parse-closed (read))))) diff --git a/fraud/test/parse.rkt b/fraud/test/parse.rkt index 1d9a40b..9573d4f 100644 --- a/fraud/test/parse.rkt +++ b/fraud/test/parse.rkt @@ -9,7 +9,8 @@ (begin ; Abscond (check-equal? (parse 42) (p (Lit 42))) (check-equal? (parse -1) (p (Lit -1)))) -(check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42)))) +(begin ; Blackmail + (check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42))))) (begin ; Dupe (check-equal? (parse '(if (zero? 1) 2 3)) (p (If (Prim1 'zero? (Lit 1)) (Lit 2) (Lit 3)))) diff --git a/hoax/assert.rkt b/hoax/assert.rkt index de6da68..8327110 100644 --- a/hoax/assert.rkt +++ b/hoax/assert.rkt @@ -22,13 +22,8 @@ ;; Register -> Asm - (define assert-char (assert-type mask-char type-char)) - - - - (define assert-box (assert-type ptr-mask type-box)) (define assert-cons diff --git a/hoax/compile-stdin.rkt b/hoax/compile-stdin.rkt index 57338d3..b8e500c 100644 --- a/hoax/compile-stdin.rkt +++ b/hoax/compile-stdin.rkt @@ -9,6 +9,5 @@ ;; emit asm code on stdout (define (main) (read-line) ; ignore #lang racket line - (asm-display (compile - (parse-closed (read))))) + (asm-display (compile (parse-closed (read))))) diff --git a/hoax/interp-stdin.rkt b/hoax/interp-stdin.rkt index 9bdd9e0..0a8c3e6 100644 --- a/hoax/interp-stdin.rkt +++ b/hoax/interp-stdin.rkt @@ -8,6 +8,5 @@ ;; print result on stdout (define (main) (read-line) ; ignore #lang racket line - (println (interp - (parse-closed (read))))) + (println (interp (parse-closed (read))))) diff --git a/hoax/test/parse.rkt b/hoax/test/parse.rkt index fd50839..244f4a5 100644 --- a/hoax/test/parse.rkt +++ b/hoax/test/parse.rkt @@ -9,7 +9,8 @@ (begin ; Abscond (check-equal? (parse 42) (p (Lit 42))) (check-equal? (parse -1) (p (Lit -1)))) -(check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42)))) +(begin ; Blackmail + (check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42))))) (begin ; Dupe (check-equal? (parse '(if (zero? 1) 2 3)) (p (If (Prim1 'zero? (Lit 1)) (Lit 2) (Lit 3)))) diff --git a/hustle/assert.rkt b/hustle/assert.rkt index 248fee2..a7c4077 100644 --- a/hustle/assert.rkt +++ b/hustle/assert.rkt @@ -21,13 +21,8 @@ ;; Register -> Asm - (define assert-char (assert-type mask-char type-char)) - - - - (define assert-box (assert-type ptr-mask type-box)) (define assert-cons diff --git a/hustle/compile-stdin.rkt b/hustle/compile-stdin.rkt index 57338d3..b8e500c 100644 --- a/hustle/compile-stdin.rkt +++ b/hustle/compile-stdin.rkt @@ -9,6 +9,5 @@ ;; emit asm code on stdout (define (main) (read-line) ; ignore #lang racket line - (asm-display (compile - (parse-closed (read))))) + (asm-display (compile (parse-closed (read))))) diff --git a/hustle/interp-stdin.rkt b/hustle/interp-stdin.rkt index 9bdd9e0..0a8c3e6 100644 --- a/hustle/interp-stdin.rkt +++ b/hustle/interp-stdin.rkt @@ -8,6 +8,5 @@ ;; print result on stdout (define (main) (read-line) ; ignore #lang racket line - (println (interp - (parse-closed (read))))) + (println (interp (parse-closed (read))))) diff --git a/hustle/test/parse.rkt b/hustle/test/parse.rkt index 8d66e01..2624a74 100644 --- a/hustle/test/parse.rkt +++ b/hustle/test/parse.rkt @@ -9,7 +9,8 @@ (begin ; Abscond (check-equal? (parse 42) (p (Lit 42))) (check-equal? (parse -1) (p (Lit -1)))) -(check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42)))) +(begin ; Blackmail + (check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42))))) (begin ; Dupe (check-equal? (parse '(if (zero? 1) 2 3)) (p (If (Prim1 'zero? (Lit 1)) (Lit 2) (Lit 3)))) diff --git a/iniquity/assert.rkt b/iniquity/assert.rkt index de6da68..8327110 100644 --- a/iniquity/assert.rkt +++ b/iniquity/assert.rkt @@ -22,13 +22,8 @@ ;; Register -> Asm - (define assert-char (assert-type mask-char type-char)) - - - - (define assert-box (assert-type ptr-mask type-box)) (define assert-cons diff --git a/iniquity/compile-stdin.rkt b/iniquity/compile-stdin.rkt index baf2841..ed18b5e 100644 --- a/iniquity/compile-stdin.rkt +++ b/iniquity/compile-stdin.rkt @@ -10,6 +10,5 @@ ;; emit asm code on stdout (define (main) (read-line) ; ignore #lang racket line - (asm-display (compile - (apply parse-closed (read-all))))) + (asm-display (compile (apply parse-closed (read-all))))) diff --git a/iniquity/interp-stdin.rkt b/iniquity/interp-stdin.rkt index 22ca0cb..df745af 100644 --- a/iniquity/interp-stdin.rkt +++ b/iniquity/interp-stdin.rkt @@ -9,6 +9,5 @@ ;; print result on stdout (define (main) (read-line) ; ignore #lang racket line - (println (interp - (apply parse-closed (read-all))))) + (println (interp (apply parse-closed (read-all))))) diff --git a/iniquity/test/parse.rkt b/iniquity/test/parse.rkt index 3fa039c..fd413ee 100644 --- a/iniquity/test/parse.rkt +++ b/iniquity/test/parse.rkt @@ -9,7 +9,8 @@ (begin ; Abscond (check-equal? (parse 42) (p (Lit 42))) (check-equal? (parse -1) (p (Lit -1)))) -(check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42)))) +(begin ; Blackmail + (check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42))))) (begin ; Dupe (check-equal? (parse '(if (zero? 1) 2 3)) (p (If (Prim1 'zero? (Lit 1)) (Lit 2) (Lit 3)))) diff --git a/jig/assert.rkt b/jig/assert.rkt index de6da68..8327110 100644 --- a/jig/assert.rkt +++ b/jig/assert.rkt @@ -22,13 +22,8 @@ ;; Register -> Asm - (define assert-char (assert-type mask-char type-char)) - - - - (define assert-box (assert-type ptr-mask type-box)) (define assert-cons diff --git a/jig/compile-stdin.rkt b/jig/compile-stdin.rkt index baf2841..ed18b5e 100644 --- a/jig/compile-stdin.rkt +++ b/jig/compile-stdin.rkt @@ -10,6 +10,5 @@ ;; emit asm code on stdout (define (main) (read-line) ; ignore #lang racket line - (asm-display (compile - (apply parse-closed (read-all))))) + (asm-display (compile (apply parse-closed (read-all))))) diff --git a/jig/interp-stdin.rkt b/jig/interp-stdin.rkt index 22ca0cb..df745af 100644 --- a/jig/interp-stdin.rkt +++ b/jig/interp-stdin.rkt @@ -9,6 +9,5 @@ ;; print result on stdout (define (main) (read-line) ; ignore #lang racket line - (println (interp - (apply parse-closed (read-all))))) + (println (interp (apply parse-closed (read-all))))) diff --git a/jig/test/parse.rkt b/jig/test/parse.rkt index 3fa039c..fd413ee 100644 --- a/jig/test/parse.rkt +++ b/jig/test/parse.rkt @@ -9,7 +9,8 @@ (begin ; Abscond (check-equal? (parse 42) (p (Lit 42))) (check-equal? (parse -1) (p (Lit -1)))) -(check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42)))) +(begin ; Blackmail + (check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42))))) (begin ; Dupe (check-equal? (parse '(if (zero? 1) 2 3)) (p (If (Prim1 'zero? (Lit 1)) (Lit 2) (Lit 3)))) diff --git a/knock/assert.rkt b/knock/assert.rkt index de6da68..8327110 100644 --- a/knock/assert.rkt +++ b/knock/assert.rkt @@ -22,13 +22,8 @@ ;; Register -> Asm - (define assert-char (assert-type mask-char type-char)) - - - - (define assert-box (assert-type ptr-mask type-box)) (define assert-cons diff --git a/knock/compile-stdin.rkt b/knock/compile-stdin.rkt index baf2841..ed18b5e 100644 --- a/knock/compile-stdin.rkt +++ b/knock/compile-stdin.rkt @@ -10,6 +10,5 @@ ;; emit asm code on stdout (define (main) (read-line) ; ignore #lang racket line - (asm-display (compile - (apply parse-closed (read-all))))) + (asm-display (compile (apply parse-closed (read-all))))) diff --git a/knock/interp-stdin.rkt b/knock/interp-stdin.rkt index 22ca0cb..df745af 100644 --- a/knock/interp-stdin.rkt +++ b/knock/interp-stdin.rkt @@ -9,6 +9,5 @@ ;; print result on stdout (define (main) (read-line) ; ignore #lang racket line - (println (interp - (apply parse-closed (read-all))))) + (println (interp (apply parse-closed (read-all))))) diff --git a/knock/parse.rkt b/knock/parse.rkt index 6585118..7c33d8b 100644 --- a/knock/parse.rkt +++ b/knock/parse.rkt @@ -1,6 +1,5 @@ #lang racket -(provide parse parse-closed parse-e parse-define - parse-pattern) +(provide parse parse-closed parse-e parse-define parse-pattern) (require "ast.rkt") ;; [Listof S-Expr] -> Prog diff --git a/knock/test/parse.rkt b/knock/test/parse.rkt index 020fd58..85ccaa8 100644 --- a/knock/test/parse.rkt +++ b/knock/test/parse.rkt @@ -9,7 +9,8 @@ (begin ; Abscond (check-equal? (parse 42) (p (Lit 42))) (check-equal? (parse -1) (p (Lit -1)))) -(check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42)))) +(begin ; Blackmail + (check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42))))) (begin ; Dupe (check-equal? (parse '(if (zero? 1) 2 3)) (p (If (Prim1 'zero? (Lit 1)) (Lit 2) (Lit 3)))) diff --git a/loot/assert.rkt b/loot/assert.rkt index f1019bf..df76256 100644 --- a/loot/assert.rkt +++ b/loot/assert.rkt @@ -23,13 +23,8 @@ ;; Register -> Asm - (define assert-char (assert-type mask-char type-char)) - - - - (define assert-box (assert-type ptr-mask type-box)) (define assert-cons diff --git a/loot/compile-stdin.rkt b/loot/compile-stdin.rkt index baf2841..ed18b5e 100644 --- a/loot/compile-stdin.rkt +++ b/loot/compile-stdin.rkt @@ -10,6 +10,5 @@ ;; emit asm code on stdout (define (main) (read-line) ; ignore #lang racket line - (asm-display (compile - (apply parse-closed (read-all))))) + (asm-display (compile (apply parse-closed (read-all))))) diff --git a/loot/interp-stdin.rkt b/loot/interp-stdin.rkt index 22ca0cb..df745af 100644 --- a/loot/interp-stdin.rkt +++ b/loot/interp-stdin.rkt @@ -9,6 +9,5 @@ ;; print result on stdout (define (main) (read-line) ; ignore #lang racket line - (println (interp - (apply parse-closed (read-all))))) + (println (interp (apply parse-closed (read-all))))) diff --git a/loot/parse.rkt b/loot/parse.rkt index 5a3ec99..651a052 100644 --- a/loot/parse.rkt +++ b/loot/parse.rkt @@ -1,6 +1,5 @@ #lang racket -(provide parse parse-closed parse-e parse-define - parse-pattern) +(provide parse parse-closed parse-e parse-define parse-pattern) (require "ast.rkt") ;; [Listof S-Expr] -> Prog diff --git a/loot/test/parse.rkt b/loot/test/parse.rkt index fcac010..588decf 100644 --- a/loot/test/parse.rkt +++ b/loot/test/parse.rkt @@ -9,7 +9,8 @@ (begin ; Abscond (check-equal? (parse 42) (p (Lit 42))) (check-equal? (parse -1) (p (Lit -1)))) -(check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42)))) +(begin ; Blackmail + (check-equal? (parse '(add1 42)) (p (Prim1 'add1 (Lit 42))))) (begin ; Dupe (check-equal? (parse '(if (zero? 1) 2 3)) (p (If (Prim1 'zero? (Lit 1)) (Lit 2) (Lit 3))))