aboutsummaryrefslogtreecommitdiff
path: root/re2/mimics_pcre.cc
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2010-07-15 20:38:05 -0700
committerRuss Cox <rsc@swtch.com>2010-07-15 20:38:05 -0700
commit4a9f4ca78a66843709737519472becb28c20e20c (patch)
tree3400cc04094db3b906d65f4d7e1c89e7148c1420 /re2/mimics_pcre.cc
parent4c213792cf4aa033242d3eb01841c4ba0bd805d7 (diff)
downloadregex-re2-4a9f4ca78a66843709737519472becb28c20e20c.tar.gz
factor common prefixes from alternations
Juggle code so that RE2::Set can benefit too. R=rsc CC=re2-dev http://codereview.appspot.com/1740045
Diffstat (limited to 're2/mimics_pcre.cc')
-rw-r--r--re2/mimics_pcre.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/re2/mimics_pcre.cc b/re2/mimics_pcre.cc
index c570168..fc6dd4a 100644
--- a/re2/mimics_pcre.cc
+++ b/re2/mimics_pcre.cc
@@ -151,6 +151,7 @@ bool EmptyStringWalker::PostVisit(Regexp* re, bool parent_arg, bool pre_arg,
case kRegexpEndText:
case kRegexpStar: // can always be empty
case kRegexpQuest:
+ case kRegexpHaveMatch:
return true;
case kRegexpConcat: // can be empty if all children can