From: K.Kosako Date: Thu, 8 Jun 2017 04:24:35 +0000 (+0900) Subject: rename target_empty_info to body_empty_info X-Git-Tag: v6.4.0~1^2~135 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c575012f60bf6f8c7b096087195b30a45383b61;p=onig rename target_empty_info to body_empty_info --- diff --git a/src/regcomp.c b/src/regcomp.c index 96645c4..9b7d6c6 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -811,7 +811,7 @@ compile_length_quantifier_node(QtfrNode* qn, regex_t* reg) int len, mod_tlen, cklen; int ckn; int infinite = IS_REPEAT_INFINITE(qn->upper); - int empty_info = qn->target_empty_info; + int empty_info = qn->body_empty_info; int tlen = compile_length_tree(qn->target, reg); if (tlen < 0) return tlen; @@ -891,7 +891,7 @@ compile_quantifier_node(QtfrNode* qn, regex_t* reg) int r, mod_tlen; int ckn; int infinite = IS_REPEAT_INFINITE(qn->upper); - int empty_info = qn->target_empty_info; + int empty_info = qn->body_empty_info; int tlen = compile_length_tree(qn->target, reg); if (tlen < 0) return tlen; @@ -1044,7 +1044,7 @@ compile_length_quantifier_node(QtfrNode* qn, regex_t* reg) { int len, mod_tlen; int infinite = IS_REPEAT_INFINITE(qn->upper); - int empty_info = qn->target_empty_info; + int empty_info = qn->body_empty_info; int tlen = compile_length_tree(NODE_BODY((Node* )qn), reg); if (tlen < 0) return tlen; @@ -1109,7 +1109,7 @@ compile_quantifier_node(QtfrNode* qn, regex_t* reg) { int i, r, mod_tlen; int infinite = IS_REPEAT_INFINITE(qn->upper); - int empty_info = qn->target_empty_info; + int empty_info = qn->body_empty_info; int tlen = compile_length_tree(NODE_BODY((Node* )qn), reg); if (tlen < 0) return tlen; @@ -3764,7 +3764,7 @@ quantifiers_memory_node_info(Node* node, int state) #endif /* USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT */ /* setup_tree does the following work. - 1. check empty loop. (set qn->target_empty_info) + 1. check empty loop. (set qn->body_empty_info) 2. expand ignore-case in char class. 3. set memory status bit flags. (reg->mem_stats) 4. set qn->head_exact for [push, exact] -> [push_or_jump_exact1, exact]. @@ -3851,12 +3851,12 @@ setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env) r = get_min_len(target, &d, env); if (r) break; if (d == 0) { - qn->target_empty_info = NQ_BODY_IS_EMPTY; + qn->body_empty_info = NQ_BODY_IS_EMPTY; #ifdef USE_MONOMANIAC_CHECK_CAPTURES_IN_ENDLESS_REPEAT r = quantifiers_memory_node_info(target, state); if (r < 0) break; if (r > 0) { - qn->target_empty_info = r; + qn->body_empty_info = r; if (r == NQ_BODY_IS_EMPTY_REC) { if (NTYPE(target) == NT_ENCLOSE && NENCLOSE(target)->type == ENCLOSE_MEMORY) { @@ -3907,7 +3907,7 @@ setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env) } #ifdef USE_OP_PUSH_OR_JUMP_EXACT - if (qn->greedy && (qn->target_empty_info != 0)) { + if (qn->greedy && (qn->body_empty_info != 0)) { if (NTYPE(target) == NT_QTFR) { QtfrNode* tqn = NQTFR(target); if (IS_NOT_NULL(tqn->head_exact)) { diff --git a/src/regparse.c b/src/regparse.c index aeec1d8..0267a38 100644 --- a/src/regparse.c +++ b/src/regparse.c @@ -1297,10 +1297,10 @@ node_new_quantifier(int lower, int upper, int by_number) NQTFR(node)->lower = lower; NQTFR(node)->upper = upper; NQTFR(node)->greedy = 1; - NQTFR(node)->target_empty_info = NQ_BODY_ISNOT_EMPTY; - NQTFR(node)->head_exact = NULL_NODE; - NQTFR(node)->next_head_exact = NULL_NODE; - NQTFR(node)->is_refered = 0; + NQTFR(node)->body_empty_info = NQ_BODY_ISNOT_EMPTY; + NQTFR(node)->head_exact = NULL_NODE; + NQTFR(node)->next_head_exact = NULL_NODE; + NQTFR(node)->is_refered = 0; if (by_number != 0) NODE_STATUS_SET(node, NST_BY_NUMBER); diff --git a/src/regparse.h b/src/regparse.h index ced1580..12b9689 100644 --- a/src/regparse.h +++ b/src/regparse.h @@ -170,7 +170,7 @@ typedef struct { int lower; int upper; int greedy; - int target_empty_info; + int body_empty_info; struct _Node* head_exact; struct _Node* next_head_exact; int is_refered; /* include called node. don't eliminate even if {0} */