Rnormals and one Rplus. The third is compiled as n-1 Rnormals
and m-n Rnormals with Roptionals. 0 values have special
compilation. */
- int min, max, i;
+ int min, max, i, alen = 2;
if (pos >= size)
goto normal_char; /* Consider literal */
goto normal_char; /* Consider literal */
pos -= 2;
NEXTCHAR(a);
+ if (translate)
+ a = translate[(unsigned char)a];
+ op = silc_regexp_plain_ops[(unsigned char)a];
+
+ if (op == Ranychar) {
+ opcode = Canychar;
+ a = 0;
+ alen = 1;
+ }
+
NEXTCHAR(ch);
/* Get min value */
/* Store min - 1 many Cexacts. */
for (i = 0; i < min - 1; i++) {
SET_LEVEL_START;
- ALLOC(2);
- STORE(Cexact);
- STORE((unsigned char)a);
+ ALLOC(alen);
+ STORE(opcode);
+ if (a)
+ STORE((unsigned char)a);
}
break;
}
/* Store min - 1 many Cexacts. */
for (i = 0; i < min - 1; i++) {
SET_LEVEL_START;
- ALLOC(2);
- STORE(Cexact);
- STORE((unsigned char)a);
+ ALLOC(alen);
+ STORE(opcode);
+ if (a)
+ STORE((unsigned char)a);
}
/* Store Rplus */
/* Store min - 1 many Cexacts. */
for (i = 0; min && i < min - 1; i++) {
SET_LEVEL_START;
- ALLOC(2);
- STORE(Cexact);
- STORE((unsigned char)a);
+ ALLOC(alen);
+ STORE(opcode);
+ if (a)
+ STORE((unsigned char)a);
}
/* Store max - min Cexacts and Roptionals. */
for (i = 0; i < max - min; i++) {
SET_LEVEL_START;
- ALLOC(2);
- STORE(Cexact);
- STORE((unsigned char)a);
+ ALLOC(alen);
+ STORE(opcode);
+ if (a)
+ STORE((unsigned char)a);
ALLOC(3);
INSERT_JUMP(CURRENT_LEVEL_START, Cfailure_jump,
pattern_offset + 3);