[fix] merging repeat codepoints in trie builder

This commit is contained in:
Al
2015-05-22 22:45:23 -04:00
parent c00ecf6ea8
commit 31cc2bb5d1
2 changed files with 6 additions and 24 deletions

View File

@@ -96,21 +96,6 @@ string_tree_t *regex_string_tree(char *regex, size_t len) {
} else if ((codepoint == LPAREN_CODEPOINT || codepoint == RPAREN_CODEPOINT) && last_codepoint != BACKSLASH_CODEPOINT) {
log_debug("group\n");
add_to_index = false;
} else if (codepoint == STAR_CODEPOINT && last_codepoint != BACKSLASH_CODEPOINT) {
log_debug("star\n");
// For *, we add an optional transition to the empty
codepoint = REPEAT_ZERO_CODEPOINT;
} else if (codepoint == PLUS_CODEPOINT && last_codepoint != BACKSLASH_CODEPOINT) {
log_debug("plus\n");
codepoint = REPEAT_ONE_CODEPOINT;
} else if (codepoint == DOLLAR_CODEPOINT && last_codepoint != BACKSLASH_CODEPOINT) {
log_debug("dollar\n");
codepoint = WORD_BOUNDARY_CODEPOINT;
if (in_set) {
uint32_array_push(char_set, codepoint);
add_to_index = false;
}
} else if (in_set) {
log_debug("in set\n");
// Queue node, we'll add them to the trie