From 68ba832658e25007c80f44e944455dd81d0973c3 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 27 Jun 2001 02:00:08 +0000 Subject: [PATCH] Eliminate compiler warnings. --- v7/src/star-parser/matcher.scm | 16 +++++++++------- v7/src/star-parser/parser.scm | 3 ++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/v7/src/star-parser/matcher.scm b/v7/src/star-parser/matcher.scm index b29b94fa4..4f84cd768 100644 --- a/v7/src/star-parser/matcher.scm +++ b/v7/src/star-parser/matcher.scm @@ -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 ;;; @@ -148,16 +148,16 @@ ;;;; 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)) @@ -196,15 +196,17 @@ `(MATCH-PARSER-BUFFER-STRING-CI ,*buffer-name* ,string)) (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 diff --git a/v7/src/star-parser/parser.scm b/v7/src/star-parser/parser.scm index 29fda85ab..950603272 100644 --- a/v7/src/star-parser/parser.scm +++ b/v7/src/star-parser/parser.scm @@ -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 ;;; @@ -253,6 +253,7 @@ ,(if-fail pointers))))))) (define-parser (* parser) + if-fail (handle-pending-backtracking pointers (lambda (pointers) (with-variable-binding -- 2.25.1