[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep branch, master, updated. v2.21-56-gbfa9df0
From: |
Jim Meyering |
Subject: |
grep branch, master, updated. v2.21-56-gbfa9df0 |
Date: |
Sun, 26 Jul 2015 23:40:19 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".
The branch, master has been updated
via bfa9df03034ccfb65da9950cf1e1207faef1213c (commit)
via ea0ebaaa6106ad38afa3cf858a1b54ec675afb05 (commit)
from 8f675e7c026ce56a8ef0cc33dc5fcd37f49f38a2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=bfa9df03034ccfb65da9950cf1e1207faef1213c
commit bfa9df03034ccfb65da9950cf1e1207faef1213c
Author: Norihiro Tanaka <address@hidden>
Date: Sun Dec 7 20:16:41 2014 +0900
dfa: remove word delimiter support for multibyte locales
DFA supports word delimiter expressions, but it does not behave
correctly for multibyte locales. Even if it were to be fixed,
the DFA matcher's performance would be no better than that of regex.
Thus, this change removes DFA support for word delimiter expressions
in multibyte locales.
* src/dfa.c (dfa_supported): Return false also when a pattern uses any
word delimiter expression in a multibyte locale.
diff --git a/src/dfa.c b/src/dfa.c
index a28404b..d1e76e1 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3358,6 +3358,7 @@ skip_remains_mb (struct dfa *d, unsigned char const *p,
Here is the list of features that make this DFA matcher punt:
- [M-N]-range-in-MB-locale: regex is up to 25% faster on [a-z]
- back-reference: (.)\1
+ - word-delimiter-in-MB-locale: \<, \>, \b
*/
static inline char *
dfaexec_main (struct dfa *d, char const *begin, char *end, int allow_nl,
@@ -3645,6 +3646,14 @@ dfa_supported (struct dfa const *d)
{
switch (d->tokens[i])
{
+ case BEGWORD:
+ case ENDWORD:
+ case LIMWORD:
+ case NOTLIMWORD:
+ if (!d->multibyte)
+ continue;
+ /* fallthrough */
+
case BACKREF:
case MBCSET:
return false;
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=ea0ebaaa6106ad38afa3cf858a1b54ec675afb05
commit bfa9df03034ccfb65da9950cf1e1207faef1213c
Author: Norihiro Tanaka <address@hidden>
Date: Sun Dec 7 20:16:41 2014 +0900
dfa: remove word delimiter support for multibyte locales
DFA supports word delimiter expressions, but it does not behave
correctly for multibyte locales. Even if it were to be fixed,
the DFA matcher's performance would be no better than that of regex.
Thus, this change removes DFA support for word delimiter expressions
in multibyte locales.
* src/dfa.c (dfa_supported): Return false also when a pattern uses any
word delimiter expression in a multibyte locale.
diff --git a/src/dfa.c b/src/dfa.c
index a28404b..d1e76e1 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3358,6 +3358,7 @@ skip_remains_mb (struct dfa *d, unsigned char const *p,
Here is the list of features that make this DFA matcher punt:
- [M-N]-range-in-MB-locale: regex is up to 25% faster on [a-z]
- back-reference: (.)\1
+ - word-delimiter-in-MB-locale: \<, \>, \b
*/
static inline char *
dfaexec_main (struct dfa *d, char const *begin, char *end, int allow_nl,
@@ -3645,6 +3646,14 @@ dfa_supported (struct dfa const *d)
{
switch (d->tokens[i])
{
+ case BEGWORD:
+ case ENDWORD:
+ case LIMWORD:
+ case NOTLIMWORD:
+ if (!d->multibyte)
+ continue;
+ /* fallthrough */
+
case BACKREF:
case MBCSET:
return false;
-----------------------------------------------------------------------
Summary of changes:
src/dfa.c | 102 ++++++++++++++++++++++++++++++++++++------------------------
1 files changed, 61 insertions(+), 41 deletions(-)
hooks/post-receive
--
grep
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep branch, master, updated. v2.21-56-gbfa9df0,
Jim Meyering <=