Overview
| Artifact ID: | 680f73d213da6d611bea2c41cc9c73521e387b93 |
|---|---|
| Ticket: | 1280817fffffffffffffffffffffffffffffffff
regexp hangs on some valid REs |
| User & Date: | nobody on 2005-12-08 21:03:12 |
Changes
- icomment:
Logged In: NO Note: % regexp -about {(\m\M)} 1 {REG_UNONPOSIX REG_ULOCALE REG_UIMPOSSIBLE} If the IMPOSSIBLE is genuine (and usable), then perhaps nfatree() in regcomp.c should 'accumulate' its return value from nfanode so that it retains any IMPOSSIBLE flag. Something like: int ret = 0; if (t->left != NULL) { ret |= nfatree(v, t->left, f); } if (t->right != NULL) { ret |= nfatree(v, t->right, f); } ret |= nfanode(v, t, f); return ret; Then compile() can check the return value: /* build compacted NFAs for tree and lacons */ re->re_info |= nfatree(v, v->tree, debug); if (re->re_info & REG_UIMPOSSIBLE) { /* throw an error */ } More investigation needed :-) - login: "nobody"
- mimetype: "text/plain"
- username: "nobody"