case '.':
token->type = OP_OPEN_COLL_ELEM;
break;
+
case '=':
token->type = OP_OPEN_EQUIV_CLASS;
break;
+
case ':':
if (syntax & RE_CHAR_CLASSES)
{
token->type = OP_OPEN_CHAR_CLASS;
break;
}
- /* else fall through. */
+ FALLTHROUGH;
default:
token->type = CHARACTER;
token->opr.c = c;
}
#endif
break;
+
case OP_OPEN_SUBEXP:
tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err);
if (BE (*err != REG_NOERROR && tree == NULL, 0))
return NULL;
break;
+
case OP_OPEN_BRACKET:
tree = parse_bracket_exp (regexp, dfa, token, syntax, err);
if (BE (*err != REG_NOERROR && tree == NULL, 0))
return NULL;
break;
+
case OP_BACK_REF:
if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1))
{
++dfa->nbackref;
dfa->has_mb_node = 1;
break;
+
case OP_OPEN_DUP_NUM:
if (syntax & RE_CONTEXT_INVALID_DUP)
{
*err = REG_BADRPT;
return NULL;
}
- /* FALLTHROUGH */
+ FALLTHROUGH;
case OP_DUP_ASTERISK:
case OP_DUP_PLUS:
case OP_DUP_QUESTION:
fetch_token (token, regexp, syntax);
return parse_expression (regexp, preg, token, syntax, nest, err);
}
- /* else fall through */
+ FALLTHROUGH;
case OP_CLOSE_SUBEXP:
if ((token->type == OP_CLOSE_SUBEXP) &&
!(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD))
*err = REG_ERPAREN;
return NULL;
}
- /* else fall through */
+ FALLTHROUGH;
case OP_CLOSE_DUP_NUM:
/* We treat it as a normal character. */
return NULL;
}
break;
+
case ANCHOR:
if ((token->opr.ctx_type
& (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST))
it must not be "<ANCHOR(^)><REPEAT(*)>". */
fetch_token (token, regexp, syntax);
return tree;
+
case OP_PERIOD:
tree = create_token_tree (dfa, NULL, NULL, token);
if (BE (tree == NULL, 0))
if (dfa->mb_cur_max > 1)
dfa->has_mb_node = 1;
break;
+
case OP_WORD:
case OP_NOTWORD:
tree = build_charclass_op (dfa, regexp->trans,
if (BE (*err != REG_NOERROR && tree == NULL, 0))
return NULL;
break;
+
case OP_SPACE:
case OP_NOTSPACE:
tree = build_charclass_op (dfa, regexp->trans,
if (BE (*err != REG_NOERROR && tree == NULL, 0))
return NULL;
break;
+
case OP_ALT:
case END_OF_RE:
return NULL;
+
case BACK_SLASH:
*err = REG_EESCAPE;
return NULL;
+
default:
/* Must not happen? */
#ifdef DEBUG