diff options
author | Yves Orton <demerphq@gmail.com> | 2006-10-31 23:49:57 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-11-01 17:05:03 +0000 |
commit | 5461259206276a3618e115d5d68776273bb41ca6 (patch) | |
tree | 62be0b5e283fa9c04597fe6ec054cc83064e0f87 /regcomp.c | |
parent | a983b08dc7c658d412bac21b8ceac00c24ae5c11 (diff) | |
download | perl-5461259206276a3618e115d5d68776273bb41ca6.tar.gz |
Add a commit verb to regex engine to allow fine tuning of backtracking control.
Message-ID: <9b18b3110610311349n5947cc8fsf0b2e6ddd9a7ee01@mail.gmail.com>
p4raw-id: //depot/perl@29183
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -4717,6 +4717,22 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth) case ':': /* (?:...) */ case '>': /* (?>...) */ break; + case 'C': + if (RExC_parse[0] == 'O' && + RExC_parse[1] == 'M' && + RExC_parse[2] == 'M' && + RExC_parse[3] == 'I' && + RExC_parse[4] == 'T' && + RExC_parse[5] == ')') + { + RExC_parse+=5; + ret = reg_node(pRExC_state, COMMIT); + } else { + vFAIL("Sequence (?C... not terminated"); + } + nextchar(pRExC_state); + return ret; + break; case 'F': if (RExC_parse[0] == 'A' && RExC_parse[1] == 'I' && |