emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lispref/searching.texi


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lispref/searching.texi
Date: Wed, 17 May 2006 22:17:09 +0000

Index: emacs/lispref/searching.texi
diff -u emacs/lispref/searching.texi:1.72 emacs/lispref/searching.texi:1.73
--- emacs/lispref/searching.texi:1.72   Tue Apr 18 21:09:13 2006
+++ emacs/lispref/searching.texi        Wed May 17 22:17:09 2006
@@ -306,9 +306,10 @@
 first tries to match all three @samp{a}s; but the rest of the pattern is
 @samp{ar} and there is only @samp{r} left to match, so this try fails.
 The next alternative is for @samp{a*} to match only two @samp{a}s.  With
-this choice, the rest of the regexp matches address@hidden
+this choice, the rest of the regexp matches successfully.
 
-Nested repetition operators take a long time, or even forever, if they
address@hidden:} Nested repetition operators take a long time,
+or even forever, if they
 lead to ambiguous matching.  For example, trying to match the regular
 expression @samp{\(x+y*\)*a} against the string
 @samp{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz} could take hours before it
@@ -316,7 +317,8 @@
 @samp{x}s before concluding that none of them can work.  Even worse,
 @samp{\(x*\)*} can match the null string in infinitely many ways, so
 it causes an infinite loop.  To avoid these problems, check nested
-repetitions carefully.
+repetitions carefully, to make sure that they do not cause combinatorial
+explosions in backtracking.
 
 @item @samp{+}
 @cindex @samp{+} in regexp




reply via email to

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