comparison lib/regexec.c @ 40245:eeb8fe2e91ad

autoupdate
author Paul Eggert <eggert@cs.ucla.edu>
date Sun, 17 Mar 2019 16:29:28 -0700
parents f533980eb42f
children
comparison
equal deleted inserted replaced
40244:c39a0edd90d7 40245:eeb8fe2e91ad
2202 { 2202 {
2203 const re_dfa_t *const dfa = mctx->dfa; 2203 const re_dfa_t *const dfa = mctx->dfa;
2204 int naccepted; 2204 int naccepted;
2205 /* Check the node can accept "multi byte". */ 2205 /* Check the node can accept "multi byte". */
2206 naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); 2206 naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx);
2207 if (naccepted > 0 && str_idx + naccepted <= max_str_idx && 2207 if (naccepted > 0 && str_idx + naccepted <= max_str_idx
2208 !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted], 2208 && !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted],
2209 dfa->nexts[node_idx])) 2209 dfa->nexts[node_idx]))
2210 /* The node can't accept the "multi byte", or the 2210 /* The node can't accept the "multi byte", or the
2211 destination was already thrown away, then the node 2211 destination was already thrown away, then the node
2212 couldn't accept the current input "multi byte". */ 2212 couldn't accept the current input "multi byte". */
2213 naccepted = 0; 2213 naccepted = 0;
2214 /* Otherwise, it is sure that the node could accept 2214 /* Otherwise, it is sure that the node could accept
3780 if (char_len <= 1) 3780 if (char_len <= 1)
3781 return 0; 3781 return 0;
3782 /* FIXME: I don't think this if is needed, as both '\n' 3782 /* FIXME: I don't think this if is needed, as both '\n'
3783 and '\0' are char_len == 1. */ 3783 and '\0' are char_len == 1. */
3784 /* '.' accepts any one character except the following two cases. */ 3784 /* '.' accepts any one character except the following two cases. */
3785 if ((!(dfa->syntax & RE_DOT_NEWLINE) && 3785 if ((!(dfa->syntax & RE_DOT_NEWLINE)
3786 re_string_byte_at (input, str_idx) == '\n') || 3786 && re_string_byte_at (input, str_idx) == '\n')
3787 ((dfa->syntax & RE_DOT_NOT_NULL) && 3787 || ((dfa->syntax & RE_DOT_NOT_NULL)
3788 re_string_byte_at (input, str_idx) == '\0')) 3788 && re_string_byte_at (input, str_idx) == '\0'))
3789 return 0; 3789 return 0;
3790 return char_len; 3790 return char_len;
3791 } 3791 }
3792 3792
3793 elem_len = re_string_elem_size_at (input, str_idx); 3793 elem_len = re_string_elem_size_at (input, str_idx);