(lambda ()
(s2 input senv output success failure)))))
+(define (spar-not spar)
+ (lambda (input senv output success failure)
+ (spar input senv output
+ (lambda (input* senv* output* failure*)
+ (declare (ignore input* senv* output* failure*))
+ (failure))
+ (lambda ()
+ (success input senv output failure)))))
+
(define (spar-succeed input senv output success failure)
(success input senv output failure))
(define (make-pattern-compiler expr? caller)
(call-with-constructors expr?
(lambda (:* :+ :and :call :close :compare :cons :elt :eqv? :form :hist :id?
- :if :list :match-elt :match-null :opt :or :push :push-elt
+ :if :list :match-elt :match-null :not :opt :or :push :push-elt
:push-elt-if :push-value :senv :symbol? :value)
(define (loop pattern)
('('if form form form) (apply :if (map loop (cdr pattern))))
('('or * form) (apply :or (map loop (cdr pattern))))
('('and * form) (apply :and (map loop (cdr pattern))))
+ ('('not form) (:not (loop (cadr pattern))))
('('noise form) (:match-elt (:eqv?) (cadr pattern) (:form)))
('('noise-keyword identifier)
(:match-elt (:compare) (cadr pattern) (:form)))
(const 'list list)
(proc 'spar-match-elt spar-match-elt)
(proc 'spar-match-null spar-match-null)
+ (proc 'spar-not spar-not)
(flat-proc 'spar-opt spar-opt)
(proc 'spar-or spar-or)
(proc 'spar-push spar-push)