branch: externals/relint commit 09ef3dfa9c31317bf508ab18eb0d8f1e31c0b568 Author: Mattias Engdegård <matti...@acm.org> Commit: Mattias Engdegård <matti...@acm.org>
Describe the new xr wrapped subsumption warning --- README | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README b/README index 944e665..3ca9499 100644 --- a/README +++ b/README @@ -122,6 +122,17 @@ skip-syntax-backward. so the a* could be removed without changing the meaning of the regexp. + - First/last item in repetition subsumes last/first item (wrapped) + + The first and last items in a repeated sequence, being effectively + adjacent, match a superset or subset of each other, which makes + for an unexpected inefficiency. For example, \(?:a*c[ab]+\)* can + be seen as a*c[ab]+a*c[ab]+... where the [ab]+a* in the middle is + a slow way of writing [ab]+ which is made worse by the outer + repetition. The general remedy is to move the subsumed item out of + the repeated sequence, resulting in a*\(?:c[ab]+\)* in the example + above. + - Uncounted repetition The construct A\{,\} repeats A zero or more times which was