Omit ASCII NUL from control character set.
This commit is contained in:
parent
6eff6fbda0
commit
1f5b157c1d
|
@ -114,6 +114,9 @@
|
||||||
;;; returns a regexp value. R and C are low-level macro rename and compare
|
;;; returns a regexp value. R and C are low-level macro rename and compare
|
||||||
;;; functions.
|
;;; functions.
|
||||||
|
|
||||||
|
(define *control-charset* (char-set-delete char-set:iso-control
|
||||||
|
(ascii->char 0)))
|
||||||
|
|
||||||
(define (parse-sre/context sre case-sensitive? cset? r c)
|
(define (parse-sre/context sre case-sensitive? cset? r c)
|
||||||
(let ((%bos (r 'bos)) (%eos (r 'eos))
|
(let ((%bos (r 'bos)) (%eos (r 'eos))
|
||||||
(%bol (r 'bol)) (%eol (r 'eol))
|
(%bol (r 'bol)) (%eol (r 'eol))
|
||||||
|
@ -288,7 +291,7 @@
|
||||||
((hygn-memq? '(blank)) char-set:blank)
|
((hygn-memq? '(blank)) char-set:blank)
|
||||||
((hygn-memq? '(whitespace space white)) char-set:whitespace)
|
((hygn-memq? '(whitespace space white)) char-set:whitespace)
|
||||||
((hygn-memq? '(printing print)) char-set:printing)
|
((hygn-memq? '(printing print)) char-set:printing)
|
||||||
((hygn-memq? '(control cntrl)) char-set:iso-control)
|
((hygn-memq? '(control cntrl)) *control-charset*)
|
||||||
((hygn-memq? '(hex-digit xdigit hex)) char-set:hex-digit)
|
((hygn-memq? '(hex-digit xdigit hex)) char-set:hex-digit)
|
||||||
((hygn-memq? '(ascii)) char-set:ascii)
|
((hygn-memq? '(ascii)) char-set:ascii)
|
||||||
(else (error "Illegal regular expression" sre)))))
|
(else (error "Illegal regular expression" sre)))))
|
||||||
|
@ -465,6 +468,7 @@
|
||||||
(switch char-set= cs
|
(switch char-set= cs
|
||||||
((char-set:punctuation) punct)
|
((char-set:punctuation) punct)
|
||||||
((char-set:iso-control) ctl)
|
((char-set:iso-control) ctl)
|
||||||
|
((*control-charset*) ctl)
|
||||||
(else #f))))))))
|
(else #f))))))))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue