#| -*-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
(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)))
#| -*-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
(files "parser-buffer")
(parent (runtime))
(export ()
+ call-on-parser-buffer-tail
discard-parser-buffer-head!
get-parser-buffer-pointer
get-parser-buffer-tail