deferred-items)))
spar-discard-elt
(spar* spar-push-deferred-classified-elt)
- spar-require-null))))
+ spar-match-null))))
(define :if
(spar-promise->runtime
spar-push-classified-elt
(spar-alt spar-push-classified-elt
(spar-push-thunk-value unspecific-item))
- spar-require-null))))
+ spar-match-null))))
(define :quote
(spar-promise->runtime
(spar-call-with-values constant-item
spar-discard-elt
(spar-elt (spar-push-mapped-form strip-syntactic-closures))
- spar-require-null))))
+ spar-match-null))))
(define :quote-identifier
(spar-promise->runtime
(spar-call-with-values quoted-id-item
spar-discard-elt
(spar-elt (spar-push-mapped-full lookup-identifier))
- spar-require-null))))
+ spar-match-null))))
(define :set!
(spar-promise->runtime
rhs-item)))
spar-discard-elt
spar-push-classified-elt
- (spar-require-value
+ (spar-match-value
(lambda (lhs-item)
(or (var-item? lhs-item)
(access-item? lhs-item))))
(spar-alt spar-push-classified-elt
(spar-push-thunk-value unassigned-item))
- spar-require-null))))
+ spar-match-null))))
;; TODO: this is a classifier rather than a macro because it uses the
;; special OUTPUT/DISJUNCTION. Unfortunately something downstream in
(spar-encapsulate-values or-item
spar-discard-elt
(spar* spar-push-classified-elt)
- spar-require-null))))
+ spar-match-null))))
\f
;;;; Definitions
(spar-call-with-values defn-item
spar-discard-elt
(spar-elt
- (spar-require-form identifier?)
+ (spar-match-form identifier?)
(spar-push-mapped-full bind-variable))
spar-push-classified-elt
- spar-require-null))))
+ spar-match-null))))
(define :define-syntax
(spar-promise->runtime
spar-push-id-elt
spar-push-senv
spar-push-classified-elt
- (spar-require-value keyword-item?)
- spar-require-null))))
+ (spar-match-value keyword-item?)
+ spar-match-null))))
;;;; Lambdas
(lambda (bvl body senv)
(assemble-lambda-item scode-lambda-name:unnamed bvl body senv))
spar-discard-elt
- (spar-elt (spar-require-form mit-lambda-list?)
+ (spar-elt (spar-match-form mit-lambda-list?)
spar-push-form)
spar-push-body
spar-push-senv))))
(assemble-lambda-item (identifier->symbol name) bvl body senv))
spar-discard-elt
(spar-elt spar-push-id-elt
- (spar-require-form mit-lambda-list?)
+ (spar-match-form mit-lambda-list?)
spar-push-form)
spar-push-body
spar-push-senv))))
(spar-call-with-values delay-item
spar-discard-elt
spar-push-deferred-classified-elt
- spar-require-null))))
+ spar-match-null))))
\f
;;;; LET-like
(spar-call-with-values cons
(spar-elt spar-push-id-elt
spar-push-classified-elt
- spar-require-null))))
- spar-require-null)
+ spar-match-null))))
+ spar-match-null)
spar-push-body
spar-push-senv))))
(spar-call-with-values cons
(spar-elt spar-push-id-elt
spar-push-classified-elt
- spar-require-null))))
- spar-require-null)
+ spar-match-null))))
+ spar-match-null)
spar-push-body
spar-push-senv)))
(spar-call-with-values cons
(spar-elt spar-push-id-elt
spar-push-open-classified-elt
- spar-require-null))))
- spar-require-null)
+ spar-match-null))))
+ spar-match-null)
spar-push-body
spar-push-senv))))
\f
spar-discard-elt
spar-push-id-elt
spar-push-classified-elt
- spar-require-null))))
+ spar-match-null))))
(define-item-compiler access-item?
(lambda (item)
(spar-promise->runtime
(delay
(spar-seq
- (spar-require-senv senv-top-level?)
+ (spar-match-senv senv-top-level?)
spar-discard-elt
- spar-require-null
+ spar-match-null
(spar-push-thunk-value the-environment-item)))))
(define keyword:unspecific
(delay
(spar-seq
spar-discard-elt
- spar-require-null
+ spar-match-null
(spar-push-thunk-value unspecific-item)))))
(define keyword:unassigned
(delay
(spar-seq
spar-discard-elt
- spar-require-null
+ spar-match-null
(spar-push-thunk-value unassigned-item)))))
;;;; Declarations
(spar-push-values
(spar*
(spar-elt
- (spar-require-form
+ (spar-match-form
(lambda (form)
(and (pair? form)
(identifier? (car form))
(list? (cdr form)))))
spar-push-form)))
- spar-require-null
+ spar-match-null
spar-push-senv
spar-push-hist))))
\f
;;;; Primitives
-(define (spar-require-form predicate)
+(define (spar-match-form predicate)
(lambda (input senv output success failure)
(if (predicate (%input-form input))
(success input senv output failure)
(failure))))
-(define (spar-require-senv predicate)
+(define (spar-match-senv predicate)
(lambda (input senv output success failure)
(if (predicate senv)
(success input senv output failure)
(failure))))
-(define (spar-require-full predicate)
+(define (spar-match-full predicate)
(lambda (input senv output success failure)
(if (predicate (%input-form input) senv)
(success input senv output failure)
(failure))))
-(define (spar-require-value predicate)
+(define (spar-match-value predicate)
(lambda (input senv output success failure)
(if (predicate (%output-top output))
(success input senv output failure)
(define spar-discard-elt
(spar-elt spar-discard-form))
-(define spar-require-null
- (spar-require-form null?))
+(define spar-match-null
+ (spar-match-form null?))
(define spar-push-elt
(spar-elt spar-push-form))
(spar-elt spar-push-open-classified-form))
(define-deferred spar-push-id-elt
- (spar-elt (spar-require-form identifier?)
+ (spar-elt (spar-match-form identifier?)
spar-push-form))
(define (spar-push-id-elt= id)
- (spar-elt (spar-require-full
+ (spar-elt (spar-match-full
(lambda (form senv)
(and (identifier? form)
(identifier=? senv form senv id))))
(map-in-order (lambda (elt) (elt body-senv))
elts))))
(spar+ spar-push-open-classified-elt)
- spar-require-null))
\ No newline at end of file
+ spar-match-null))
\ No newline at end of file