Bug 55589 - Parenthetical assertions don't work correctly with YARR Interpreter
Summary: Parenthetical assertions don't work correctly with YARR Interpreter
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-02 10:27 PST by Peter Varga
Modified: 2011-06-18 00:09 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Varga 2011-03-02 10:27:08 PST
The fast/regex/pcre-test-1 layout test fails with YARR Interpreter:
FAIL regex269.exec(input0); should be 12-sep-98. Was null.

The test case is:
regex269 = /(?=[^a-z]+[a-z])\d{2}-[a-z]{3}-\d{2}|(?![^a-z]+[a-z])\d{2}-\d{2}-\d{2}/;
var input0 = "12-sep-98";

It seems when a parenthetical assertion contains a term with a quantifier (+ or *) the YARR Interpreter 
doesn't match the subpattern correctly.

Here is a simpler example:
var str = "aab".match(/(?=a+b)aab/); 

result: null
expected: aab

These kind of patterns work well with YARR JIT.
Comment 1 Gavin Barraclough 2011-06-18 00:09:20 PDT
These test cases have all since been fixed in the YARR interpreter.