libhl/source/regex.h

21 lines
426 B
C
Raw Normal View History

2023-08-23 21:14:40 -04:00
#ifndef REGEX_H
#define REGEX_H
2023-08-19 18:49:10 -04:00
#include "chad.h"
2023-08-23 21:14:40 -04:00
#include "vector.h"
2023-08-19 18:49:10 -04:00
extern bool is_case_on;
2023-08-23 21:14:40 -04:00
typedef struct {
char * str;
vector_t delta_table; // <delta_t>
vector_t catch_table; // <offshoot_t>
int accepting_state;
} regex_t;
2023-08-23 19:59:59 -04:00
extern regex_t * regex_compile(const char * const pattern);
2023-08-23 21:14:40 -04:00
extern bool regex_search(regex_t * regex, const char * const string);
2023-08-23 19:59:59 -04:00
extern int regex_free(regex_t * const regex);
2023-08-23 21:14:40 -04:00
#endif