if (MB_CUR_MAX > 1)
if (dfa->mb_cur_max > 1)
parse_expression (regexp, preg, token, syntax, nest, err)     re_string_t *regexp;     regex_t *preg;     re_token_t *token;     reg_syntax_t syntax;     int nest;     reg_errcode_t *err;{  re_dfa_t *dfa = (re_dfa_t *) preg->buffer;  bin_tree_t *tree;  int new_idx;  switch (token->type)    {    case CHARACTER:      new_idx = re_dfa_add_node (dfa, *token, 0);      tree = create_tree (NULL, NULL, 0, new_idx);      if (BE (new_idx == -1 || tree == NULL, 0))	{	  *err = REG_ESPACE;	  return NULL;	}#ifdef RE_ENABLE_I18N      if (MB_CUR_MAX > 1)	{	  while (!re_string_eoi (regexp)		 && !re_string_first_byte (regexp, re_string_cur_idx (regexp)))	    {	      bin_tree_t *mbc_remain;	      *token = fetch_token (regexp, syntax);	      new_idx = re_dfa_add_node (dfa, *token, 0);	      mbc_remain = create_tree (NULL, NULL, 0, new_idx);	      tree = create_tree (tree, mbc_remain, CONCAT, 0);	      if (BE (new_idx == -1 || mbc_remain == NULL || tree == NULL, 0))		{		  *err = REG_ESPACE;		  return NULL;		}	    }	}#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 (preg->re_nsub < token->opr.idx	      || dfa->subexps[token->opr.idx - 1].end == -1, 0))	{	  *err = REG_ESUBREG;	  return NULL;	}      dfa->used_bkref_map |= 1 << (token->opr.idx - 1);      new_idx = re_dfa_add_node (dfa, *token, 0);      tree = create_tree (NULL, NULL, 0, new_idx);      if (BE (new_idx == -1 || tree == NULL, 0))	{	  *err = REG_ESPACE;	  return NULL;	}      ++dfa->nbackref;      dfa->has_mb_node = 1;      break;    case OP_DUP_ASTERISK:    case OP_DUP_PLUS:    case OP_DUP_QUESTION:    case OP_OPEN_DUP_NUM:      if (syntax & RE_CONTEXT_INVALID_OPS)	{	  *err = REG_BADRPT;	  return NULL;	}      else if (syntax & RE_CONTEXT_INDEP_OPS)	{	  *token = fetch_token (regexp, syntax);	  return parse_expression (regexp, preg, token, syntax, nest, err);	}      /* else fall through  */    case OP_CLOSE_SUBEXP:      if ((token->type == OP_CLOSE_SUBEXP) &&	  !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD))	{	  *err = REG_ERPAREN;	  return NULL;	}      /* else fall through  */    case OP_CLOSE_DUP_NUM:      /* We treat it as a normal character.  */      /* Then we can these characters as normal characters.  */      token->type = CHARACTER;      new_idx = re_dfa_add_node (dfa, *token, 0);      tree = create_tree (NULL, NULL, 0, new_idx);      if (BE (new_idx == -1 || tree == NULL, 0))	{	  *err = REG_ESPACE;	  return NULL;	}      break;    case ANCHOR:      if (dfa->word_char == NULL)	{	  *err = init_word_char (dfa);	  if (BE (*err != REG_NOERROR, 0))	    return NULL;	}      if (token->opr.ctx_type == WORD_DELIM)	{	  bin_tree_t *tree_first, *tree_last;	  int idx_first, idx_last;	  token->opr.ctx_type = WORD_FIRST;	  idx_first = re_dfa_add_node (dfa, *token, 0);	  tree_first = create_tree (NULL, NULL, 0, idx_first);	  token->opr.ctx_type = WORD_LAST;	  idx_last = re_dfa_add_node (dfa, *token, 0);	  tree_last = create_tree (NULL, NULL, 0, idx_last);	  token->type = OP_ALT;	  new_idx = re_dfa_add_node (dfa, *token, 0);	  tree = create_tree (tree_first, tree_last, 0, new_idx);	  if (BE (idx_first == -1 || idx_last == -1 || new_idx == -1		  || tree_first == NULL || tree_last == NULL		  || tree == NULL, 0))	    {	      *err = REG_ESPACE;	      return NULL;	    }	}      else	{	  new_idx = re_dfa_add_node (dfa, *token, 0);	  tree = create_tree (NULL, NULL, 0, new_idx);	  if (BE (new_idx == -1 || tree == NULL, 0))	    {	      *err = REG_ESPACE;	      return NULL;	    }	}      /* We must return here, since ANCHORs can't be followed	 by repetition operators.	 eg. RE"^*" is invalid or "<ANCHOR(^)><CHAR(*)>",	     it must not be "<ANCHOR(^)><REPEAT(*)>".  */      *token = fetch_token (regexp, syntax);      return tree;    case OP_PERIOD:      new_idx = re_dfa_add_node (dfa, *token, 0);      tree = create_tree (NULL, NULL, 0, new_idx);      if (BE (new_idx == -1 || tree == NULL, 0))	{	  *err = REG_ESPACE;	  return NULL;	}      if (MB_CUR_MAX > 1)	dfa->has_mb_node = 1;      break;    case OP_WORD:      tree = build_charclass_op (dfa, regexp->trans, "alnum", "_", 0, err);      if (BE (*err != REG_NOERROR && tree == NULL, 0))	return NULL;      break;    case OP_NOTWORD:      tree = build_charclass_op (dfa, regexp->trans, "alnum", "_", 1, err);      if (BE (*err != REG_NOERROR && tree == NULL, 0))	return NULL;      break;    case OP_SPACE:      tree = build_charclass_op (dfa, regexp->trans, "space", "", 0, err);      if (BE (*err != REG_NOERROR && tree == NULL, 0))	return NULL;      break;    case OP_NOTSPACE:      tree = build_charclass_op (dfa, regexp->trans, "space", "", 1, err);      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      assert (0);#endif      return NULL;    }  *token = fetch_token (regexp, syntax);  while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS	 || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM)    {      tree = parse_dup_op (tree, regexp, dfa, token, syntax, err);      if (BE (*err != REG_NOERROR && tree == NULL, 0))	return NULL;      dfa->has_plural_match = 1;    }  return tree;}