progress at the price of techincal dept
This commit is contained in:
parent
e0a5c54b62
commit
61733e3254
@ -122,6 +122,7 @@ typedef struct {
|
||||
int flags;
|
||||
int state;
|
||||
int width;
|
||||
int width2;
|
||||
char * whitelist;
|
||||
char * blacklist;
|
||||
} compiler_state;
|
||||
@ -148,7 +149,7 @@ void HOOK_ALL(const int from,
|
||||
.input = *s,
|
||||
.to = ASSERT_HALT(to),
|
||||
.pattern_width = cs->width,
|
||||
.match_width = 1,
|
||||
.match_width = cs->width2,
|
||||
};
|
||||
vector_push(®ex->delta_table,
|
||||
&delta);
|
||||
@ -504,6 +505,7 @@ regex_t * regex_compile(const char * const pattern) {
|
||||
blacklist[0] = '\0';
|
||||
cs.flags &= (IS_AT_THE_BEGINNING | FORCE_START_OF_STRING);
|
||||
cs.width = 1;
|
||||
cs.width2 = 1;
|
||||
|
||||
// Translate char
|
||||
switch (*s) {
|
||||
@ -571,6 +573,7 @@ regex_t * regex_compile(const char * const pattern) {
|
||||
// ---
|
||||
++cs.state;
|
||||
cs.width = 0;
|
||||
cs.width2 = 0;
|
||||
HOOK_ALL(0, whitelist, +1, &cs, regex);
|
||||
cs.width = 1;
|
||||
OFFSHOOT(0, +1, 1, 0, &cs, regex);
|
||||
|
Loading…
Reference in New Issue
Block a user