lexer: sort list of file extensions
[vis.git] / text-regex.h
blobc18caa3e9b12ad60b2a710c7ca49b16a142d8490
1 #ifndef TEXT_REGEX_H
2 #define TEXT_REGEX_H
4 #include <regex.h>
5 #include "text.h"
7 typedef struct Regex Regex;
8 typedef Filerange RegexMatch;
10 Regex *text_regex_new(void);
11 int text_regex_compile(Regex *r, const char *regex, int cflags);
12 void text_regex_free(Regex *r);
13 int text_regex_match(Regex*, const char *data, int eflags);
14 int text_search_range_forward(Text*, size_t pos, size_t len, Regex *r, size_t nmatch, RegexMatch pmatch[], int eflags);
15 int text_search_range_backward(Text*, size_t pos, size_t len, Regex *r, size_t nmatch, RegexMatch pmatch[], int eflags);
17 #endif