From 70710f143833b614a54892cec8bdda2cee91a587 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 20 May 1991 20:32:20 +0000 Subject: [PATCH] Add new primitive SCAN-FORWARD-PREFIX-CHARS. --- v7/src/microcode/syntax.c | 23 +++++++++++++++++++++-- v7/src/microcode/version.h | 4 ++-- v8/src/microcode/version.h | 4 ++-- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/v7/src/microcode/syntax.c b/v7/src/microcode/syntax.c index 5fb46a25d..623b5f4b6 100644 --- a/v7/src/microcode/syntax.c +++ b/v7/src/microcode/syntax.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/syntax.c,v 1.20 1989/09/20 23:12:00 cph Rel $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/syntax.c,v 1.21 1991/05/20 20:31:51 cph Exp $ -Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology +Copyright (c) 1987-91 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -316,6 +316,25 @@ DEFINE_PRIMITIVE ("SCAN-BACKWARD-PREFIX-CHARS", Prim_scan_backward_prefix_chars, MOVE_LEFT (start); } } + +DEFINE_PRIMITIVE ("SCAN-FORWARD-PREFIX-CHARS", Prim_scan_forward_prefix_chars, 4, 4, 0) +{ + Boolean quoted; + NORMAL_INITIALIZATION_FORWARD (4); + + while (true) + { + WIN_IF_RIGHT_END (start); + RIGHT_QUOTED_P (start, quoted); + WIN_IF (quoted); + { + long sentry = (PEEK_RIGHT (start)); + WIN_IF (! (((SYNTAX_ENTRY_CODE (sentry)) == syntaxcode_quote) + || (SYNTAX_ENTRY_PREFIX (sentry)))); + } + MOVE_RIGHT (start); + } +} /* Word Parsers */ diff --git a/v7/src/microcode/version.h b/v7/src/microcode/version.h index 528529303..4cd0328a1 100644 --- a/v7/src/microcode/version.h +++ b/v7/src/microcode/version.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.80 1991/05/10 00:07:41 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.81 1991/05/20 20:32:20 cph Exp $ Copyright (c) 1988-91 Massachusetts Institute of Technology @@ -46,5 +46,5 @@ MIT in each case. */ #define VERSION 11 #endif #ifndef SUBVERSION -#define SUBVERSION 80 +#define SUBVERSION 81 #endif diff --git a/v8/src/microcode/version.h b/v8/src/microcode/version.h index d30498652..69163e42f 100644 --- a/v8/src/microcode/version.h +++ b/v8/src/microcode/version.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.80 1991/05/10 00:07:41 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.81 1991/05/20 20:32:20 cph Exp $ Copyright (c) 1988-91 Massachusetts Institute of Technology @@ -46,5 +46,5 @@ MIT in each case. */ #define VERSION 11 #endif #ifndef SUBVERSION -#define SUBVERSION 80 +#define SUBVERSION 81 #endif -- 2.25.1