Eliminate compiler warnings.
authorChris Hanson <org/chris-hanson/cph>
Wed, 27 Jun 2001 02:00:08 +0000 (02:00 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 27 Jun 2001 02:00:08 +0000 (02:00 +0000)
v7/src/star-parser/matcher.scm
v7/src/star-parser/parser.scm

index b29b94fa48d88df7a8f8b84311f0ff6dbc40fa83..4f84cd768aa21dbe6419baa3f728cb3eaf838944 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: matcher.scm,v 1.4 2001/06/26 21:16:44 cph Exp $
+;;; $Id: matcher.scm,v 1.5 2001/06/27 02:00:08 cph Exp $
 ;;;
 ;;; Copyright (c) 2001 Massachusetts Institute of Technology
 ;;;
 \f
 ;;;; Matchers
 
-(define-macro (define-matcher form compiler-body)
+(define-macro (define-matcher form compiler-body)
   (let ((name (car form))
        (parameters (cdr form)))
     (if (symbol? parameters)
        `(DEFINE-MATCHER-COMPILER ',name #F
           (LAMBDA (POINTERS IF-SUCCEED IF-FAIL ,parameters)
-            ,compiler-body))
+            ,@compiler-body))
        `(DEFINE-MATCHER-COMPILER ',name ,(length parameters)
           (LAMBDA (POINTERS IF-SUCCEED IF-FAIL ,@parameters)
-            ,compiler-body)))))
+            ,@compiler-body)))))
 
 (define (define-matcher-compiler keyword arity compiler)
   (hash-table/put! matcher-compilers keyword (cons arity compiler))
   `(MATCH-PARSER-BUFFER-STRING-CI ,*buffer-name* ,string))
 \f
 (define-matcher (* expression)
+  if-fail
   (handle-pending-backtracking pointers
     (lambda (pointers)
-      (let ((v (generate-uninterned-symbol)))
+      (let ((pointers (unknown-location pointers))
+           (v (generate-uninterned-symbol)))
        `(BEGIN
           (LET ,v ()
-            ,(compile-matcher-expression expression (no-pointers)
+            ,(compile-matcher-expression expression pointers
                (simple-backtracking-continuation `(,v))
                (simple-backtracking-continuation `UNSPECIFIC)))
-          ,(if-succeed (no-pointers)))))))
+          ,(if-succeed pointers))))))
 
 (define-matcher (seq . expressions)
   (with-current-pointer pointers
index 29fda85abcb098e5192a28f6c156973f68306384..9506032728acc97dfef5c49ebbcb7154dbb06074 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: parser.scm,v 1.8 2001/06/27 01:53:53 cph Exp $
+;;; $Id: parser.scm,v 1.9 2001/06/27 01:57:16 cph Exp $
 ;;;
 ;;; Copyright (c) 2001 Massachusetts Institute of Technology
 ;;;
               ,(if-fail pointers)))))))
 
 (define-parser (* parser)
+  if-fail
   (handle-pending-backtracking pointers
     (lambda (pointers)
       (with-variable-binding