Closed
Bug 592027
Opened 14 years ago
Closed 14 years ago
YARR: regexp syntax error on unbalanced parens.
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
WONTFIX
Tracking | Status | |
---|---|---|
blocking2.0 | --- | betaN+ |
People
(Reporter: cdleary, Assigned: cdleary)
Details
For the YARR engine, the regexp /)/ results in a syntax error, whereas our previous regexp engine did not, as mentioned in bug 587366 comment 20.
We should determine what the correct behavior is here.
Updated•14 years ago
|
blocking2.0: --- → betaN+
Assignee | ||
Comment 1•14 years ago
|
||
Pretty clear that it should fail to parse. Using => to indicate "derives" and =>* to indicate "derives after some number of obvious steps":
Pattern =>* Atom => PatternCharacter => SourceCharacter not in [..., ")", ...]
If you put it in a character class, however, /[)]/ results in a valid parse:
Pattern =>* Atom => CharacterClass => "[" ClassRanges "]" => NonemptyClassRanges => ClassAtom => ClassAtomNoDash => SourceCharacter not in [BACKSLASH, ']', '-']
I think it would be unwise to conform to our evil old behaviors, especially given that JSC and V8 detect the spec'd error properly.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•