regex_parser.h

changeset 28
72a98cbcb9f1
parent 27
95a958e3de88
equal deleted inserted replaced
27:95a958e3de88 28:72a98cbcb9f1
16 #include "string_list.h" 16 #include "string_list.h"
17 17
18 typedef struct { 18 typedef struct {
19 string_list_t* pattern_list; /* even entries: start ; odd entries: end */ 19 string_list_t* pattern_list; /* even entries: start ; odd entries: end */
20 regex_t** compiled_patterns; 20 regex_t** compiled_patterns;
21 size_t compiled_pattern_count;
21 unsigned int pattern_match; /* save position of end pattern to match - 22 unsigned int pattern_match; /* save position of end pattern to match -
22 NULL when a start pattern shall match first */ 23 NULL when a start pattern shall match first */
23 unsigned int matched_lines; 24 unsigned int matched_lines;
24 } regex_parser_t; 25 } regex_parser_t;
25 26
29 30
30 regex_parser_t* new_regex_parser_t(); 31 regex_parser_t* new_regex_parser_t();
31 void destroy_regex_parser_t(regex_parser_t*); 32 void destroy_regex_parser_t(regex_parser_t*);
32 33
33 bool regex_parser_matching(regex_parser_t*); 34 bool regex_parser_matching(regex_parser_t*);
34 void regex_compile_all(regex_parser_t*); 35 bool regex_compile_all(regex_parser_t*);
36 int regex_parser_do(regex_parser_t*, char*);
35 37
36 #ifdef _cplusplus 38 #ifdef _cplusplus
37 } 39 }
38 #endif 40 #endif
39 41

mercurial