;;; -*-Scheme-*-
;;;
-;;; $Id: buffer.scm,v 1.7 2001/07/05 18:51:23 cph Exp $
+;;; $Id: buffer.scm,v 1.8 2001/07/11 00:41:50 cph Exp $
;;;
;;; Copyright (c) 2001 Massachusetts Institute of Technology
;;;
(and (guarantee-buffer-chars buffer 1)
(string-ref (parser-buffer-string buffer)
(parser-buffer-index buffer))))
+
+(define (parser-buffer-ref buffer index)
+ (if (not (index-fixnum? index))
+ (error:wrong-type-argument index "index" '???))
+ (and (guarantee-buffer-chars buffer (fix:+ index 1))
+ (string-ref (parser-buffer-string buffer)
+ (fix:+ (parser-buffer-index buffer) index))))
\f
(let-syntax
((char-matcher
;;; -*-Scheme-*-
;;;
-;;; $Id: load.scm,v 1.4 2001/07/02 18:21:01 cph Exp $
+;;; $Id: load.scm,v 1.5 2001/07/11 00:41:52 cph Exp $
;;;
;;; Copyright (c) 2001 Massachusetts Institute of Technology
;;;
(lambda ()
(fluid-let ((*allow-package-redefinition?* #t))
(package/system-loader "parser" '() 'QUERY))))
-(add-subsystem-identification! "*Parser" '(0 4))
\ No newline at end of file
+(add-subsystem-identification! "*Parser" '(0 5))
\ No newline at end of file
;;; -*-Scheme-*-
;;;
-;;; $Id: parser.pkg,v 1.5 2001/07/02 18:20:47 cph Exp $
+;;; $Id: parser.pkg,v 1.6 2001/07/11 00:41:55 cph Exp $
;;;
;;; Copyright (c) 2001 Massachusetts Institute of Technology
;;;
parser-buffer-pointer-line
parser-buffer-pointer?
parser-buffer-position-string
+ parser-buffer-ref
parser-buffer?
peek-parser-buffer-char
read-parser-buffer-char