Fix code-generation bug in MATCH element.
authorChris Hanson <org/chris-hanson/cph>
Wed, 27 Jun 2001 01:53:53 +0000 (01:53 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 27 Jun 2001 01:53:53 +0000 (01:53 +0000)
v7/src/star-parser/parser.scm

index 7d832dad1f6cf58740e9926dde7d86022cf73fac..29fda85abcb098e5192a28f6c156973f68306384 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: parser.scm,v 1.7 2001/06/26 23:46:41 cph Exp $
+;;; $Id: parser.scm,v 1.8 2001/06/27 01:53:53 cph Exp $
 ;;;
 ;;; Copyright (c) 2001 Massachusetts Institute of Technology
 ;;;
     (lambda (start-pointers)
       (compile-matcher-expression matcher start-pointers
        (lambda (pointers)
-         (if-succeed pointers
-                     `(VECTOR (GET-PARSER-BUFFER-TAIL
-                               ,*buffer-name*
-                               ,(current-pointer start-pointers)))))
+         (with-variable-binding
+             `(VECTOR (GET-PARSER-BUFFER-TAIL
+                       ,*buffer-name*
+                       ,(current-pointer start-pointers)))
+           (lambda (v)
+             (if-succeed pointers v))))
        if-fail))))
 
 (define-parser (noise matcher)