comparison regexParser/regexParser.cc @ 321:a1b65d39b947

bmSearch fix
author mir3636
date Mon, 16 May 2016 17:03:17 +0900
parents fa590a7272ae
children
comparison
equal deleted inserted replaced
320:da02a7258d54 321:a1b65d39b947
75 unsigned char *word = ri->ptr - 1; 75 unsigned char *word = ri->ptr - 1;
76 while (ri->tokenType == 'a') { 76 while (ri->tokenType == 'a') {
77 token(ri); 77 token(ri);
78 } 78 }
79 cc->cond.w.length = ri->ptr - word - 1; 79 cc->cond.w.length = ri->ptr - word - 1;
80 if (ri->tokenType == '\0')
81 cc->cond.w.length++;
80 if (cc->cond.w.length > 1) 82 if (cc->cond.w.length > 1)
81 cc->cond.w.word = word; 83 cc->cond.w.word = word;
84 if (ri->maxWordLen < cc->cond.w.length)
85 ri->maxWordLen = cc->cond.w.length;
82 } else 86 } else
83 token(ri); 87 token(ri);
84 NodePtr n = createNode(ri,'a',cc,0,0); 88 NodePtr n = createNode(ri,'a',cc,0,0);
85 return n; 89 return n;
86 } 90 }