almost there for simple asserta compiler is defunct

parent fd724875
......@@ -37,6 +37,7 @@ add/run * vlist *
|#
(define (pp x) (pretty-print x) x)
(define (ppp a x) (pretty-print (list a (syntax->datum x))) x)
(define (make-indexer) #(#f #f 0 #f 0))
......@@ -316,7 +317,6 @@ add/run * vlist *
(ar (get-ar e))
(l (get-li e))
(data (vector t a f c)))
(pk a)
(vector (next-bitmap-tag t)
(dynlist-add d data)
(my-list-add ar data)
......@@ -615,7 +615,7 @@ add/run * vlist *
((_ s 'x 'l)
(ck s '(x . l)))))
(define-syntax parse-list
(define parse-list
(lambda (x)
(let lp ((x x))
(syntax-case x (quote unquote and)
......@@ -624,21 +624,39 @@ add/run * vlist *
((and x y)
(lp #'y))
((unquote x)
#'(unquote x)))
#'(unquote x))
('x
#''x)
(x
(identifier? #'x)
#'(ck s '(unquote (gp-make-var))))
((x . l)
#`(#,(cons (lp #''x) (lp #''l))))
((_ s 'x)
#'(ck s 'x))))))
(cons (lp #'x) (lp #'l)))
(y
(if (identifier? #'y)
(list #'unquote #'(gp-make-var))
#'y))))))
(define parse-list2
(lambda (x)
(let lp ((x x))
(syntax-case x (quote unquote and)
(#(x ...)
(apply vector (lp #'(x ...))))
((and x y)
(lp #'y))
((unquote x)
#'(unquote x))
('x
#'x)
((x . l)
(cons (lp #'x) (lp #'l)))
(y
(if (identifier? #'y)
(list #'unquote #'(gp-make-var))
#'y))))))
(define-syntax mk-varpat
(lambda (x)
(syntax-case x ()
((_ x) #`'#,(parse-list #'x)))))
((_ y) #``#,(ppp 'parse-list (parse-list #'y))))))
(define-syntax <lambda-dyn>
......
......@@ -364,7 +364,7 @@ conversation1(X,All) :-
conversation2(X,All).
tree :- when[(fluid-ref -rec?-)]
-> (do[(fluid-set! -rec?- #f)],write(tree),nl,rational_trees);
-> (do[(fluid-set! -rec?- #f)],rational_trees);
when[(fluid-ref -nonrec?-)]
-> (do[(fluid-set! -rec?- #f)],non_rational_trees);
true.
......@@ -411,7 +411,7 @@ hash_new(X,Y,H,I) :-
output_and_more(V,N) :-
when[(eq? (fluid-ref -mute?-) #t)] -> more ;
(
(V==[] -> write(\"yes\") ; (once(vtosym(V,VV)),write_out(VV,N),nl)), more
(V==[] -> (write(\"yes\"),nl) ; (once(vtosym(V,VV)),write_out(VV,N),nl)), more
).
write_out([],[]).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment