Closed
Bug 225926
Opened 22 years ago
Closed 22 years ago
Allow unescaped braces in regexp patterns, if not part of a quantifier?
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.5R5
People
(Reporter: pschwartau, Assigned: igor)
Details
Attachments
(1 file)
The following testcase fails in Rhino:
mozilla/js/tests/ecma_3/RegExp/regress-188206.js
The failures all occur between sections 14 and 27 of the test.
Here are comments from the testcase on these sections:
116 /*
117 * Misusing the {DecmalDigits} quantifier - according to ECMA,
118 * but not according to Perl.
119 *
120 * ECMA-262 Edition 3 prohibits the use of unescaped braces in
121 * regexp patterns, unless they form part of a quantifier.
122 *
123 * Hovever, Perl does not prohibit this. If not used as part
124 * of a quantifer, Perl treats braces literally.
125 *
126 * We decided to follow Perl on this for backward compatibility.
127 * See http://bugzilla.mozilla.org/show_bug.cgi?id=190685.
128 *
129 * Therefore NONE of the following ECMA violations should generate
130 * a SyntaxError. Note we use checkThis() instead of testThis().
131 */
Currently Rhino is correctly throwing an error according to ECMA.
But do we want to stay in synch with SpiderMonkey on this?
| Assignee | ||
Comment 2•22 years ago
|
||
Roger made a fix for Rhino in July and added it as
http://bugzilla.mozilla.org/show_bug.cgi?id=190685#c13 .
It fails to apply due to my changes to make compiled form of regular expression
scope-independent that caused some code movements that was too complex for the
patch utility. This is the adjusted version.
| Assignee | ||
Comment 3•22 years ago
|
||
CC Roger
| Assignee | ||
Comment 4•22 years ago
|
||
I committed the fix
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•