emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/relint 09ef3df 05/21: Describe the new xr wrapped subsu


From: Mattias Engdegård
Subject: [elpa] externals/relint 09ef3df 05/21: Describe the new xr wrapped subsumption warning
Date: Sun, 3 May 2020 11:13:35 -0400 (EDT)

branch: externals/relint
commit 09ef3dfa9c31317bf508ab18eb0d8f1e31c0b568
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>

    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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]