Mercurial > hg > Applications > Grep
diff regexParser/CeriumGrep.cc @ 314:a4484c02cba5
add wordMode in regexParser
author | mir3636 |
---|---|
date | Sat, 07 May 2016 18:38:54 +0900 |
parents | c9ac6f06e706 |
children | a1b65d39b947 |
line wrap: on
line diff
--- a/regexParser/CeriumGrep.cc Tue Feb 09 11:02:35 2016 +0900 +++ b/regexParser/CeriumGrep.cc Sat May 07 18:38:54 2016 +0900 @@ -23,6 +23,7 @@ RegexInfo ri; ri.stateNumber = 1; + ri.wordMode = true; for (int i = 1; i < argc; i++) { if (strcmp(argv[i],"-regex") == 0) { ri.ptr = (unsigned char*)argv[i+1]; i++; @@ -40,6 +41,8 @@ s.filename = filename = argv[i+1]; i++; } else if (strcmp(argv[i],"-ts") == 0) { ts = true; + } else if (strcmp(argv[i],"+word") == 0) { + ri.wordMode = false; } } if (!ri.ptr) return s;