some updates

parent b2ec7413
......@@ -34,6 +34,7 @@
<get-fixed> <cp> <lookup> <wrap>
))
(define (gp-gc) #f)
(define (<wrap> f . l)
(apply f (fluid-ref *current-stack*) (lambda x #f) (lambda x #t) l))
......
......@@ -178,8 +178,10 @@
(define-syntax-rule (setup-parser
<p-define> <p-lambda> <fail> <p-cc> <succeds> .. xx
X XL N M
s-false s-true s-mk-seq s-mk-and s-mk-or)
X XL N M (Init ...)
s-false s-true s-mk-seq s-mk-and s-mk-or
s-seq s-and s-and! s-and!! s-or
pp)
(begin
(define f-read
(<p-lambda> (c)
......@@ -468,10 +470,10 @@
(with-fluids ((*freeze-map* (fluid-ref *freeze-map*)))
(clear-tokens)
(<run> 1 (cout)
(<values> (x xl n m out)
(matcher '() (make-file-reader) 0 0 _))
(<values> (x xl . l)
(matcher '() (make-file-reader) Init ... _))
(<code> (print-last-line xl))
(<=> cout out)))))
(<=> cout ,(car (reverse l)))))))
(if (string? str)
(with-input-from-string str f)
(with-input-from-port str f)))
......@@ -480,10 +482,10 @@
(with-fluids ((*freeze-map* (fluid-ref *freeze-map*)))
(clear-tokens)
(<run> 1 (cout)
(<values> (x xl n m out)
(matcher '() (make-file-reader) 0 0 _))
(<values> (x xl . l)
(matcher '() (make-file-reader) Init ... _))
(<code> (print-last-line xl))
(<=> cout out))))))
(<=> cout ,(car (reverse l))))))))
(define parse-no-clear
(case-lambda
......@@ -627,5 +629,6 @@
(setup-parser
<p-define> <p-lambda> <fail> <p-cc> <succeds> .. xx
X XL N M
s-false s-true s-mk-seq s-mk-and s-mk-or)
X XL N M (0 0)
s-false s-true s-mk-seq s-mk-and s-mk-or
s-seq s-and s-and! s-and!! s-or pp)
......@@ -35,6 +35,7 @@
(when do-print
(pretty-print (syntax->datum x)))
x)))
(define-syntax-rule (wrap@ u code)
(let ((r code)
(u (<scm> u)))
......
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