From 850b8fad1f0c37b1a0359ebde0e6f8112547caa0 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 1 May 2017 21:08:40 -0700 Subject: [PATCH] Change char-syntax rules to emphasize that they are legacy rules. --- src/runtime/regsexp.scm | 12 ++++++------ tests/runtime/test-regsexp.scm | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) 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 -- 2.25.1