diff --git a/source/regex.h b/source/regex.h index 219c2ef..c6c714f 100644 --- a/source/regex.h +++ b/source/regex.h @@ -1,8 +1,20 @@ +#ifndef REGEX_H +#define REGEX_H + #include "chad.h" -#include +#include "vector.h" extern bool is_case_on; +typedef struct { + char * str; + vector_t delta_table; // + vector_t catch_table; // + int accepting_state; +} regex_t; + extern regex_t * regex_compile(const char * const pattern); -extern int regex_match(const char * const pattern, const char * const string, const int string_offset, int * match_offset_); +extern bool regex_search(regex_t * regex, const char * const string); extern int regex_free(regex_t * const regex); + +#endif