Mercurial > hg > Applications > Grep
comparison regexParser/grepWalk.cc @ 315:66012db6a717
add wordMode in grepWalk
author | mir3636 |
---|---|
date | Sat, 07 May 2016 19:18:43 +0900 |
parents | 1188debbef10 |
children | c4d33b7c3ccd |
comparison
equal
deleted
inserted
replaced
314:a4484c02cba5 | 315:66012db6a717 |
---|---|
47 tsv = tg->stateSkip(tsv); | 47 tsv = tg->stateSkip(tsv); |
48 goto next; | 48 goto next; |
49 } else if (c<=cc->cond.range.end) { | 49 } else if (c<=cc->cond.range.end) { |
50 // range matched. | 50 // range matched. |
51 if (cc->cond.w.word) { | 51 if (cc->cond.w.word) { |
52 // match the word. | 52 WordPtr w; |
53 // if (not match) continue; | 53 for (w = &cc->cond.w.word;w;w = w->next) { |
54 // match the word. | |
55 // if (not match) continue; | |
56 if (strncmp(w.word,tsv.buff.buffptr-1,w.length)) break; | |
57 } | |
58 if (!w) continue; | |
59 tsv.buff.buffptr += w.length - 1; | |
54 } | 60 } |
55 state = nextState(cc->nextState,tg); | 61 state = nextState(cc->nextState,tg); |
56 goto next; | 62 goto next; |
57 } | 63 } |
58 } | 64 } |