Skip Menu |

This queue is for tickets about the JE CPAN distribution.

Report information
The Basics
Id: 51123
Status: resolved
Priority: 0/
Queue: JE

People
Owner: Nobody in particular
Requestors: andreas [...] one.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.041
Fixed in: 0.041



JE fails to parse character classes containing unescaped dashes that don't specify a range: var re = /[\w-\d]/; As I read ECMA-262 this is syntax is perfectly fine (NonemptyClassRanges => ClassAtom => -). In perl 5, IE6, and Firefox it works as expected. Those are the only ones I've tested. I found this bug when I ran the entire ExtJS library through JE's parser. Everything else parsed fine! Best regards, Papandreou
Subject: Unescaped dashes in character classes are rejected
Whoops, sorry for the missing subject, and obviously this isn't fixed in 0.041. This bug tracking system always confuses the hell out of me!
On Thu Nov 05 04:45:43 2009, papandreou wrote: Show quoted text
> JE fails to parse character classes containing unescaped dashes that > don't specify a range: > > var re = /[\w-\d]/; > > As I read ECMA-262 this is syntax is perfectly fine (NonemptyClassRanges > => ClassAtom => -). In perl 5, IE6, and Firefox it works as expected. > Those are the only ones I've tested.
Section 15.10.2.15 of ECMAScript does not allow [\w-\s]: If A does not contain exactly one character or B does not contain exactly one character then throw a SyntaxError exception. However, Nitro also supports this, so I think it’s worthwhile to add it. This I’ve done in version 0.042, which will be released some time today.