Mercurial > hg > Applications > Grep
diff regexParser/regexParser.h @ 266:e51cac73e42a
CeriumGrep start
author | masa |
---|---|
date | Thu, 28 Jan 2016 21:14:34 +0900 |
parents | ef95a7f1bc03 |
children | 5d4afe6f6d00 |
line wrap: on
line diff
--- a/regexParser/regexParser.h Wed Jan 27 18:00:25 2016 +0900 +++ b/regexParser/regexParser.h Thu Jan 28 21:14:34 2016 +0900 @@ -67,8 +67,8 @@ } TState, *TStatePtr; typedef struct result { - unsigned char begin; - unsigned char end; + unsigned char *begin; + unsigned char *end; struct result *next; } Result, *ResultPtr; @@ -94,6 +94,10 @@ StatePtr stateEnd; StatePtr *stateArray; StatePtr stateList; + StatePtr anyState; + TSValue stateSkip(TSValue tsv); + TSValue stateMatch(TSValue tsv); + TSValue stateNothing(TSValue tsv); } TransitionGenerator, *TransitionGeneratorPtr; typedef struct buffer { @@ -106,6 +110,7 @@ typedef struct tsValue { Buffer buff; ResultPtr result; + ResultPtr resultEnd; TransitionGeneratorPtr tg; TState *current; TState *blockBegin; @@ -149,6 +154,11 @@ unsigned char* file_mmap; off_t size; } st_mmap_t; + +typedef struct search { + TransitionGeneratorPtr tg; + const char* filename; +} Search, *SearchPtr; #endif extern NodePtr createNode(RegexInfoPtr ri,unsigned char type,CharClassPtr cc, NodePtr left, NodePtr right);