The R Project SVN R

Rev

Rev 78310 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 78310 Rev 78444
Line 1729... Line 1729...
1729
 
1729
 
1730
	case PARSE_MARK_FOR_SUBMATCH:
1730
	case PARSE_MARK_FOR_SUBMATCH:
1731
	  {
1731
	  {
1732
	    int submatch_id = tre_stack_pop_int(stack);
1732
	    int submatch_id = tre_stack_pop_int(stack);
1733
 
1733
 
-
 
1734
            if(result) {
1734
	    if (result->submatch_id >= 0)
1735
	      if (result->submatch_id >= 0)
1735
	      {
1736
	        {
1736
		tre_ast_node_t *n, *tmp_node;
1737
		  tre_ast_node_t *n, *tmp_node;
1737
		n = tre_ast_new_literal(ctx->mem, EMPTY, -1, -1);
1738
		  n = tre_ast_new_literal(ctx->mem, EMPTY, -1, -1);
1738
		if (n == NULL)
1739
		  if (n == NULL)
1739
		  return REG_ESPACE;
1740
		    return REG_ESPACE;
1740
		tmp_node = tre_ast_new_catenation(ctx->mem, n, result);
1741
		  tmp_node = tre_ast_new_catenation(ctx->mem, n, result);
1741
		if (tmp_node == NULL)
1742
		  if (tmp_node == NULL)
1742
		  return REG_ESPACE;
1743
		    return REG_ESPACE;
1743
		tmp_node->num_submatches = result->num_submatches;
1744
		  tmp_node->num_submatches = result->num_submatches;
1744
		result = tmp_node;
1745
		  result = tmp_node;
1745
	      }
1746
	        }
1746
	    result->submatch_id = submatch_id;
1747
	      result->submatch_id = submatch_id;
1747
	    result->num_submatches++;
1748
	      result->num_submatches++;
-
 
1749
	    }
1748
	    break;
1750
	    break;
1749
	  }
1751
	  }
1750
 
1752
 
1751
	case PARSE_RESTORE_CFLAGS:
1753
	case PARSE_RESTORE_CFLAGS:
1752
	  ctx->cflags = tre_stack_pop_int(stack);
1754
	  ctx->cflags = tre_stack_pop_int(stack);