s--;
break;
default:
- if (isdigit(*s)) {
+ if (!ere && (unsigned)*s-'1' < 9) {
/* back reference */
int val = *s - '0';
node = tre_ast_new_literal(ctx->mem, BACKREF, val, ctx->position);
{
status = tre_add_tag_right(mem, left, tag_left);
tnfa->tag_directions[tag_left] = TRE_TAG_MAXIMIZE;
- status = tre_add_tag_right(mem, right, tag_right);
+ if (status == REG_OK)
+ status = tre_add_tag_right(mem, right, tag_right);
tnfa->tag_directions[tag_right] = TRE_TAG_MAXIMIZE;
}
num_tags += 2;
*result = tre_ast_new_literal(mem, min, max, pos);
if (*result == NULL)
status = REG_ESPACE;
+ else {
+ tre_literal_t *p = (*result)->obj;
+ p->class = lit->class;
+ p->neg_classes = lit->neg_classes;
+ }
if (pos > *max_pos)
*max_pos = pos;