21 lines
426 B
C
21 lines
426 B
C
#ifndef REGEX_H
|
|
#define REGEX_H
|
|
|
|
#include "chad.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 bool regex_search(regex_t * regex, const char * const string);
|
|
extern int regex_free(regex_t * const regex);
|
|
|
|
#endif
|