mirror of
https://git.lain.church/emil/libhl.git
synced 2025-06-22 18:27:57 +00:00
pull in jeger
This commit is contained in:
29
include/jeger.h
Normal file
29
include/jeger.h
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef JEGER_H
|
||||
#define JEGER_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "vector.h"
|
||||
|
||||
extern bool is_case_on;
|
||||
|
||||
typedef struct {
|
||||
int accepting_state;
|
||||
char * str;
|
||||
vector_t delta_table; // <delta_t>
|
||||
vector_t catch_table; // <offshoot_t>
|
||||
} regex_t;
|
||||
|
||||
typedef struct {
|
||||
int position;
|
||||
int width;
|
||||
} match_t;
|
||||
|
||||
extern regex_t * regex_compile(const char * const pattern);
|
||||
extern int regex_free(regex_t * const regex);
|
||||
extern bool regex_search(const regex_t * const regex, const char * const string);
|
||||
extern match_t * regex_match(const regex_t * const regex, const char * const string, const bool start_of_string);
|
||||
|
||||
extern bool is_magic(const char c);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user