diff regexParser/regexParser.cc @ 321:a1b65d39b947

bmSearch fix
author mir3636
date Mon, 16 May 2016 17:03:17 +0900
parents fa590a7272ae
children
line wrap: on
line diff
--- a/regexParser/regexParser.cc	Sun May 08 23:31:14 2016 +0900
+++ b/regexParser/regexParser.cc	Mon May 16 17:03:17 2016 +0900
@@ -77,8 +77,12 @@
             token(ri);
         }
         cc->cond.w.length = ri->ptr - word - 1;
+        if (ri->tokenType == '\0')
+            cc->cond.w.length++;
         if (cc->cond.w.length > 1)
             cc->cond.w.word = word;
+        if (ri->maxWordLen < cc->cond.w.length)
+            ri->maxWordLen = cc->cond.w.length;
     } else 
         token(ri);
     NodePtr n = createNode(ri,'a',cc,0,0);