GNU bug report logs -
#37659
rx additions: anychar, unmatchable, unordered-or
Previous Next
Reported by: Mattias Engdegård <mattiase <at> acm.org>
Date: Tue, 8 Oct 2019 09:37:01 UTC
Severity: wishlist
Tags: fixed, patch
Fixed in version 27.1
Done: Mattias Engdegård <mattiase <at> acm.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Thanks for the proposed patch. Two thoughts:
1. Instead of the symbol 'unordered-or' (which is remarkably hard to
read), I suggest using the ASCII letter 'V'. This ASCIIfies the Unicode
symbol U+2228 LOGICAL OR (∨). If you prefer, you could make the Unicode
symbol an alias for 'V', or use lower-case ASCII 'v', or whatever. The
point is that '(unordered-or A B)' is too hard to read with all those
'or's in there.
2. Re this patch:
> - ((or 'anychar 'anything) (rx--translate-form '(or nonl "\n")))
> + ((or 'anychar 'anything) (cons (list "[^z-a]") t))
Is there a reason this uses (cons (list "[^z-a]") t) rather than
'(("[^z-a]") . t) ? I realize neighboring code does something similar,
but it's not clear to me why it's important to construct new objects
here instead of using literals.
This bug report was last modified 5 years and 132 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.