From 42125126d40c9d65e9c43d29874c040b9017edff Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 11 Oct 2003 03:48:16 +0000 Subject: [PATCH] Implement CALL-ON-PARSER-BUFFER-TAIL. --- v7/src/runtime/parser-buffer.scm | 9 ++++++--- v7/src/runtime/runtime.pkg | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/v7/src/runtime/parser-buffer.scm b/v7/src/runtime/parser-buffer.scm index 7ad4f6672..4e07678fd 100644 --- a/v7/src/runtime/parser-buffer.scm +++ b/v7/src/runtime/parser-buffer.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: parser-buffer.scm,v 1.8 2003/02/28 04:40:12 cph Exp $ +$Id: parser-buffer.scm,v 1.9 2003/10/11 03:48:16 cph Exp $ Copyright 2001,2002,2003 Massachusetts Institute of Technology @@ -90,10 +90,13 @@ USA. (set-parser-buffer-line! buffer (parser-buffer-pointer-line p))) (define (get-parser-buffer-tail buffer p) + (call-on-parser-buffer-tail buffer p substring)) + +(define (call-on-parser-buffer-tail buffer p procedure) ;; P must be a buffer pointer previously returned by - ;; GET-PARSER-BUFFER-POINTER. Return the string of characters + ;; GET-PARSER-BUFFER-POINTER. Call PROCEDURE on the substring ;; between P and the current buffer pointer. - (substring (parser-buffer-string buffer) + (procedure (parser-buffer-string buffer) (pointer->index p buffer) (parser-buffer-index buffer))) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index cd7f6ba3d..d1f567d2f 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.463 2003/10/01 18:07:41 cph Exp $ +$Id: runtime.pkg,v 14.464 2003/10/11 03:48:07 cph Exp $ Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology @@ -4485,6 +4485,7 @@ USA. (files "parser-buffer") (parent (runtime)) (export () + call-on-parser-buffer-tail discard-parser-buffer-head! get-parser-buffer-pointer get-parser-buffer-tail -- 2.25.1