regex header integration

This commit is contained in:
anon 2023-08-24 03:14:40 +02:00
parent a220f87278
commit 27bbc28a71

View File

@ -1,8 +1,20 @@
#ifndef REGEX_H
#define REGEX_H
#include "chad.h"
#include <ctype.h>
#include "vector.h"
extern bool is_case_on;
typedef struct {
char * str;
vector_t delta_table; // <delta_t>
vector_t catch_table; // <offshoot_t>
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