;;; -*-Scheme-*-
;;;
-;;; $Id: matcher.scm,v 1.3 2001/06/26 21:02:04 cph Exp $
+;;; $Id: matcher.scm,v 1.4 2001/06/26 21:16:44 cph Exp $
;;;
;;; Copyright (c) 2001 Massachusetts Institute of Technology
;;;
(define (generate-matcher-code expression)
(with-canonical-matcher-expression expression
(lambda (expression)
- (with-buffer-name
- (lambda ()
- (compile-matcher-expression
- expression
- (no-pointers)
- (simple-backtracking-continuation `#T)
- (simple-backtracking-continuation `#F)))))))
+ (compile-matcher-expression
+ expression
+ (no-pointers)
+ (simple-backtracking-continuation `#T)
+ (simple-backtracking-continuation `#F)))))
(define (compile-matcher-expression expression pointers if-succeed if-fail)
(cond ((and (pair? expression)
internal-bindings)))
(maybe-make-let (map (lambda (b) (list (cdr b) (car b)))
(cdr external-bindings))
- (receiver
- (maybe-make-let (map (lambda (b) (list (cdr b) (car b)))
- (cdr internal-bindings))
- expression))))))
+ (with-buffer-name
+ (lambda ()
+ (maybe-make-let (map (lambda (b) (list (cdr b) (car b)))
+ (cdr internal-bindings))
+ (receiver expression))))))))
(define (canonicalize-matcher-expression expression
external-bindings internal-bindings)
;;; -*-Scheme-*-
;;;
-;;; $Id: parser.scm,v 1.3 2001/06/26 21:02:06 cph Exp $
+;;; $Id: parser.scm,v 1.4 2001/06/26 21:16:46 cph Exp $
;;;
;;; Copyright (c) 2001 Massachusetts Institute of Technology
;;;
(define (generate-parser-code expression)
(with-canonical-parser-expression expression
(lambda (expression)
- (with-buffer-name
- (lambda ()
- (compile-parser-expression
- expression
- (no-pointers)
- (lambda (pointers result)
- (handle-pending-backtracking pointers
- (lambda (pointers)
- pointers
- result)))
- (simple-backtracking-continuation `#F)))))))
+ (compile-parser-expression
+ expression
+ (no-pointers)
+ (lambda (pointers result)
+ (handle-pending-backtracking pointers
+ (lambda (pointers)
+ pointers
+ result)))
+ (simple-backtracking-continuation `#F)))))
(define (compile-parser-expression expression pointers if-succeed if-fail)
(cond ((and (pair? expression)
(let ((expression (do-expression expression)))
(maybe-make-let (map (lambda (b) (list (cdr b) (car b)))
(cdr external-bindings))
- (receiver
- (maybe-make-let (map (lambda (b) (list (cdr b) (car b)))
- (cdr internal-bindings))
- expression))))))
+ (with-buffer-name
+ (lambda ()
+ (maybe-make-let (map (lambda (b) (list (cdr b) (car b)))
+ (cdr internal-bindings))
+ (receiver expression))))))))
\f
;;;; Parsers