From: Chris Hanson Date: Tue, 2 May 2017 04:08:40 +0000 (-0700) Subject: Change char-syntax rules to emphasize that they are legacy rules. X-Git-Tag: mit-scheme-pucked-9.2.12~14^2~97 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=850b8fad1f0c37b1a0359ebde0e6f8112547caa0;p=mit-scheme.git Change char-syntax rules to emphasize that they are legacy rules. --- diff --git a/src/runtime/regsexp.scm b/src/runtime/regsexp.scm index 11c4547a8..99dafbb86 100644 --- a/src/runtime/regsexp.scm +++ b/src/runtime/regsexp.scm @@ -156,7 +156,7 @@ USA. (lambda items (insn:inverse-char-set (char-set* items)))) -(define-rule '(char-syntax datum) +(define-rule '(legacy-char-syntax datum) (lambda (code) (insn:test-char (if (or (char=? code #\-) @@ -164,7 +164,7 @@ USA. char-whitespace? (syntax-code-predicate code))))) -(define-rule '(inverse-char-syntax datum) +(define-rule '(inverse-legacy-char-syntax datum) (lambda (code) (insn:test-char (negate @@ -740,10 +740,10 @@ USA. ((#\B) (output-expr '(not-word-bound))) ((#\`) (output-expr '(string-start))) ((#\') (output-expr '(string-end))) - ((#\w) (output-expr '(char-syntax #\w))) - ((#\W) (output-expr '(inverse-char-syntax #\w))) - ((#\s) (output-expr `(char-syntax ,(get-next)))) - ((#\S) (output-expr `(inverse-char-syntax ,(get-next)))) + ((#\w) (output-expr '(legacy-char-syntax #\w))) + ((#\W) (output-expr '(inverse-legacy-char-syntax #\w))) + ((#\s) (output-expr `(legacy-char-syntax ,(get-next)))) + ((#\S) (output-expr `(inverse-legacy-char-syntax ,(get-next)))) ((#\() (start-group)) ((#\)) (end-group)) ((#\|) (push-alt)) diff --git a/tests/runtime/test-regsexp.scm b/tests/runtime/test-regsexp.scm index b96ee5dfc..76a5dff43 100644 --- a/tests/runtime/test-regsexp.scm +++ b/tests/runtime/test-regsexp.scm @@ -659,9 +659,9 @@ USA. ("\\`\\s *\\(error:\\)?\\s *\\(.*\\)\\s *\\'" (seq (string-start) - (* (char-syntax #\space)) + (* (legacy-char-syntax #\space)) (? (group 1 "error:")) - (* (char-syntax #\space)) + (* (legacy-char-syntax #\space)) (group 2 (* (any-char))) - (* (char-syntax #\space)) + (* (legacy-char-syntax #\space)) (string-end)))))) \ No newline at end of file