Nikolai, As you might know, the reg_comp() method is called twice when compiling a r.e; first to determine the size of the compiled expression and then to actually compile it. I was thinking if this can be used to our advantage, while on the first pass, we look for occurrences of special characters and set a flag in regprog_T appropriately. If such thing was not found, we branch off the second pass into one of our own routines to compile the expression into our own structures (say, a state diagram). And we have to change other functions a bit to look for the above flag and call new routines appropriately. What do you think ?
- Asiri