[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37659: rx additions: anychar, unmatchable, unordered-or
From: |
Mattias Engdegård |
Subject: |
bug#37659: rx additions: anychar, unmatchable, unordered-or |
Date: |
Tue, 8 Oct 2019 11:36:44 +0200 |
Three minor rx additions follow:
* Add `anychar' as an alias for `anything': the latter suggests an expression
that can match any string, while in reality it only matches a single character.
The documentation now uses `anychar' as the preferred name. (`any-char' would
also be possible, but is longer.)
* Add `unmatchable' for a never-match regexp. This follows the previously
introduced variable `regexp-unmatchable'.
* Add `unordered-or' as a variant of `or' without the left-to-right match order
guarantee. It allows unconditional regexp-opt optimisations, and is
particularly useful for matching sets of keywords. With rx-let and rx-define,
it also has the potential for better compositionality, allowing expressions to
be put together from smaller parts.
Abstractly: while `or' is associative, `unordered-or' is also commutative.
The name `unordered-or' is descriptive but phonetically (and lexically)
somewhat weak. Strong alternatives welcome.
0001-Add-anychar-as-alias-to-anything-in-rx.patch
Description: Binary data
0002-Add-unmatchable-as-alias-for-or-in-rx.patch
Description: Binary data
0003-Add-rx-unordered-or-construct.patch
Description: Binary data
- bug#37659: rx additions: anychar, unmatchable, unordered-or,
Mattias Engdegård <=
- bug#37659: rx additions: anychar, unmatchable, unordered-or, Mattias Engdegård, 2019/10/09
- bug#37659: Mattias Engdegård <mattiase <at> acm.org>, Paul Eggert, 2019/10/11
- bug#37659: Mattias Engdegård <mattiase <at> acm.org>, Mattias Engdegård, 2019/10/12
- bug#37659: Mattias Engdegård <mattiase <at> acm.org>, Paul Eggert, 2019/10/13
- bug#37659: Mattias Engdegård <mattiase <at> acm.org>, Mattias Engdegård, 2019/10/13
- bug#37659: rx additions: anychar, unmatchable, unordered-or, Mattias Engdegård, 2019/10/22
- bug#37659: rx additions: anychar, unmatchable, unordered-or, Robert Pluim, 2019/10/22
- bug#37659: rx additions: anychar, unmatchable, unordered-or, Paul Eggert, 2019/10/22
- bug#37659: rx additions: anychar, unmatchable, unordered-or, Mattias Engdegård, 2019/10/23
- bug#37659: rx additions: anychar, unmatchable, unordered-or, Paul Eggert, 2019/10/23