From cc553e4516a819d6edcc3dbb003262f5eaf92f14 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 16 May 1989 16:40:54 +0000 Subject: [PATCH] Add new syntax_entry bit, "p", which indicates that the character is a prefix character. A combination of `syntaxcode_whitespace' and this bit is equivalent to `syntaxcode_quote' -- except that the new bit can be used in combination with other codes to provide new functionality. --- v7/src/microcode/syntax.c | 11 ++++++++--- v7/src/microcode/syntax.h | 3 ++- v7/src/microcode/version.h | 4 ++-- v8/src/microcode/version.h | 4 ++-- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/v7/src/microcode/syntax.c b/v7/src/microcode/syntax.c index 2ba32be77..0c445db5c 100644 --- a/v7/src/microcode/syntax.c +++ b/v7/src/microcode/syntax.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/syntax.c,v 1.14 1989/05/03 02:04:20 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/syntax.c,v 1.15 1989/05/16 16:40:15 cph Exp $ Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology @@ -127,6 +127,7 @@ DEFINE_PRIMITIVE ("STRING->SYNTAX-ENTRY", Prim_string_to_syntax_entry, 1, 1, 0) case '2': result |= (1 << 17); break; case '3': result |= (1 << 18); break; case '4': result |= (1 << 19); break; + case 'p': result |= (1 << 20); break; case ' ': break; default: error_bad_range_arg (1); } @@ -309,8 +310,12 @@ DEFINE_PRIMITIVE ("SCAN-BACKWARD-PREFIX-CHARS", Prim_scan_backward_prefix_chars, { WIN_IF_LEFT_END (start); LEFT_QUOTED_P (start, quoted); - WIN_IF (quoted || - ((SYNTAX_ENTRY_CODE (PEEK_LEFT (start))) != syntaxcode_quote)); + WIN_IF (quoted); + { + long sentry = (PEEK_LEFT (start)); + WIN_IF (! (((SYNTAX_ENTRY_CODE (sentry)) == syntaxcode_quote) + || (SYNTAX_ENTRY_PREFIX (sentry)))); + } MOVE_LEFT (start); } } diff --git a/v7/src/microcode/syntax.h b/v7/src/microcode/syntax.h index 52de8e3c9..7bf55d5c1 100644 --- a/v7/src/microcode/syntax.h +++ b/v7/src/microcode/syntax.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/syntax.h,v 1.4 1989/05/01 19:38:49 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/syntax.h,v 1.5 1989/05/16 16:39:58 cph Rel $ Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology @@ -57,6 +57,7 @@ should have been included along with this file. */ #define SYNTAX_ENTRY_COMSTART_SECOND(entry) (((entry) >> 17) & 1) #define SYNTAX_ENTRY_COMEND_FIRST(entry) (((entry) >> 18) & 1) #define SYNTAX_ENTRY_COMEND_SECOND(entry) (((entry) >> 19) & 1) +#define SYNTAX_ENTRY_PREFIX(entry) (((entry) >> 20) & 1) enum syntaxcode /* The possible syntax codes. */ { diff --git a/v7/src/microcode/version.h b/v7/src/microcode/version.h index 8428ae8e1..5b5ecb1a6 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 10.76 1989/04/28 03:48:08 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 10.77 1989/05/16 16:40:54 cph Exp $ Copyright (c) 1988, 1989 Massachusetts Institute of Technology @@ -46,7 +46,7 @@ MIT in each case. */ #define VERSION 10 #endif #ifndef SUBVERSION -#define SUBVERSION 76 +#define SUBVERSION 77 #endif #ifndef UCODE_TABLES_FILENAME diff --git a/v8/src/microcode/version.h b/v8/src/microcode/version.h index 2582fb7c8..18d0eebbc 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 10.76 1989/04/28 03:48:08 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 10.77 1989/05/16 16:40:54 cph Exp $ Copyright (c) 1988, 1989 Massachusetts Institute of Technology @@ -46,7 +46,7 @@ MIT in each case. */ #define VERSION 10 #endif #ifndef SUBVERSION -#define SUBVERSION 76 +#define SUBVERSION 77 #endif #ifndef UCODE_TABLES_FILENAME -- 2.25.1