Bug 55589
| Summary: | Parenthetical assertions don't work correctly with YARR Interpreter | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Peter Varga <pvarga> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | barraclough, msaboff |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
Peter Varga
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Gavin Barraclough
These test cases have all since been fixed in the YARR interpreter.