Mercurial > hg > Members > shinya > pyrect
changeset 110:68b616dbe2c9
modify filtering rules.
author | Ryoma SHINYA <shinya@firefly.cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 12 Feb 2011 16:47:45 +0900 |
parents | d591da6e2988 |
children | |
files | pyrect/translator/grep_translator.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pyrect/translator/grep_translator.py Sat Feb 12 16:41:25 2011 +0900 +++ b/pyrect/translator/grep_translator.py Sat Feb 12 16:47:45 2011 +0900 @@ -26,7 +26,7 @@ self.__bufsize = 1024 * 1024 self.thread_dfa = 1 self.thread_line = 1 - self.filter = "quick" + self.filter = True self.filter_only = False self.filter_prefix = False self.skip_boost = True @@ -61,7 +61,7 @@ key = None - if (self.filter == "bmh" or self.filter == "quick" or self.filter == "memchr")\ + if (self.filter == True or self.filter == "bmh" or self.filter == "quick" or self.filter == "memchr")\ and self.regexp.must_words: key = max(self.regexp.must_words, key=len) if len(self.regexp.must_words) == 1 and len(key) == self.regexp.min_len: @@ -82,8 +82,10 @@ self.emit_quick_filter(key) elif self.filter: if len(key) > 5: + print("hoge") self.emit_quick_filter(key) else: + print("fuga") self.emit_memchr_filter(key) if self.skip_boost and not self.filter_only and \