RE: RegExp Flags
Should this be added to test-262? It'd be cool if test-262 took pull requests :). From: es-discuss-boun...@mozilla.org [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Yusuke SUZUKI Sent: Monday, April 1, 2013 22:44 To: Allen Wirfs-Brock Cc: es-discuss@mozilla.org Subject: Re: RegExp Flags I've already reported this issue :) https://code.google.com/p/v8/issues/detail?id=896 On Tue, Apr 2, 2013 at 2:33 PM, Allen Wirfs-Brock al...@wirfs-brock.commailto:al...@wirfs-brock.com wrote: Original message Subject:RE: RegExp Flags From:Allen Wirfs-Brock al...@wirfs-brock.commailto:al...@wirfs-brock.com To:zenpars...@gmail.commailto:to%3azenpars...@gmail.com Cc: It's supposed to be an early syntax error. See last sentence of http://www.ecma-international.org/ecma-262/5.1/#sec-7.8.5 ___ es-discuss mailing list es-discuss@mozilla.orgmailto:es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Regards, Yusuke Suzuki ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss
Re: RegExp Flags
It;s moved and morphed: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-11.1.8 Got it - thanks! { Kevin } ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss
Re: RegExp Flags
I think SM behavior is right to the spec. According to 7.8.5, the error must be treated as an early error (Clause 16) And early error should be reported before evaluation of the Program (section 16) An early error is an error that can be detected and reported prior to the evaluation of any construct in the Program containing the error. An implementation must report early errors in a Program prior to the first evaluation of that Program. On Tue, Apr 2, 2013 at 1:22 PM, Kevin Smith zenpars...@gmail.com wrote: SM and v8 exhibit different behavior when evaluating the following: false ? /abc/ii : 0; In v8, no syntax error is thrown, presumably because regular expression flags are only validated when a RegExp object is created. In SM, a syntax error is thrown because flag validation is performed by the scanner. The current spec seems to lean toward the v8 interpretation. Thoughts? { Kevin } ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Regards, Yusuke Suzuki ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss
RE: RegExp Flags
Original message Subject:RE: RegExp Flags From:Allen Wirfs-Brock al...@wirfs-brock.com To:zenpars...@gmail.com Cc: It's supposed to be an early syntax error. See last sentence of http://www.ecma-international.org/ecma-262/5.1/#sec-7.8.5 ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss
Re: RegExp Flags
I've already reported this issue :) https://code.google.com/p/v8/issues/detail?id=896 On Tue, Apr 2, 2013 at 2:33 PM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: Original message Subject:RE: RegExp Flags From:Allen Wirfs-Brock al...@wirfs-brock.com To:zenpars...@gmail.com Cc: It's supposed to be an early syntax error. See last sentence of http://www.ecma-international.org/ecma-262/5.1/#sec-7.8.5 ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Regards, Yusuke Suzuki ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss